AWS SDK for C++  1.9.40
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 
46  inline const ResourceTypeForTagging& GetResourceType() const{ return m_resourceType; }
47 
54  inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
55 
62  inline void SetResourceType(const ResourceTypeForTagging& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
63 
70  inline void SetResourceType(ResourceTypeForTagging&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
71 
78  inline AddTagsToResourceRequest& WithResourceType(const ResourceTypeForTagging& value) { SetResourceType(value); return *this;}
79 
86  inline AddTagsToResourceRequest& WithResourceType(ResourceTypeForTagging&& value) { SetResourceType(std::move(value)); return *this;}
87 
88 
105  inline const Aws::String& GetResourceId() const{ return m_resourceId; }
106 
123  inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
124 
141  inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
142 
159  inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); }
160 
177  inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); }
178 
195  inline AddTagsToResourceRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}
196 
213  inline AddTagsToResourceRequest& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;}
214 
231  inline AddTagsToResourceRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;}
232 
233 
238  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
239 
244  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
245 
250  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
251 
256  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
257 
262  inline AddTagsToResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
263 
268  inline AddTagsToResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
269 
274  inline AddTagsToResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
275 
280  inline AddTagsToResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
281 
282  private:
283 
284  ResourceTypeForTagging m_resourceType;
285  bool m_resourceTypeHasBeenSet;
286 
287  Aws::String m_resourceId;
288  bool m_resourceIdHasBeenSet;
289 
290  Aws::Vector<Tag> m_tags;
291  bool m_tagsHasBeenSet;
292  };
293 
294 } // namespace Model
295 } // namespace SSM
296 } // namespace Aws
Aws::SSM::Model::AddTagsToResourceRequest::WithTags
AddTagsToResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: AddTagsToResourceRequest.h:262
Aws::SSM::Model::AddTagsToResourceRequest::SetResourceType
void SetResourceType(const ResourceTypeForTagging &value)
Definition: AddTagsToResourceRequest.h:62
Aws::SSM::Model::AddTagsToResourceRequest::AddTagsToResourceRequest
AddTagsToResourceRequest()
Aws::SSM::Model::AddTagsToResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: AddTagsToResourceRequest.h:250
Aws::SSM::Model::AddTagsToResourceRequest::WithTags
AddTagsToResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: AddTagsToResourceRequest.h:268
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:105
Tag.h
Aws::SSM::Model::AddTagsToResourceRequest::SetResourceId
void SetResourceId(const Aws::String &value)
Definition: AddTagsToResourceRequest.h:141
Aws::SSM::Model::AddTagsToResourceRequest::ResourceTypeHasBeenSet
bool ResourceTypeHasBeenSet() const
Definition: AddTagsToResourceRequest.h:54
Aws::SSM::Model::AddTagsToResourceRequest::WithResourceId
AddTagsToResourceRequest & WithResourceId(const Aws::String &value)
Definition: AddTagsToResourceRequest.h:195
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:231
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:159
Aws::SSM::Model::AddTagsToResourceRequest::WithResourceType
AddTagsToResourceRequest & WithResourceType(ResourceTypeForTagging &&value)
Definition: AddTagsToResourceRequest.h:86
Aws::SSM::Model::AddTagsToResourceRequest::ResourceIdHasBeenSet
bool ResourceIdHasBeenSet() const
Definition: AddTagsToResourceRequest.h:123
Aws::SSM::Model::AddTagsToResourceRequest::GetResourceType
const ResourceTypeForTagging & GetResourceType() const
Definition: AddTagsToResourceRequest.h:46
AWSString.h
Aws::SSM::Model::AddTagsToResourceRequest::AddTags
AddTagsToResourceRequest & AddTags(Tag &&value)
Definition: AddTagsToResourceRequest.h:280
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:256
Aws::SSM::Model::AddTagsToResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: AddTagsToResourceRequest.h:238
Aws::SSM::Model::AddTagsToResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: AddTagsToResourceRequest.h:244
Aws::SSM::Model::AddTagsToResourceRequest::SetResourceId
void SetResourceId(const char *value)
Definition: AddTagsToResourceRequest.h:177
Aws::SSM::Model::Tag
Definition: Tag.h:36
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:78
Aws::SSM::Model::AddTagsToResourceRequest::SetResourceType
void SetResourceType(ResourceTypeForTagging &&value)
Definition: AddTagsToResourceRequest.h:70
Aws::SSM::Model::AddTagsToResourceRequest::WithResourceId
AddTagsToResourceRequest & WithResourceId(Aws::String &&value)
Definition: AddTagsToResourceRequest.h:213
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:274
SSMRequest.h