1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/pinpoint/Pinpoint_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSMap.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace Pinpoint 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Specifies the tags (keys and values) for an application, campaign, message 29 * template, or segment.</p><p><h3>See Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/TagsModel">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_PINPOINT_API TagsModel 34 { 35 public: 36 TagsModel(); 37 TagsModel(Aws::Utils::Json::JsonView jsonValue); 38 TagsModel& operator=(Aws::Utils::Json::JsonView jsonValue); 39 Aws::Utils::Json::JsonValue Jsonize() const; 40 41 42 /** 43 * <p>A string-to-string map of key-value pairs that defines the tags for an 44 * application, campaign, message template, or segment. Each of these resources can 45 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 46 * associated tag value. The maximum length of a tag key is 128 characters. The 47 * maximum length of a tag value is 256 characters.</p> 48 */ GetTags()49 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; } 50 51 /** 52 * <p>A string-to-string map of key-value pairs that defines the tags for an 53 * application, campaign, message template, or segment. Each of these resources can 54 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 55 * associated tag value. The maximum length of a tag key is 128 characters. The 56 * maximum length of a tag value is 256 characters.</p> 57 */ TagsHasBeenSet()58 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 59 60 /** 61 * <p>A string-to-string map of key-value pairs that defines the tags for an 62 * application, campaign, message template, or segment. Each of these resources can 63 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 64 * associated tag value. The maximum length of a tag key is 128 characters. The 65 * maximum length of a tag value is 256 characters.</p> 66 */ SetTags(const Aws::Map<Aws::String,Aws::String> & value)67 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; } 68 69 /** 70 * <p>A string-to-string map of key-value pairs that defines the tags for an 71 * application, campaign, message template, or segment. Each of these resources can 72 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 73 * associated tag value. The maximum length of a tag key is 128 characters. The 74 * maximum length of a tag value is 256 characters.</p> 75 */ SetTags(Aws::Map<Aws::String,Aws::String> && value)76 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 77 78 /** 79 * <p>A string-to-string map of key-value pairs that defines the tags for an 80 * application, campaign, message template, or segment. Each of these resources can 81 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 82 * associated tag value. The maximum length of a tag key is 128 characters. The 83 * maximum length of a tag value is 256 characters.</p> 84 */ WithTags(const Aws::Map<Aws::String,Aws::String> & value)85 inline TagsModel& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;} 86 87 /** 88 * <p>A string-to-string map of key-value pairs that defines the tags for an 89 * application, campaign, message template, or segment. Each of these resources can 90 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 91 * associated tag value. The maximum length of a tag key is 128 characters. The 92 * maximum length of a tag value is 256 characters.</p> 93 */ WithTags(Aws::Map<Aws::String,Aws::String> && value)94 inline TagsModel& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;} 95 96 /** 97 * <p>A string-to-string map of key-value pairs that defines the tags for an 98 * application, campaign, message template, or segment. Each of these resources can 99 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 100 * associated tag value. The maximum length of a tag key is 128 characters. The 101 * maximum length of a tag value is 256 characters.</p> 102 */ AddTags(const Aws::String & key,const Aws::String & value)103 inline TagsModel& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 104 105 /** 106 * <p>A string-to-string map of key-value pairs that defines the tags for an 107 * application, campaign, message template, or segment. Each of these resources can 108 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 109 * associated tag value. The maximum length of a tag key is 128 characters. The 110 * maximum length of a tag value is 256 characters.</p> 111 */ AddTags(Aws::String && key,const Aws::String & value)112 inline TagsModel& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 113 114 /** 115 * <p>A string-to-string map of key-value pairs that defines the tags for an 116 * application, campaign, message template, or segment. Each of these resources can 117 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 118 * associated tag value. The maximum length of a tag key is 128 characters. The 119 * maximum length of a tag value is 256 characters.</p> 120 */ AddTags(const Aws::String & key,Aws::String && value)121 inline TagsModel& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 122 123 /** 124 * <p>A string-to-string map of key-value pairs that defines the tags for an 125 * application, campaign, message template, or segment. Each of these resources can 126 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 127 * associated tag value. The maximum length of a tag key is 128 characters. The 128 * maximum length of a tag value is 256 characters.</p> 129 */ AddTags(Aws::String && key,Aws::String && value)130 inline TagsModel& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } 131 132 /** 133 * <p>A string-to-string map of key-value pairs that defines the tags for an 134 * application, campaign, message template, or segment. Each of these resources can 135 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 136 * associated tag value. The maximum length of a tag key is 128 characters. The 137 * maximum length of a tag value is 256 characters.</p> 138 */ AddTags(const char * key,Aws::String && value)139 inline TagsModel& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 140 141 /** 142 * <p>A string-to-string map of key-value pairs that defines the tags for an 143 * application, campaign, message template, or segment. Each of these resources can 144 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 145 * associated tag value. The maximum length of a tag key is 128 characters. The 146 * maximum length of a tag value is 256 characters.</p> 147 */ AddTags(Aws::String && key,const char * value)148 inline TagsModel& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 149 150 /** 151 * <p>A string-to-string map of key-value pairs that defines the tags for an 152 * application, campaign, message template, or segment. Each of these resources can 153 * have a maximum of 50 tags.</p> <p>Each tag consists of a required tag key and an 154 * associated tag value. The maximum length of a tag key is 128 characters. The 155 * maximum length of a tag value is 256 characters.</p> 156 */ AddTags(const char * key,const char * value)157 inline TagsModel& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 158 159 private: 160 161 Aws::Map<Aws::String, Aws::String> m_tags; 162 bool m_tagsHasBeenSet; 163 }; 164 165 } // namespace Model 166 } // namespace Pinpoint 167 } // namespace Aws 168