AWS SDK for C++  1.9.1
AWS SDK for C++
AddTagsToResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <aws/ds/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace DirectoryService
17 {
18 namespace Model
19 {
20 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "AddTagsToResource"; }
33 
34  Aws::String SerializePayload() const override;
35 
37 
38 
42  inline const Aws::String& GetResourceId() const{ return m_resourceId; }
43 
47  inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
48 
52  inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
53 
57  inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); }
58 
62  inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); }
63 
67  inline AddTagsToResourceRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}
68 
72  inline AddTagsToResourceRequest& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;}
73 
77  inline AddTagsToResourceRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;}
78 
79 
83  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
84 
88  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
89 
93  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
94 
98  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
99 
103  inline AddTagsToResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
104 
108  inline AddTagsToResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
109 
113  inline AddTagsToResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
114 
118  inline AddTagsToResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
119 
120  private:
121 
122  Aws::String m_resourceId;
123  bool m_resourceIdHasBeenSet;
124 
125  Aws::Vector<Tag> m_tags;
126  bool m_tagsHasBeenSet;
127  };
128 
129 } // namespace Model
130 } // namespace DirectoryService
131 } // namespace Aws
Aws::DirectoryService::Model::AddTagsToResourceRequest::WithResourceId
AddTagsToResourceRequest & WithResourceId(const Aws::String &value)
Definition: AddTagsToResourceRequest.h:67
Aws::DirectoryService::Model::AddTagsToResourceRequest::WithResourceId
AddTagsToResourceRequest & WithResourceId(Aws::String &&value)
Definition: AddTagsToResourceRequest.h:72
AWS_DIRECTORYSERVICE_API
#define AWS_DIRECTORYSERVICE_API
Definition: DirectoryService_EXPORTS.h:28
Aws::DirectoryService::Model::AddTagsToResourceRequest::AddTags
AddTagsToResourceRequest & AddTags(Tag &&value)
Definition: AddTagsToResourceRequest.h:118
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::DirectoryService::Model::AddTagsToResourceRequest::SetResourceId
void SetResourceId(const char *value)
Definition: AddTagsToResourceRequest.h:62
DirectoryService_EXPORTS.h
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::DirectoryService::Model::AddTagsToResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: AddTagsToResourceRequest.h:83
AWSVector.h
Aws::DirectoryService::DirectoryServiceRequest
Definition: DirectoryServiceRequest.h:17
Aws::DirectoryService::Model::AddTagsToResourceRequest::SetResourceId
void SetResourceId(Aws::String &&value)
Definition: AddTagsToResourceRequest.h:57
Tag.h
Aws::DirectoryService::Model::AddTagsToResourceRequest
Definition: AddTagsToResourceRequest.h:24
Aws::DirectoryService::Model::AddTagsToResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: AddTagsToResourceRequest.h:93
Aws::DirectoryService::Model::AddTagsToResourceRequest::ResourceIdHasBeenSet
bool ResourceIdHasBeenSet() const
Definition: AddTagsToResourceRequest.h:47
Aws::DirectoryService::Model::AddTagsToResourceRequest::GetResourceId
const Aws::String & GetResourceId() const
Definition: AddTagsToResourceRequest.h:42
Aws::DirectoryService::Model::AddTagsToResourceRequest::AddTags
AddTagsToResourceRequest & AddTags(const Tag &value)
Definition: AddTagsToResourceRequest.h:113
Aws::DirectoryService::Model::AddTagsToResourceRequest::SetResourceId
void SetResourceId(const Aws::String &value)
Definition: AddTagsToResourceRequest.h:52
Aws::DirectoryService::Model::AddTagsToResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: AddTagsToResourceRequest.h:98
AWSString.h
Aws::DirectoryService::Model::AddTagsToResourceRequest::WithResourceId
AddTagsToResourceRequest & WithResourceId(const char *value)
Definition: AddTagsToResourceRequest.h:77
Aws::DirectoryService::Model::AddTagsToResourceRequest::AddTagsToResourceRequest
AddTagsToResourceRequest()
Aws::DirectoryService::Model::AddTagsToResourceRequest::WithTags
AddTagsToResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: AddTagsToResourceRequest.h:108
Aws::DirectoryService::Model::AddTagsToResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: AddTagsToResourceRequest.h:32
Aws::DirectoryService::Model::Tag
Definition: Tag.h:33
Aws::DirectoryService::Model::AddTagsToResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::DirectoryService::Model::AddTagsToResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::DirectoryService::Model::AddTagsToResourceRequest::WithTags
AddTagsToResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: AddTagsToResourceRequest.h:103
Aws
Definition: AccessManagementClient.h:15
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
DirectoryServiceRequest.h
Aws::DirectoryService::Model::AddTagsToResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: AddTagsToResourceRequest.h:88