AWS SDK for C++  1.8.95
AWS SDK for C++
ApiKey.h
Go to the documentation of this file.
1 
6 #pragma once
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20  class JsonValue;
21  class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace APIGateway
25 {
26 namespace Model
27 {
28 
40  {
41  public:
42  ApiKey();
44  ApiKey& operator=(Aws::Utils::Json::JsonView jsonValue);
45  Aws::Utils::Json::JsonValue Jsonize() const;
46 
47 
51  inline const Aws::String& GetId() const{ return m_id; }
52 
56  inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
57 
61  inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
62 
66  inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
67 
71  inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
72 
76  inline ApiKey& WithId(const Aws::String& value) { SetId(value); return *this;}
77 
81  inline ApiKey& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
82 
86  inline ApiKey& WithId(const char* value) { SetId(value); return *this;}
87 
88 
92  inline const Aws::String& GetValue() const{ return m_value; }
93 
97  inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
98 
102  inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
103 
107  inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
108 
112  inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
113 
117  inline ApiKey& WithValue(const Aws::String& value) { SetValue(value); return *this;}
118 
122  inline ApiKey& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
123 
127  inline ApiKey& WithValue(const char* value) { SetValue(value); return *this;}
128 
129 
133  inline const Aws::String& GetName() const{ return m_name; }
134 
138  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
139 
143  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
144 
148  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
149 
153  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
154 
158  inline ApiKey& WithName(const Aws::String& value) { SetName(value); return *this;}
159 
163  inline ApiKey& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
164 
168  inline ApiKey& WithName(const char* value) { SetName(value); return *this;}
169 
170 
175  inline const Aws::String& GetCustomerId() const{ return m_customerId; }
176 
181  inline bool CustomerIdHasBeenSet() const { return m_customerIdHasBeenSet; }
182 
187  inline void SetCustomerId(const Aws::String& value) { m_customerIdHasBeenSet = true; m_customerId = value; }
188 
193  inline void SetCustomerId(Aws::String&& value) { m_customerIdHasBeenSet = true; m_customerId = std::move(value); }
194 
199  inline void SetCustomerId(const char* value) { m_customerIdHasBeenSet = true; m_customerId.assign(value); }
200 
205  inline ApiKey& WithCustomerId(const Aws::String& value) { SetCustomerId(value); return *this;}
206 
211  inline ApiKey& WithCustomerId(Aws::String&& value) { SetCustomerId(std::move(value)); return *this;}
212 
217  inline ApiKey& WithCustomerId(const char* value) { SetCustomerId(value); return *this;}
218 
219 
223  inline const Aws::String& GetDescription() const{ return m_description; }
224 
228  inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
229 
233  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
234 
238  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
239 
243  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
244 
248  inline ApiKey& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
249 
253  inline ApiKey& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
254 
258  inline ApiKey& WithDescription(const char* value) { SetDescription(value); return *this;}
259 
260 
264  inline bool GetEnabled() const{ return m_enabled; }
265 
269  inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
270 
274  inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
275 
279  inline ApiKey& WithEnabled(bool value) { SetEnabled(value); return *this;}
280 
281 
285  inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; }
286 
290  inline bool CreatedDateHasBeenSet() const { return m_createdDateHasBeenSet; }
291 
295  inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDateHasBeenSet = true; m_createdDate = value; }
296 
300  inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDateHasBeenSet = true; m_createdDate = std::move(value); }
301 
305  inline ApiKey& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;}
306 
310  inline ApiKey& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;}
311 
312 
316  inline const Aws::Utils::DateTime& GetLastUpdatedDate() const{ return m_lastUpdatedDate; }
317 
321  inline bool LastUpdatedDateHasBeenSet() const { return m_lastUpdatedDateHasBeenSet; }
322 
326  inline void SetLastUpdatedDate(const Aws::Utils::DateTime& value) { m_lastUpdatedDateHasBeenSet = true; m_lastUpdatedDate = value; }
327 
331  inline void SetLastUpdatedDate(Aws::Utils::DateTime&& value) { m_lastUpdatedDateHasBeenSet = true; m_lastUpdatedDate = std::move(value); }
332 
336  inline ApiKey& WithLastUpdatedDate(const Aws::Utils::DateTime& value) { SetLastUpdatedDate(value); return *this;}
337 
341  inline ApiKey& WithLastUpdatedDate(Aws::Utils::DateTime&& value) { SetLastUpdatedDate(std::move(value)); return *this;}
342 
343 
348  inline const Aws::Vector<Aws::String>& GetStageKeys() const{ return m_stageKeys; }
349 
354  inline bool StageKeysHasBeenSet() const { return m_stageKeysHasBeenSet; }
355 
360  inline void SetStageKeys(const Aws::Vector<Aws::String>& value) { m_stageKeysHasBeenSet = true; m_stageKeys = value; }
361 
366  inline void SetStageKeys(Aws::Vector<Aws::String>&& value) { m_stageKeysHasBeenSet = true; m_stageKeys = std::move(value); }
367 
372  inline ApiKey& WithStageKeys(const Aws::Vector<Aws::String>& value) { SetStageKeys(value); return *this;}
373 
378  inline ApiKey& WithStageKeys(Aws::Vector<Aws::String>&& value) { SetStageKeys(std::move(value)); return *this;}
379 
384  inline ApiKey& AddStageKeys(const Aws::String& value) { m_stageKeysHasBeenSet = true; m_stageKeys.push_back(value); return *this; }
385 
390  inline ApiKey& AddStageKeys(Aws::String&& value) { m_stageKeysHasBeenSet = true; m_stageKeys.push_back(std::move(value)); return *this; }
391 
396  inline ApiKey& AddStageKeys(const char* value) { m_stageKeysHasBeenSet = true; m_stageKeys.push_back(value); return *this; }
397 
398 
403  inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
404 
409  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
410 
415  inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
416 
421  inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
422 
427  inline ApiKey& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
428 
433  inline ApiKey& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
434 
439  inline ApiKey& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
440 
445  inline ApiKey& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
446 
451  inline ApiKey& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
452 
457  inline ApiKey& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
458 
463  inline ApiKey& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
464 
469  inline ApiKey& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
470 
475  inline ApiKey& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
476 
477  private:
478 
479  Aws::String m_id;
480  bool m_idHasBeenSet;
481 
482  Aws::String m_value;
483  bool m_valueHasBeenSet;
484 
485  Aws::String m_name;
486  bool m_nameHasBeenSet;
487 
488  Aws::String m_customerId;
489  bool m_customerIdHasBeenSet;
490 
491  Aws::String m_description;
492  bool m_descriptionHasBeenSet;
493 
494  bool m_enabled;
495  bool m_enabledHasBeenSet;
496 
497  Aws::Utils::DateTime m_createdDate;
498  bool m_createdDateHasBeenSet;
499 
500  Aws::Utils::DateTime m_lastUpdatedDate;
501  bool m_lastUpdatedDateHasBeenSet;
502 
503  Aws::Vector<Aws::String> m_stageKeys;
504  bool m_stageKeysHasBeenSet;
505 
507  bool m_tagsHasBeenSet;
508  };
509 
510 } // namespace Model
511 } // namespace APIGateway
512 } // namespace Aws
ApiKey & WithCustomerId(const char *value)
Definition: ApiKey.h:217
ApiKey & AddTags(const Aws::String &key, const Aws::String &value)
Definition: ApiKey.h:439
bool EnabledHasBeenSet() const
Definition: ApiKey.h:269
ApiKey & WithValue(const char *value)
Definition: ApiKey.h:127
void SetDescription(Aws::String &&value)
Definition: ApiKey.h:238
const Aws::String & GetId() const
Definition: ApiKey.h:51
void SetLastUpdatedDate(const Aws::Utils::DateTime &value)
Definition: ApiKey.h:326
ApiKey & WithLastUpdatedDate(Aws::Utils::DateTime &&value)
Definition: ApiKey.h:341
void SetDescription(const char *value)
Definition: ApiKey.h:243
ApiKey & WithId(const char *value)
Definition: ApiKey.h:86
ApiKey & AddTags(Aws::String &&key, const Aws::String &value)
Definition: ApiKey.h:445
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: ApiKey.h:421
const Aws::Utils::DateTime & GetCreatedDate() const
Definition: ApiKey.h:285
ApiKey & AddStageKeys(const Aws::String &value)
Definition: ApiKey.h:384
void SetEnabled(bool value)
Definition: ApiKey.h:274
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition: ApiKey.h:403
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
ApiKey & WithDescription(Aws::String &&value)
Definition: ApiKey.h:253
void SetCustomerId(Aws::String &&value)
Definition: ApiKey.h:193
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19
ApiKey & WithDescription(const char *value)
Definition: ApiKey.h:258
bool LastUpdatedDateHasBeenSet() const
Definition: ApiKey.h:321
ApiKey & WithId(Aws::String &&value)
Definition: ApiKey.h:81
void SetName(const char *value)
Definition: ApiKey.h:153
void SetCustomerId(const char *value)
Definition: ApiKey.h:199
bool NameHasBeenSet() const
Definition: ApiKey.h:138
ApiKey & WithEnabled(bool value)
Definition: ApiKey.h:279
void SetId(const Aws::String &value)
Definition: ApiKey.h:61
ApiKey & WithName(const char *value)
Definition: ApiKey.h:168
void SetValue(Aws::String &&value)
Definition: ApiKey.h:107
ApiKey & AddTags(const char *key, const char *value)
Definition: ApiKey.h:475
ApiKey & WithCreatedDate(Aws::Utils::DateTime &&value)
Definition: ApiKey.h:310
bool DescriptionHasBeenSet() const
Definition: ApiKey.h:228
ApiKey & WithLastUpdatedDate(const Aws::Utils::DateTime &value)
Definition: ApiKey.h:336
ApiKey & WithName(const Aws::String &value)
Definition: ApiKey.h:158
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: ApiKey.h:415
const Aws::String & GetValue() const
Definition: ApiKey.h:92
ApiKey & AddTags(Aws::String &&key, const char *value)
Definition: ApiKey.h:469
ApiKey & AddStageKeys(const char *value)
Definition: ApiKey.h:396
ApiKey & WithName(Aws::String &&value)
Definition: ApiKey.h:163
ApiKey & WithStageKeys(const Aws::Vector< Aws::String > &value)
Definition: ApiKey.h:372
ApiKey & WithId(const Aws::String &value)
Definition: ApiKey.h:76
ApiKey & AddStageKeys(Aws::String &&value)
Definition: ApiKey.h:390
void SetCustomerId(const Aws::String &value)
Definition: ApiKey.h:187
ApiKey & AddTags(const char *key, Aws::String &&value)
Definition: ApiKey.h:463
void SetStageKeys(const Aws::Vector< Aws::String > &value)
Definition: ApiKey.h:360
void SetLastUpdatedDate(Aws::Utils::DateTime &&value)
Definition: ApiKey.h:331
ApiKey & WithValue(Aws::String &&value)
Definition: ApiKey.h:122
const Aws::String & GetCustomerId() const
Definition: ApiKey.h:175
void SetId(Aws::String &&value)
Definition: ApiKey.h:66
ApiKey & WithDescription(const Aws::String &value)
Definition: ApiKey.h:248
void SetCreatedDate(const Aws::Utils::DateTime &value)
Definition: ApiKey.h:295
void SetCreatedDate(Aws::Utils::DateTime &&value)
Definition: ApiKey.h:300
const Aws::String & GetName() const
Definition: ApiKey.h:133
void SetName(const Aws::String &value)
Definition: ApiKey.h:143
ApiKey & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: ApiKey.h:427
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
bool TagsHasBeenSet() const
Definition: ApiKey.h:409
ApiKey & WithCreatedDate(const Aws::Utils::DateTime &value)
Definition: ApiKey.h:305
ApiKey & WithCustomerId(Aws::String &&value)
Definition: ApiKey.h:211
bool StageKeysHasBeenSet() const
Definition: ApiKey.h:354
void SetValue(const Aws::String &value)
Definition: ApiKey.h:102
void SetId(const char *value)
Definition: ApiKey.h:71
#define AWS_APIGATEWAY_API
ApiKey & AddTags(const Aws::String &key, Aws::String &&value)
Definition: ApiKey.h:451
void SetDescription(const Aws::String &value)
Definition: ApiKey.h:233
bool ValueHasBeenSet() const
Definition: ApiKey.h:97
ApiKey & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: ApiKey.h:433
bool CreatedDateHasBeenSet() const
Definition: ApiKey.h:290
bool IdHasBeenSet() const
Definition: ApiKey.h:56
void SetValue(const char *value)
Definition: ApiKey.h:112
bool CustomerIdHasBeenSet() const
Definition: ApiKey.h:181
const Aws::Vector< Aws::String > & GetStageKeys() const
Definition: ApiKey.h:348
ApiKey & WithStageKeys(Aws::Vector< Aws::String > &&value)
Definition: ApiKey.h:378
const Aws::Utils::DateTime & GetLastUpdatedDate() const
Definition: ApiKey.h:316
const Aws::String & GetDescription() const
Definition: ApiKey.h:223
void SetName(Aws::String &&value)
Definition: ApiKey.h:148
ApiKey & WithCustomerId(const Aws::String &value)
Definition: ApiKey.h:205
void SetStageKeys(Aws::Vector< Aws::String > &&value)
Definition: ApiKey.h:366
ApiKey & WithValue(const Aws::String &value)
Definition: ApiKey.h:117
ApiKey & AddTags(Aws::String &&key, Aws::String &&value)
Definition: ApiKey.h:457