AWS SDK for C++  1.9.108
AWS SDK for C++
TagResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Organizations
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 "TagResource"; }
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 TagResourceRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}
68 
72  inline TagResourceRequest& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;}
73 
77  inline TagResourceRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;}
78 
79 
95  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
96 
112  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
113 
129  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
130 
146  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
147 
163  inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
164 
180  inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
181 
197  inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
198 
214  inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
215 
216  private:
217 
218  Aws::String m_resourceId;
219  bool m_resourceIdHasBeenSet;
220 
221  Aws::Vector<Tag> m_tags;
222  bool m_tagsHasBeenSet;
223  };
224 
225 } // namespace Model
226 } // namespace Organizations
227 } // namespace Aws
Aws::Organizations::Model::TagResourceRequest
Definition: TagResourceRequest.h:24
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::Organizations::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:112
Aws::Organizations::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::Organizations::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::Organizations::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:129
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSVector.h
Aws::Organizations::Model::TagResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: TagResourceRequest.h:95
AWS_ORGANIZATIONS_API
#define AWS_ORGANIZATIONS_API
Definition: Organizations_EXPORTS.h:28
Aws::Organizations::Model::TagResourceRequest::WithResourceId
TagResourceRequest & WithResourceId(Aws::String &&value)
Definition: TagResourceRequest.h:72
Aws::Organizations::OrganizationsRequest
Definition: OrganizationsRequest.h:17
Aws::Organizations::Model::TagResourceRequest::SetResourceId
void SetResourceId(Aws::String &&value)
Definition: TagResourceRequest.h:57
AWSString.h
Aws::Organizations::Model::TagResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::Organizations::Model::TagResourceRequest::SetResourceId
void SetResourceId(const Aws::String &value)
Definition: TagResourceRequest.h:52
Aws::Organizations::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Tag &value)
Definition: TagResourceRequest.h:197
Aws::Organizations::Model::TagResourceRequest::GetResourceId
const Aws::String & GetResourceId() const
Definition: TagResourceRequest.h:42
Aws::Organizations::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:163
Aws::Organizations::Model::TagResourceRequest::SetResourceId
void SetResourceId(const char *value)
Definition: TagResourceRequest.h:62
Tag.h
Aws::Organizations::Model::Tag
Definition: Tag.h:36
Aws::Organizations::Model::TagResourceRequest::WithResourceId
TagResourceRequest & WithResourceId(const Aws::String &value)
Definition: TagResourceRequest.h:67
Aws::Organizations::Model::TagResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:146
Aws
Definition: AccessManagementClient.h:15
Aws::Organizations::Model::TagResourceRequest::WithResourceId
TagResourceRequest & WithResourceId(const char *value)
Definition: TagResourceRequest.h:77
Aws::Organizations::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:32
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Organizations::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Tag &&value)
Definition: TagResourceRequest.h:214
Organizations_EXPORTS.h
Aws::Organizations::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:180
Aws::Organizations::Model::TagResourceRequest::ResourceIdHasBeenSet
bool ResourceIdHasBeenSet() const
Definition: TagResourceRequest.h:47
OrganizationsRequest.h