AWS SDK for C++  1.9.107
AWS SDK for C++
AddTagsToResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ssm/SSM_EXPORTS.h>
8 #include <aws/ssm/SSMRequest.h>
12 #include <aws/ssm/model/Tag.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace SSM
18 {
19 namespace Model
20 {
21 
25  {
26  public:
28 
29  // Service request name is the Operation name which will send this request out,
30  // each operation should has unique request name, so that we can get operation's name from this request.
31  // Note: this is not true for response, multiple operations may have the same response name,
32  // so we can not get operation's name from response.
33  inline virtual const char* GetServiceRequestName() const override { return "AddTagsToResource"; }
34 
35  Aws::String SerializePayload() const override;
36 
38 
39 
47  inline const ResourceTypeForTagging& GetResourceType() const{ return m_resourceType; }
48 
56  inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
57 
65  inline void SetResourceType(const ResourceTypeForTagging& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
66 
74  inline void SetResourceType(ResourceTypeForTagging&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
75 
83  inline AddTagsToResourceRequest& WithResourceType(const ResourceTypeForTagging& value) { SetResourceType(value); return *this;}
84 
92  inline AddTagsToResourceRequest& WithResourceType(ResourceTypeForTagging&& value) { SetResourceType(std::move(value)); return *this;}
93 
94 
114  inline const Aws::String& GetResourceId() const{ return m_resourceId; }
115 
135  inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
136 
156  inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
157 
177  inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); }
178 
198  inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); }
199 
219  inline AddTagsToResourceRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}
220 
240  inline AddTagsToResourceRequest& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;}
241 
261  inline AddTagsToResourceRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;}
262 
263 
268  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
269 
274  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
275 
280  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
281 
286  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
287 
292  inline AddTagsToResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
293 
298  inline AddTagsToResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
299 
304  inline AddTagsToResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
305 
310  inline AddTagsToResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
311 
312  private:
313 
314  ResourceTypeForTagging m_resourceType;
315  bool m_resourceTypeHasBeenSet;
316 
317  Aws::String m_resourceId;
318  bool m_resourceIdHasBeenSet;
319 
320  Aws::Vector<Tag> m_tags;
321  bool m_tagsHasBeenSet;
322  };
323 
324 } // namespace Model
325 } // namespace SSM
326 } // namespace Aws
Aws::SSM::Model::AddTagsToResourceRequest::WithTags
AddTagsToResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: AddTagsToResourceRequest.h:292
Aws::SSM::Model::AddTagsToResourceRequest::SetResourceType
void SetResourceType(const ResourceTypeForTagging &value)
Definition: AddTagsToResourceRequest.h:65
Aws::SSM::Model::AddTagsToResourceRequest::AddTagsToResourceRequest
AddTagsToResourceRequest()
Aws::SSM::Model::AddTagsToResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: AddTagsToResourceRequest.h:280
Aws::SSM::Model::AddTagsToResourceRequest::WithTags
AddTagsToResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: AddTagsToResourceRequest.h:298
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
ResourceTypeForTagging.h
AWS_SSM_API
#define AWS_SSM_API
Definition: SSM_EXPORTS.h:28
Aws::SSM::Model::AddTagsToResourceRequest::GetResourceId
const Aws::String & GetResourceId() const
Definition: AddTagsToResourceRequest.h:114
Tag.h
Aws::SSM::Model::AddTagsToResourceRequest::SetResourceId
void SetResourceId(const Aws::String &value)
Definition: AddTagsToResourceRequest.h:156
Aws::SSM::Model::AddTagsToResourceRequest::ResourceTypeHasBeenSet
bool ResourceTypeHasBeenSet() const
Definition: AddTagsToResourceRequest.h:56
Aws::SSM::Model::AddTagsToResourceRequest::WithResourceId
AddTagsToResourceRequest & WithResourceId(const Aws::String &value)
Definition: AddTagsToResourceRequest.h:219
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
SSM_EXPORTS.h
AWSVector.h
Aws::SSM::Model::AddTagsToResourceRequest::WithResourceId
AddTagsToResourceRequest & WithResourceId(const char *value)
Definition: AddTagsToResourceRequest.h:261
Aws::SSM::Model::AddTagsToResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::SSM::Model::AddTagsToResourceRequest
Definition: AddTagsToResourceRequest.h:25
Aws::SSM::Model::AddTagsToResourceRequest::SetResourceId
void SetResourceId(Aws::String &&value)
Definition: AddTagsToResourceRequest.h:177
Aws::SSM::Model::AddTagsToResourceRequest::WithResourceType
AddTagsToResourceRequest & WithResourceType(ResourceTypeForTagging &&value)
Definition: AddTagsToResourceRequest.h:92
Aws::SSM::Model::AddTagsToResourceRequest::ResourceIdHasBeenSet
bool ResourceIdHasBeenSet() const
Definition: AddTagsToResourceRequest.h:135
Aws::SSM::Model::AddTagsToResourceRequest::GetResourceType
const ResourceTypeForTagging & GetResourceType() const
Definition: AddTagsToResourceRequest.h:47
AWSString.h
Aws::SSM::Model::AddTagsToResourceRequest::AddTags
AddTagsToResourceRequest & AddTags(Tag &&value)
Definition: AddTagsToResourceRequest.h:310
Aws::SMS::Model::AppValidationStrategy::NOT_SET
@ NOT_SET
Aws::SSM::Model::ResourceTypeForTagging
ResourceTypeForTagging
Definition: ResourceTypeForTagging.h:17
Aws::SSM::Model::AddTagsToResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: AddTagsToResourceRequest.h:286
Aws::SSM::Model::AddTagsToResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: AddTagsToResourceRequest.h:268
Aws::SSM::Model::AddTagsToResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: AddTagsToResourceRequest.h:274
Aws::SSM::Model::AddTagsToResourceRequest::SetResourceId
void SetResourceId(const char *value)
Definition: AddTagsToResourceRequest.h:198
Aws::SSM::Model::Tag
Definition: Tag.h:37
Aws
Definition: AccessManagementClient.h:15
Aws::SSM::Model::AddTagsToResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: AddTagsToResourceRequest.h:33
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::SSM::Model::AddTagsToResourceRequest::WithResourceType
AddTagsToResourceRequest & WithResourceType(const ResourceTypeForTagging &value)
Definition: AddTagsToResourceRequest.h:83
Aws::SSM::Model::AddTagsToResourceRequest::SetResourceType
void SetResourceType(ResourceTypeForTagging &&value)
Definition: AddTagsToResourceRequest.h:74
Aws::SSM::Model::AddTagsToResourceRequest::WithResourceId
AddTagsToResourceRequest & WithResourceId(Aws::String &&value)
Definition: AddTagsToResourceRequest.h:240
Aws::SSM::Model::AddTagsToResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::SSM::SSMRequest
Definition: SSMRequest.h:17
Aws::SSM::Model::AddTagsToResourceRequest::AddTags
AddTagsToResourceRequest & AddTags(const Tag &value)
Definition: AddTagsToResourceRequest.h:304
SSMRequest.h