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/securityhub/SecurityHub_EXPORTS.h> 8 #include <aws/securityhub/SecurityHubRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSMap.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace SecurityHub 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_SECURITYHUB_API TagResourceRequest : public SecurityHubRequest 23 { 24 public: 25 TagResourceRequest(); 26 27 // Service request name is the Operation name which will send this request out, 28 // each operation should has unique request name, so that we can get operation's name from this request. 29 // Note: this is not true for response, multiple operations may have the same response name, 30 // so we can not get operation's name from response. GetServiceRequestName()31 inline virtual const char* GetServiceRequestName() const override { return "TagResource"; } 32 33 Aws::String SerializePayload() const override; 34 35 36 /** 37 * <p>The ARN of the resource to apply the tags to.</p> 38 */ GetResourceArn()39 inline const Aws::String& GetResourceArn() const{ return m_resourceArn; } 40 41 /** 42 * <p>The ARN of the resource to apply the tags to.</p> 43 */ ResourceArnHasBeenSet()44 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } 45 46 /** 47 * <p>The ARN of the resource to apply the tags to.</p> 48 */ SetResourceArn(const Aws::String & value)49 inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } 50 51 /** 52 * <p>The ARN of the resource to apply the tags to.</p> 53 */ SetResourceArn(Aws::String && value)54 inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } 55 56 /** 57 * <p>The ARN of the resource to apply the tags to.</p> 58 */ SetResourceArn(const char * value)59 inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } 60 61 /** 62 * <p>The ARN of the resource to apply the tags to.</p> 63 */ WithResourceArn(const Aws::String & value)64 inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;} 65 66 /** 67 * <p>The ARN of the resource to apply the tags to.</p> 68 */ WithResourceArn(Aws::String && value)69 inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;} 70 71 /** 72 * <p>The ARN of the resource to apply the tags to.</p> 73 */ WithResourceArn(const char * value)74 inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} 75 76 77 /** 78 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 79 * keys can be no longer than 128 characters. The tag values can be no longer than 80 * 256 characters.</p> 81 */ GetTags()82 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; } 83 84 /** 85 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 86 * keys can be no longer than 128 characters. The tag values can be no longer than 87 * 256 characters.</p> 88 */ TagsHasBeenSet()89 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 90 91 /** 92 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 93 * keys can be no longer than 128 characters. The tag values can be no longer than 94 * 256 characters.</p> 95 */ SetTags(const Aws::Map<Aws::String,Aws::String> & value)96 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; } 97 98 /** 99 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 100 * keys can be no longer than 128 characters. The tag values can be no longer than 101 * 256 characters.</p> 102 */ SetTags(Aws::Map<Aws::String,Aws::String> && value)103 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 104 105 /** 106 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 107 * keys can be no longer than 128 characters. The tag values can be no longer than 108 * 256 characters.</p> 109 */ WithTags(const Aws::Map<Aws::String,Aws::String> & value)110 inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;} 111 112 /** 113 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 114 * keys can be no longer than 128 characters. The tag values can be no longer than 115 * 256 characters.</p> 116 */ WithTags(Aws::Map<Aws::String,Aws::String> && value)117 inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;} 118 119 /** 120 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 121 * keys can be no longer than 128 characters. The tag values can be no longer than 122 * 256 characters.</p> 123 */ AddTags(const Aws::String & key,const Aws::String & value)124 inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 125 126 /** 127 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 128 * keys can be no longer than 128 characters. The tag values can be no longer than 129 * 256 characters.</p> 130 */ AddTags(Aws::String && key,const Aws::String & value)131 inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 132 133 /** 134 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 135 * keys can be no longer than 128 characters. The tag values can be no longer than 136 * 256 characters.</p> 137 */ AddTags(const Aws::String & key,Aws::String && value)138 inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 139 140 /** 141 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 142 * keys can be no longer than 128 characters. The tag values can be no longer than 143 * 256 characters.</p> 144 */ AddTags(Aws::String && key,Aws::String && value)145 inline TagResourceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } 146 147 /** 148 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 149 * keys can be no longer than 128 characters. The tag values can be no longer than 150 * 256 characters.</p> 151 */ AddTags(const char * key,Aws::String && value)152 inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 153 154 /** 155 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 156 * keys can be no longer than 128 characters. The tag values can be no longer than 157 * 256 characters.</p> 158 */ AddTags(Aws::String && key,const char * value)159 inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 160 161 /** 162 * <p>The tags to add to the resource. You can add up to 50 tags at a time. The tag 163 * keys can be no longer than 128 characters. The tag values can be no longer than 164 * 256 characters.</p> 165 */ AddTags(const char * key,const char * value)166 inline TagResourceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 167 168 private: 169 170 Aws::String m_resourceArn; 171 bool m_resourceArnHasBeenSet; 172 173 Aws::Map<Aws::String, Aws::String> m_tags; 174 bool m_tagsHasBeenSet; 175 }; 176 177 } // namespace Model 178 } // namespace SecurityHub 179 } // namespace Aws 180