AWS SDK for C++  1.9.74
AWS SDK for C++
TagSpecification.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
11 #include <aws/ec2/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Xml
19 {
20  class XmlNode;
21 } // namespace Xml
22 } // namespace Utils
23 namespace EC2
24 {
25 namespace Model
26 {
27 
35  {
36  public:
40 
41  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42  void OutputToStream(Aws::OStream& oStream, const char* location) const;
43 
44 
77  inline const ResourceType& GetResourceType() const{ return m_resourceType; }
78 
111  inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
112 
145  inline void SetResourceType(const ResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
146 
179  inline void SetResourceType(ResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
180 
213  inline TagSpecification& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;}
214 
247  inline TagSpecification& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;}
248 
249 
253  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
254 
258  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
259 
263  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
264 
268  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
269 
273  inline TagSpecification& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
274 
278  inline TagSpecification& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
279 
283  inline TagSpecification& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
284 
288  inline TagSpecification& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
289 
290  private:
291 
292  ResourceType m_resourceType;
293  bool m_resourceTypeHasBeenSet;
294 
295  Aws::Vector<Tag> m_tags;
296  bool m_tagsHasBeenSet;
297  };
298 
299 } // namespace Model
300 } // namespace EC2
301 } // namespace Aws
Aws::EC2::Model::TagSpecification::TagSpecification
TagSpecification()
Aws::EC2::Model::Tag
Definition: Tag.h:32
Aws::EC2::Model::ResourceType
ResourceType
Definition: ResourceType.h:17
Aws::EC2::Model::TagSpecification::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagSpecification.h:258
Aws::EC2::Model::TagSpecification::operator=
TagSpecification & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::TagSpecification::AddTags
TagSpecification & AddTags(Tag &&value)
Definition: TagSpecification.h:288
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::TagSpecification::SetResourceType
void SetResourceType(const ResourceType &value)
Definition: TagSpecification.h:145
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSStreamFwd.h
AWSVector.h
Tag.h
Aws::EC2::Model::TagSpecification::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::EC2::Model::TagSpecification::GetResourceType
const ResourceType & GetResourceType() const
Definition: TagSpecification.h:77
Aws::EC2::Model::TagSpecification::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::EC2::Model::TagSpecification::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: TagSpecification.h:268
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::TagSpecification::WithResourceType
TagSpecification & WithResourceType(const ResourceType &value)
Definition: TagSpecification.h:213
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::EC2::Model::TagSpecification::AddTags
TagSpecification & AddTags(const Tag &value)
Definition: TagSpecification.h:283
Aws::EC2::Model::TagSpecification::WithTags
TagSpecification & WithTags(const Aws::Vector< Tag > &value)
Definition: TagSpecification.h:273
Aws::EC2::Model::TagSpecification::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagSpecification.h:263
ResourceType.h
Aws::EC2::Model::TagSpecification::TagSpecification
TagSpecification(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::TagSpecification::SetResourceType
void SetResourceType(ResourceType &&value)
Definition: TagSpecification.h:179
Aws::EC2::Model::TagSpecification::WithTags
TagSpecification & WithTags(Aws::Vector< Tag > &&value)
Definition: TagSpecification.h:278
Aws
Definition: AccessManagementClient.h:15
index
int index
Definition: cJSON.h:181
Aws::EC2::Model::TagSpecification::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: TagSpecification.h:253
Aws::EC2::Model::TagSpecification::WithResourceType
TagSpecification & WithResourceType(ResourceType &&value)
Definition: TagSpecification.h:247
Aws::EC2::Model::TagSpecification
Definition: TagSpecification.h:35
EC2_EXPORTS.h
Aws::EC2::Model::TagSpecification::ResourceTypeHasBeenSet
bool ResourceTypeHasBeenSet() const
Definition: TagSpecification.h:111