AWS SDK for C++  1.9.108
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 ServiceDiscovery
22 {
23 namespace Model
24 {
25 
33  {
34  public:
35  Tag();
39 
40 
44  inline const Aws::String& GetKey() const{ return m_key; }
45 
49  inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
50 
54  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
55 
59  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
60 
64  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
65 
69  inline Tag& WithKey(const Aws::String& value) { SetKey(value); return *this;}
70 
74  inline Tag& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
75 
79  inline Tag& WithKey(const char* value) { SetKey(value); return *this;}
80 
81 
87  inline const Aws::String& GetValue() const{ return m_value; }
88 
94  inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
95 
101  inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
102 
108  inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
109 
115  inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
116 
122  inline Tag& WithValue(const Aws::String& value) { SetValue(value); return *this;}
123 
129  inline Tag& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
130 
136  inline Tag& WithValue(const char* value) { SetValue(value); return *this;}
137 
138  private:
139 
140  Aws::String m_key;
141  bool m_keyHasBeenSet;
142 
143  Aws::String m_value;
144  bool m_valueHasBeenSet;
145  };
146 
147 } // namespace Model
148 } // namespace ServiceDiscovery
149 } // namespace Aws
Aws::ServiceDiscovery::Model::Tag::SetValue
void SetValue(const char *value)
Definition: Tag.h:115
Aws::ServiceDiscovery::Model::Tag::WithValue
Tag & WithValue(const Aws::String &value)
Definition: Tag.h:122
AWS_SERVICEDISCOVERY_API
#define AWS_SERVICEDISCOVERY_API
Definition: ServiceDiscovery_EXPORTS.h:28
Aws::ServiceDiscovery::Model::Tag::Tag
Tag()
ServiceDiscovery_EXPORTS.h
Aws::ServiceDiscovery::Model::Tag::WithKey
Tag & WithKey(const Aws::String &value)
Definition: Tag.h:69
Aws::ServiceDiscovery::Model::Tag::WithValue
Tag & WithValue(Aws::String &&value)
Definition: Tag.h:129
Aws::ServiceDiscovery::Model::Tag::Jsonize
Aws::Utils::Json::JsonValue Jsonize() const
Aws::ServiceDiscovery::Model::Tag::WithKey
Tag & WithKey(Aws::String &&value)
Definition: Tag.h:74
Aws::ServiceDiscovery::Model::Tag::WithKey
Tag & WithKey(const char *value)
Definition: Tag.h:79
Aws::ServiceDiscovery::Model::Tag::SetValue
void SetValue(const Aws::String &value)
Definition: Tag.h:101
Aws::ServiceDiscovery::Model::Tag::GetValue
const Aws::String & GetValue() const
Definition: Tag.h:87
Aws::Utils::Json::JsonView
Definition: JsonSerializer.h:235
AWSString.h
Aws::ServiceDiscovery::Model::Tag::Tag
Tag(Aws::Utils::Json::JsonView jsonValue)
Aws::Utils::Json::JsonValue
Definition: JsonSerializer.h:33
Aws::ServiceDiscovery::Model::Tag::SetKey
void SetKey(const char *value)
Definition: Tag.h:64
Aws::ServiceDiscovery::Model::Tag
Definition: Tag.h:33
Aws::ServiceDiscovery::Model::Tag::ValueHasBeenSet
bool ValueHasBeenSet() const
Definition: Tag.h:94
Aws::ServiceDiscovery::Model::Tag::operator=
Tag & operator=(Aws::Utils::Json::JsonView jsonValue)
Aws
Definition: AccessManagementClient.h:15
Aws::ServiceDiscovery::Model::Tag::WithValue
Tag & WithValue(const char *value)
Definition: Tag.h:136
Aws::ServiceDiscovery::Model::Tag::GetKey
const Aws::String & GetKey() const
Definition: Tag.h:44
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::ServiceDiscovery::Model::Tag::SetKey
void SetKey(Aws::String &&value)
Definition: Tag.h:59
Aws::ServiceDiscovery::Model::Tag::SetValue
void SetValue(Aws::String &&value)
Definition: Tag.h:108
Aws::ServiceDiscovery::Model::Tag::KeyHasBeenSet
bool KeyHasBeenSet() const
Definition: Tag.h:49
Aws::ServiceDiscovery::Model::Tag::SetKey
void SetKey(const Aws::String &value)
Definition: Tag.h:54