AWS SDK for C++  1.9.157
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 
48  inline const ResourceType& GetResourceType() const{ return m_resourceType; }
49 
53  inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
54 
58  inline void SetResourceType(const ResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
59 
63  inline void SetResourceType(ResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
64 
68  inline TagSpecification& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;}
69 
73  inline TagSpecification& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;}
74 
75 
79  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
80 
84  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
85 
89  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
90 
94  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
95 
99  inline TagSpecification& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
100 
104  inline TagSpecification& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
105 
109  inline TagSpecification& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
110 
114  inline TagSpecification& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
115 
116  private:
117 
118  ResourceType m_resourceType;
119  bool m_resourceTypeHasBeenSet;
120 
121  Aws::Vector<Tag> m_tags;
122  bool m_tagsHasBeenSet;
123  };
124 
125 } // namespace Model
126 } // namespace EC2
127 } // 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:84
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:114
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:58
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:48
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:94
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:68
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::EC2::Model::TagSpecification::AddTags
TagSpecification & AddTags(const Tag &value)
Definition: TagSpecification.h:109
Aws::EC2::Model::TagSpecification::WithTags
TagSpecification & WithTags(const Aws::Vector< Tag > &value)
Definition: TagSpecification.h:99
Aws::EC2::Model::TagSpecification::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagSpecification.h:89
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:63
Aws::EC2::Model::TagSpecification::WithTags
TagSpecification & WithTags(Aws::Vector< Tag > &&value)
Definition: TagSpecification.h:104
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:79
Aws::EC2::Model::TagSpecification::WithResourceType
TagSpecification & WithResourceType(ResourceType &&value)
Definition: TagSpecification.h:73
Aws::EC2::Model::TagSpecification
Definition: TagSpecification.h:35
EC2_EXPORTS.h
Aws::EC2::Model::TagSpecification::ResourceTypeHasBeenSet
bool ResourceTypeHasBeenSet() const
Definition: TagSpecification.h:53