AWS SDK for C++  1.8.126
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 GuardDuty
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 
40  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
41 
46  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
47 
52  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
53 
58  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
59 
64  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
65 
70  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
71 
76  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
77 
82  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
83 
84 
88  inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
89 
93  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
94 
98  inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
99 
103  inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
104 
108  inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
109 
113  inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
114 
118  inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
119 
123  inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
124 
128  inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
129 
133  inline TagResourceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
134 
138  inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
139 
143  inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
144 
148  inline TagResourceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
149 
150  private:
151 
152  Aws::String m_resourceArn;
153  bool m_resourceArnHasBeenSet;
154 
156  bool m_tagsHasBeenSet;
157  };
158 
159 } // namespace Model
160 } // namespace GuardDuty
161 } // namespace Aws
Aws::GuardDuty::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:52
Aws::GuardDuty::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:40
Aws::GuardDuty::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const Aws::String &value)
Definition: TagResourceRequest.h:123
Aws::GuardDuty::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:46
Aws::GuardDuty::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const char *value)
Definition: TagResourceRequest.h:143
Aws::GuardDuty::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:70
Aws::GuardDuty::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:108
Aws::GuardDuty::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::GuardDuty::Model::TagResourceRequest::SetTags
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:103
Aws::GuardDuty::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, const Aws::String &value)
Definition: TagResourceRequest.h:118
Aws::GuardDuty::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::GuardDuty::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, Aws::String &&value)
Definition: TagResourceRequest.h:138
Aws::GuardDuty::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:58
GuardDuty_EXPORTS.h
Aws::GuardDuty::Model::TagResourceRequest
Definition: TagResourceRequest.h:23
Aws::GuardDuty::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:64
Aws::GuardDuty::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, Aws::String &&value)
Definition: TagResourceRequest.h:128
AWS_GUARDDUTY_API
#define AWS_GUARDDUTY_API
Definition: GuardDuty_EXPORTS.h:28
AWSString.h
Aws::GuardDuty::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:82
Aws::GuardDuty::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, const char *value)
Definition: TagResourceRequest.h:148
Aws::GuardDuty::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:31
Aws::GuardDuty::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:93
Aws::GuardDuty::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:76
Aws
Definition: AccessManagementClient.h:15
GuardDutyRequest.h
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::GuardDuty::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, Aws::String &&value)
Definition: TagResourceRequest.h:133
Aws::GuardDuty::Model::TagResourceRequest::GetTags
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition: TagResourceRequest.h:88
Aws::GuardDuty::GuardDutyRequest
Definition: GuardDutyRequest.h:17
AWSMap.h
Aws::GuardDuty::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:98
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19
Aws::GuardDuty::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:113