AWS SDK for C++  1.9.2
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 AccessAnalyzer
16 {
17 namespace Model
18 {
19 
26  {
27  public:
29 
30  // Service request name is the Operation name which will send this request out,
31  // each operation should has unique request name, so that we can get operation's name from this request.
32  // Note: this is not true for response, multiple operations may have the same response name,
33  // so we can not get operation's name from response.
34  inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
35 
36  Aws::String SerializePayload() const override;
37 
38 
42  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
43 
47  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
48 
52  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
53 
57  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
58 
62  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
63 
67  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
68 
72  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
73 
77  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
78 
79 
83  inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
84 
88  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
89 
93  inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
94 
98  inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
99 
103  inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
104 
108  inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
109 
113  inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
114 
118  inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
119 
123  inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
124 
128  inline TagResourceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
129 
133  inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
134 
138  inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
139 
143  inline TagResourceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
144 
145  private:
146 
147  Aws::String m_resourceArn;
148  bool m_resourceArnHasBeenSet;
149 
151  bool m_tagsHasBeenSet;
152  };
153 
154 } // namespace Model
155 } // namespace AccessAnalyzer
156 } // namespace Aws
Aws::AccessAnalyzer::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, const Aws::String &value)
Definition: TagResourceRequest.h:113
Aws::AccessAnalyzer::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:34
AccessAnalyzer_EXPORTS.h
Aws::AccessAnalyzer::AccessAnalyzerRequest
Definition: AccessAnalyzerRequest.h:17
Aws::AccessAnalyzer::Model::TagResourceRequest::GetTags
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition: TagResourceRequest.h:83
Aws::AccessAnalyzer::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:77
Aws::AccessAnalyzer::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::AccessAnalyzer::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:88
Aws::AccessAnalyzer::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:103
Aws::AccessAnalyzer::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, const char *value)
Definition: TagResourceRequest.h:143
Aws::AccessAnalyzer::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:57
AccessAnalyzerRequest.h
Aws::AccessAnalyzer::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, Aws::String &&value)
Definition: TagResourceRequest.h:128
Aws::AccessAnalyzer::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:108
AWSString.h
Aws::AccessAnalyzer::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:62
Aws::AccessAnalyzer::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:93
Aws::AccessAnalyzer::Model::TagResourceRequest::SetTags
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:98
Aws::AccessAnalyzer::Model::TagResourceRequest
Definition: TagResourceRequest.h:26
Aws::AccessAnalyzer::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws
Definition: AccessManagementClient.h:15
Aws::AccessAnalyzer::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:52
AWS_ACCESSANALYZER_API
#define AWS_ACCESSANALYZER_API
Definition: AccessAnalyzer_EXPORTS.h:28
Aws::AccessAnalyzer::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:67
Aws::AccessAnalyzer::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:72
Aws::AccessAnalyzer::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:47
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::AccessAnalyzer::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, Aws::String &&value)
Definition: TagResourceRequest.h:123
Aws::AccessAnalyzer::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:42
Aws::AccessAnalyzer::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const char *value)
Definition: TagResourceRequest.h:138
AWSMap.h
Aws::AccessAnalyzer::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, Aws::String &&value)
Definition: TagResourceRequest.h:133
Aws::AccessAnalyzer::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const Aws::String &value)
Definition: TagResourceRequest.h:118
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19