AWS SDK for C++  1.9.156
AWS SDK for C++
TagResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace SecurityHub
16 {
17 namespace Model
18 {
19 
23  {
24  public:
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.
31  inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
32 
33  Aws::String SerializePayload() const override;
34 
35 
39  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
40 
44  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
45 
49  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
50 
54  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
55 
59  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
60 
64  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
65 
69  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
70 
74  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
75 
76 
82  inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
83 
89  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
90 
96  inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
97 
103  inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
104 
110  inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
111 
117  inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
118 
124  inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
125 
131  inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
132 
138  inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
139 
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 
152  inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
153 
159  inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
160 
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 
174  bool m_tagsHasBeenSet;
175  };
176 
177 } // namespace Model
178 } // namespace SecurityHub
179 } // namespace Aws
Aws::SecurityHub::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:54
Aws::SecurityHub::Model::TagResourceRequest
Definition: TagResourceRequest.h:23
Aws::SecurityHub::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:117
Aws::SecurityHub::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const char *value)
Definition: TagResourceRequest.h:159
AWS_SECURITYHUB_API
#define AWS_SECURITYHUB_API
Definition: SecurityHub_EXPORTS.h:28
Aws::SecurityHub::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:44
Aws::SecurityHub::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:74
Aws::SecurityHub::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:110
Aws::SecurityHub::SecurityHubRequest
Definition: SecurityHubRequest.h:17
Aws::SecurityHub::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:59
AWSString.h
SecurityHubRequest.h
Aws::SecurityHub::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, Aws::String &&value)
Definition: TagResourceRequest.h:145
Aws::SecurityHub::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:96
Aws::SecurityHub::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:49
Aws::SecurityHub::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::SecurityHub::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:39
Aws::SecurityHub::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, const Aws::String &value)
Definition: TagResourceRequest.h:124
Aws::SecurityHub::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:89
Aws::SecurityHub::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, Aws::String &&value)
Definition: TagResourceRequest.h:138
Aws::SecurityHub::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::SecurityHub::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:31
Aws
Definition: AccessManagementClient.h:15
Aws::SecurityHub::Model::TagResourceRequest::GetTags
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition: TagResourceRequest.h:82
Aws::SecurityHub::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const Aws::String &value)
Definition: TagResourceRequest.h:131
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::SecurityHub::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, Aws::String &&value)
Definition: TagResourceRequest.h:152
Aws::SecurityHub::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:69
Aws::SecurityHub::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:64
SecurityHub_EXPORTS.h
Aws::SecurityHub::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, const char *value)
Definition: TagResourceRequest.h:166
Aws::SecurityHub::Model::TagResourceRequest::SetTags
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:103
AWSMap.h
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19