1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/ec2/model/ResourceType.h>
10 #include <aws/core/utils/memory/stl/AWSVector.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 
28   /**
29    * <p>The tags specification for the launch template.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/LaunchTemplateTagSpecificationRequest">AWS
31    * API Reference</a></p>
32    */
33   class AWS_EC2_API LaunchTemplateTagSpecificationRequest
34   {
35   public:
36     LaunchTemplateTagSpecificationRequest();
37     LaunchTemplateTagSpecificationRequest(const Aws::Utils::Xml::XmlNode& xmlNode);
38     LaunchTemplateTagSpecificationRequest& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39 
40     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41     void OutputToStream(Aws::OStream& oStream, const char* location) const;
42 
43 
44     /**
45      * <p>The type of resource to tag. Currently, the resource types that support
46      * tagging on creation are <code>instance</code> and <code>volume</code>. To tag a
47      * resource after it has been created, see <a
48      * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
49      */
GetResourceType()50     inline const ResourceType& GetResourceType() const{ return m_resourceType; }
51 
52     /**
53      * <p>The type of resource to tag. Currently, the resource types that support
54      * tagging on creation are <code>instance</code> and <code>volume</code>. To tag a
55      * resource after it has been created, see <a
56      * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
57      */
ResourceTypeHasBeenSet()58     inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
59 
60     /**
61      * <p>The type of resource to tag. Currently, the resource types that support
62      * tagging on creation are <code>instance</code> and <code>volume</code>. To tag a
63      * resource after it has been created, see <a
64      * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
65      */
SetResourceType(const ResourceType & value)66     inline void SetResourceType(const ResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
67 
68     /**
69      * <p>The type of resource to tag. Currently, the resource types that support
70      * tagging on creation are <code>instance</code> and <code>volume</code>. To tag a
71      * resource after it has been created, see <a
72      * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
73      */
SetResourceType(ResourceType && value)74     inline void SetResourceType(ResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); }
75 
76     /**
77      * <p>The type of resource to tag. Currently, the resource types that support
78      * tagging on creation are <code>instance</code> and <code>volume</code>. To tag a
79      * resource after it has been created, see <a
80      * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
81      */
WithResourceType(const ResourceType & value)82     inline LaunchTemplateTagSpecificationRequest& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;}
83 
84     /**
85      * <p>The type of resource to tag. Currently, the resource types that support
86      * tagging on creation are <code>instance</code> and <code>volume</code>. To tag a
87      * resource after it has been created, see <a
88      * href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p>
89      */
WithResourceType(ResourceType && value)90     inline LaunchTemplateTagSpecificationRequest& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;}
91 
92 
93     /**
94      * <p>The tags to apply to the resource.</p>
95      */
GetTags()96     inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
97 
98     /**
99      * <p>The tags to apply to the resource.</p>
100      */
TagsHasBeenSet()101     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
102 
103     /**
104      * <p>The tags to apply to the resource.</p>
105      */
SetTags(const Aws::Vector<Tag> & value)106     inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
107 
108     /**
109      * <p>The tags to apply to the resource.</p>
110      */
SetTags(Aws::Vector<Tag> && value)111     inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
112 
113     /**
114      * <p>The tags to apply to the resource.</p>
115      */
WithTags(const Aws::Vector<Tag> & value)116     inline LaunchTemplateTagSpecificationRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
117 
118     /**
119      * <p>The tags to apply to the resource.</p>
120      */
WithTags(Aws::Vector<Tag> && value)121     inline LaunchTemplateTagSpecificationRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
122 
123     /**
124      * <p>The tags to apply to the resource.</p>
125      */
AddTags(const Tag & value)126     inline LaunchTemplateTagSpecificationRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
127 
128     /**
129      * <p>The tags to apply to the resource.</p>
130      */
AddTags(Tag && value)131     inline LaunchTemplateTagSpecificationRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
132 
133   private:
134 
135     ResourceType m_resourceType;
136     bool m_resourceTypeHasBeenSet;
137 
138     Aws::Vector<Tag> m_tags;
139     bool m_tagsHasBeenSet;
140   };
141 
142 } // namespace Model
143 } // namespace EC2
144 } // namespace Aws
145