AWS SDK for C++  1.9.71
AWS SDK for C++
CreateTagsRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
11 #include <aws/ec2/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace EC2
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 "CreateTags"; }
33 
34  Aws::String SerializePayload() const override;
35 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
47  inline bool GetDryRun() const{ return m_dryRun; }
48 
55  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
56 
63  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
64 
71  inline CreateTagsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
72 
73 
78  inline const Aws::Vector<Aws::String>& GetResources() const{ return m_resources; }
79 
84  inline bool ResourcesHasBeenSet() const { return m_resourcesHasBeenSet; }
85 
90  inline void SetResources(const Aws::Vector<Aws::String>& value) { m_resourcesHasBeenSet = true; m_resources = value; }
91 
96  inline void SetResources(Aws::Vector<Aws::String>&& value) { m_resourcesHasBeenSet = true; m_resources = std::move(value); }
97 
102  inline CreateTagsRequest& WithResources(const Aws::Vector<Aws::String>& value) { SetResources(value); return *this;}
103 
108  inline CreateTagsRequest& WithResources(Aws::Vector<Aws::String>&& value) { SetResources(std::move(value)); return *this;}
109 
114  inline CreateTagsRequest& AddResources(const Aws::String& value) { m_resourcesHasBeenSet = true; m_resources.push_back(value); return *this; }
115 
120  inline CreateTagsRequest& AddResources(Aws::String&& value) { m_resourcesHasBeenSet = true; m_resources.push_back(std::move(value)); return *this; }
121 
126  inline CreateTagsRequest& AddResources(const char* value) { m_resourcesHasBeenSet = true; m_resources.push_back(value); return *this; }
127 
128 
134  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
135 
141  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
142 
148  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
149 
155  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
156 
162  inline CreateTagsRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
163 
169  inline CreateTagsRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
170 
176  inline CreateTagsRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
177 
183  inline CreateTagsRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
184 
185  private:
186 
187  bool m_dryRun;
188  bool m_dryRunHasBeenSet;
189 
190  Aws::Vector<Aws::String> m_resources;
191  bool m_resourcesHasBeenSet;
192 
193  Aws::Vector<Tag> m_tags;
194  bool m_tagsHasBeenSet;
195  };
196 
197 } // namespace Model
198 } // namespace EC2
199 } // namespace Aws
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::Tag
Definition: Tag.h:32
Aws::EC2::Model::CreateTagsRequest::GetDryRun
bool GetDryRun() const
Definition: CreateTagsRequest.h:47
Aws::EC2::Model::CreateTagsRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: CreateTagsRequest.h:148
Aws::EC2::Model::CreateTagsRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateTagsRequest.h:32
Aws::EC2::Model::CreateTagsRequest::ResourcesHasBeenSet
bool ResourcesHasBeenSet() const
Definition: CreateTagsRequest.h:84
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::CreateTagsRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::CreateTagsRequest::AddTags
CreateTagsRequest & AddTags(const Tag &value)
Definition: CreateTagsRequest.h:176
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSVector.h
Tag.h
Aws::EC2::Model::CreateTagsRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::EC2::Model::CreateTagsRequest::GetResources
const Aws::Vector< Aws::String > & GetResources() const
Definition: CreateTagsRequest.h:78
Aws::EC2::Model::CreateTagsRequest
Definition: CreateTagsRequest.h:24
Aws::EC2::Model::CreateTagsRequest::AddResources
CreateTagsRequest & AddResources(Aws::String &&value)
Definition: CreateTagsRequest.h:120
Aws::EC2::Model::CreateTagsRequest::AddResources
CreateTagsRequest & AddResources(const char *value)
Definition: CreateTagsRequest.h:126
Aws::EC2::Model::CreateTagsRequest::WithResources
CreateTagsRequest & WithResources(Aws::Vector< Aws::String > &&value)
Definition: CreateTagsRequest.h:108
Aws::EC2::Model::CreateTagsRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: CreateTagsRequest.h:134
Aws::EC2::Model::CreateTagsRequest::WithTags
CreateTagsRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: CreateTagsRequest.h:169
EC2Request.h
AWSString.h
Aws::EC2::Model::CreateTagsRequest::SetDryRun
void SetDryRun(bool value)
Definition: CreateTagsRequest.h:63
Aws::EC2::Model::CreateTagsRequest::WithTags
CreateTagsRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: CreateTagsRequest.h:162
Aws::EC2::Model::CreateTagsRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: CreateTagsRequest.h:141
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::CreateTagsRequest::SetResources
void SetResources(Aws::Vector< Aws::String > &&value)
Definition: CreateTagsRequest.h:96
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::CreateTagsRequest::WithResources
CreateTagsRequest & WithResources(const Aws::Vector< Aws::String > &value)
Definition: CreateTagsRequest.h:102
Aws::EC2::Model::CreateTagsRequest::WithDryRun
CreateTagsRequest & WithDryRun(bool value)
Definition: CreateTagsRequest.h:71
Aws::EC2::Model::CreateTagsRequest::SetResources
void SetResources(const Aws::Vector< Aws::String > &value)
Definition: CreateTagsRequest.h:90
Aws::EC2::Model::CreateTagsRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: CreateTagsRequest.h:55
EC2_EXPORTS.h
Aws::EC2::Model::CreateTagsRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: CreateTagsRequest.h:155
Aws::EC2::Model::CreateTagsRequest::CreateTagsRequest
CreateTagsRequest()
Aws::EC2::Model::CreateTagsRequest::AddTags
CreateTagsRequest & AddTags(Tag &&value)
Definition: CreateTagsRequest.h:183
Aws::EC2::Model::CreateTagsRequest::AddResources
CreateTagsRequest & AddResources(const Aws::String &value)
Definition: CreateTagsRequest.h:114