AWS SDK for C++  1.9.107
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 OpsWorks
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 
36 
37 
41  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
42 
46  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
47 
51  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
52 
56  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
57 
61  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
62 
66  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
67 
71  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
72 
76  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
77 
78 
90  inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
91 
103  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
104 
116  inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
117 
129  inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
130 
142  inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
143 
155  inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
156 
168  inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
169 
181  inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
182 
194  inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
195 
207  inline TagResourceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
208 
220  inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
221 
233  inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
234 
246  inline TagResourceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
247 
248  private:
249 
250  Aws::String m_resourceArn;
251  bool m_resourceArnHasBeenSet;
252 
254  bool m_tagsHasBeenSet;
255  };
256 
257 } // namespace Model
258 } // namespace OpsWorks
259 } // namespace Aws
Aws::OpsWorks::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:56
Aws::OpsWorks::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:41
Aws::OpsWorks::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:155
Aws::OpsWorks::Model::TagResourceRequest::SetTags
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:129
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::OpsWorks::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, Aws::String &&value)
Definition: TagResourceRequest.h:220
OpsWorks_EXPORTS.h
Aws::OpsWorks::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, Aws::String &&value)
Definition: TagResourceRequest.h:207
Aws::OpsWorks::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:51
Aws::OpsWorks::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:142
Aws::OpsWorks::Model::TagResourceRequest::GetTags
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition: TagResourceRequest.h:90
Aws::OpsWorks::Model::TagResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::OpsWorks::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:76
Aws::OpsWorks::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:66
Aws::OpsWorks::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:71
AWS_OPSWORKS_API
#define AWS_OPSWORKS_API
Definition: OpsWorks_EXPORTS.h:28
Aws::OpsWorks::OpsWorksRequest
Definition: OpsWorksRequest.h:17
Aws::OpsWorks::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
OpsWorksRequest.h
Aws::OpsWorks::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, const Aws::String &value)
Definition: TagResourceRequest.h:168
Aws::OpsWorks::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, Aws::String &&value)
Definition: TagResourceRequest.h:194
AWSString.h
Aws::OpsWorks::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:116
Aws::OpsWorks::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, const char *value)
Definition: TagResourceRequest.h:246
Aws::OpsWorks::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const char *value)
Definition: TagResourceRequest.h:233
Aws
Definition: AccessManagementClient.h:15
Aws::OpsWorks::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:31
Aws::OpsWorks::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::OpsWorks::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:103
Aws::OpsWorks::Model::TagResourceRequest
Definition: TagResourceRequest.h:23
Aws::OpsWorks::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const Aws::String &value)
Definition: TagResourceRequest.h:181
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::OpsWorks::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:46
AWSMap.h
Aws::OpsWorks::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:61
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19