AWS SDK for C++

AWS SDK for C++ Version 1.11.800

Loading...
Searching...
No Matches
Instance.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/autoscaling/model/LaunchTemplateSpecification.h>
9#include <aws/autoscaling/model/LifecycleState.h>
10#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Xml {
18class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace AutoScaling {
22namespace Model {
23
29class Instance {
30 public:
31 AWS_AUTOSCALING_API Instance() = default;
32 AWS_AUTOSCALING_API Instance(const Aws::Utils::Xml::XmlNode& xmlNode);
33 AWS_AUTOSCALING_API Instance& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
34
35 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
36 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
37
39
42 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
43 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
44 template <typename InstanceIdT = Aws::String>
45 void SetInstanceId(InstanceIdT&& value) {
46 m_instanceIdHasBeenSet = true;
47 m_instanceId = std::forward<InstanceIdT>(value);
48 }
49 template <typename InstanceIdT = Aws::String>
50 Instance& WithInstanceId(InstanceIdT&& value) {
51 SetInstanceId(std::forward<InstanceIdT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
61 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
62 template <typename InstanceTypeT = Aws::String>
63 void SetInstanceType(InstanceTypeT&& value) {
64 m_instanceTypeHasBeenSet = true;
65 m_instanceType = std::forward<InstanceTypeT>(value);
66 }
67 template <typename InstanceTypeT = Aws::String>
68 Instance& WithInstanceType(InstanceTypeT&& value) {
69 SetInstanceType(std::forward<InstanceTypeT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
79 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
80 template <typename AvailabilityZoneT = Aws::String>
81 void SetAvailabilityZone(AvailabilityZoneT&& value) {
82 m_availabilityZoneHasBeenSet = true;
83 m_availabilityZone = std::forward<AvailabilityZoneT>(value);
84 }
85 template <typename AvailabilityZoneT = Aws::String>
86 Instance& WithAvailabilityZone(AvailabilityZoneT&& value) {
87 SetAvailabilityZone(std::forward<AvailabilityZoneT>(value));
88 return *this;
89 }
91
93
96 inline const Aws::String& GetAvailabilityZoneId() const { return m_availabilityZoneId; }
97 inline bool AvailabilityZoneIdHasBeenSet() const { return m_availabilityZoneIdHasBeenSet; }
98 template <typename AvailabilityZoneIdT = Aws::String>
99 void SetAvailabilityZoneId(AvailabilityZoneIdT&& value) {
100 m_availabilityZoneIdHasBeenSet = true;
101 m_availabilityZoneId = std::forward<AvailabilityZoneIdT>(value);
102 }
103 template <typename AvailabilityZoneIdT = Aws::String>
104 Instance& WithAvailabilityZoneId(AvailabilityZoneIdT&& value) {
105 SetAvailabilityZoneId(std::forward<AvailabilityZoneIdT>(value));
106 return *this;
107 }
109
111
118 inline LifecycleState GetLifecycleState() const { return m_lifecycleState; }
119 inline bool LifecycleStateHasBeenSet() const { return m_lifecycleStateHasBeenSet; }
121 m_lifecycleStateHasBeenSet = true;
122 m_lifecycleState = value;
123 }
125 SetLifecycleState(value);
126 return *this;
127 }
129
131
137 inline const Aws::String& GetHealthStatus() const { return m_healthStatus; }
138 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
139 template <typename HealthStatusT = Aws::String>
140 void SetHealthStatus(HealthStatusT&& value) {
141 m_healthStatusHasBeenSet = true;
142 m_healthStatus = std::forward<HealthStatusT>(value);
143 }
144 template <typename HealthStatusT = Aws::String>
145 Instance& WithHealthStatus(HealthStatusT&& value) {
146 SetHealthStatus(std::forward<HealthStatusT>(value));
147 return *this;
148 }
150
152
155 inline const Aws::String& GetLaunchConfigurationName() const { return m_launchConfigurationName; }
156 inline bool LaunchConfigurationNameHasBeenSet() const { return m_launchConfigurationNameHasBeenSet; }
157 template <typename LaunchConfigurationNameT = Aws::String>
158 void SetLaunchConfigurationName(LaunchConfigurationNameT&& value) {
159 m_launchConfigurationNameHasBeenSet = true;
160 m_launchConfigurationName = std::forward<LaunchConfigurationNameT>(value);
161 }
162 template <typename LaunchConfigurationNameT = Aws::String>
163 Instance& WithLaunchConfigurationName(LaunchConfigurationNameT&& value) {
164 SetLaunchConfigurationName(std::forward<LaunchConfigurationNameT>(value));
165 return *this;
166 }
168
170
173 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
174 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
175 template <typename LaunchTemplateT = LaunchTemplateSpecification>
176 void SetLaunchTemplate(LaunchTemplateT&& value) {
177 m_launchTemplateHasBeenSet = true;
178 m_launchTemplate = std::forward<LaunchTemplateT>(value);
179 }
180 template <typename LaunchTemplateT = LaunchTemplateSpecification>
181 Instance& WithLaunchTemplate(LaunchTemplateT&& value) {
182 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
183 return *this;
184 }
186
188
199 inline const Aws::String& GetImageId() const { return m_imageId; }
200 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
201 template <typename ImageIdT = Aws::String>
202 void SetImageId(ImageIdT&& value) {
203 m_imageIdHasBeenSet = true;
204 m_imageId = std::forward<ImageIdT>(value);
205 }
206 template <typename ImageIdT = Aws::String>
207 Instance& WithImageId(ImageIdT&& value) {
208 SetImageId(std::forward<ImageIdT>(value));
209 return *this;
210 }
212
214
218 inline bool GetProtectedFromScaleIn() const { return m_protectedFromScaleIn; }
219 inline bool ProtectedFromScaleInHasBeenSet() const { return m_protectedFromScaleInHasBeenSet; }
220 inline void SetProtectedFromScaleIn(bool value) {
221 m_protectedFromScaleInHasBeenSet = true;
222 m_protectedFromScaleIn = value;
223 }
224 inline Instance& WithProtectedFromScaleIn(bool value) {
226 return *this;
227 }
229
231
235 inline const Aws::String& GetWeightedCapacity() const { return m_weightedCapacity; }
236 inline bool WeightedCapacityHasBeenSet() const { return m_weightedCapacityHasBeenSet; }
237 template <typename WeightedCapacityT = Aws::String>
238 void SetWeightedCapacity(WeightedCapacityT&& value) {
239 m_weightedCapacityHasBeenSet = true;
240 m_weightedCapacity = std::forward<WeightedCapacityT>(value);
241 }
242 template <typename WeightedCapacityT = Aws::String>
243 Instance& WithWeightedCapacity(WeightedCapacityT&& value) {
244 SetWeightedCapacity(std::forward<WeightedCapacityT>(value));
245 return *this;
246 }
248 private:
249 Aws::String m_instanceId;
250
251 Aws::String m_instanceType;
252
253 Aws::String m_availabilityZone;
254
255 Aws::String m_availabilityZoneId;
256
257 LifecycleState m_lifecycleState{LifecycleState::NOT_SET};
258
259 Aws::String m_healthStatus;
260
261 Aws::String m_launchConfigurationName;
262
263 LaunchTemplateSpecification m_launchTemplate;
264
265 Aws::String m_imageId;
266
267 bool m_protectedFromScaleIn{false};
268
269 Aws::String m_weightedCapacity;
270 bool m_instanceIdHasBeenSet = false;
271 bool m_instanceTypeHasBeenSet = false;
272 bool m_availabilityZoneHasBeenSet = false;
273 bool m_availabilityZoneIdHasBeenSet = false;
274 bool m_lifecycleStateHasBeenSet = false;
275 bool m_healthStatusHasBeenSet = false;
276 bool m_launchConfigurationNameHasBeenSet = false;
277 bool m_launchTemplateHasBeenSet = false;
278 bool m_imageIdHasBeenSet = false;
279 bool m_protectedFromScaleInHasBeenSet = false;
280 bool m_weightedCapacityHasBeenSet = false;
281};
282
283} // namespace Model
284} // namespace AutoScaling
285} // namespace Aws
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetAvailabilityZone(AvailabilityZoneT &&value)
Definition Instance.h:81
const Aws::String & GetLaunchConfigurationName() const
Definition Instance.h:155
const Aws::String & GetImageId() const
Definition Instance.h:199
Instance & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition Instance.h:86
void SetProtectedFromScaleIn(bool value)
Definition Instance.h:220
void SetWeightedCapacity(WeightedCapacityT &&value)
Definition Instance.h:238
void SetInstanceId(InstanceIdT &&value)
Definition Instance.h:45
const Aws::String & GetInstanceType() const
Definition Instance.h:60
const Aws::String & GetWeightedCapacity() const
Definition Instance.h:235
Instance & WithProtectedFromScaleIn(bool value)
Definition Instance.h:224
Instance & WithLifecycleState(LifecycleState value)
Definition Instance.h:124
Instance & WithInstanceType(InstanceTypeT &&value)
Definition Instance.h:68
AWS_AUTOSCALING_API Instance & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetInstanceId() const
Definition Instance.h:42
bool AvailabilityZoneHasBeenSet() const
Definition Instance.h:79
Instance & WithAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Instance.h:104
Instance & WithImageId(ImageIdT &&value)
Definition Instance.h:207
Instance & WithLaunchConfigurationName(LaunchConfigurationNameT &&value)
Definition Instance.h:163
LifecycleState GetLifecycleState() const
Definition Instance.h:118
bool LaunchConfigurationNameHasBeenSet() const
Definition Instance.h:156
void SetAvailabilityZoneId(AvailabilityZoneIdT &&value)
Definition Instance.h:99
void SetLifecycleState(LifecycleState value)
Definition Instance.h:120
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetInstanceType(InstanceTypeT &&value)
Definition Instance.h:63
const Aws::String & GetAvailabilityZone() const
Definition Instance.h:78
Instance & WithLaunchTemplate(LaunchTemplateT &&value)
Definition Instance.h:181
void SetLaunchTemplate(LaunchTemplateT &&value)
Definition Instance.h:176
AWS_AUTOSCALING_API Instance()=default
Instance & WithInstanceId(InstanceIdT &&value)
Definition Instance.h:50
Instance & WithWeightedCapacity(WeightedCapacityT &&value)
Definition Instance.h:243
void SetHealthStatus(HealthStatusT &&value)
Definition Instance.h:140
bool AvailabilityZoneIdHasBeenSet() const
Definition Instance.h:97
const Aws::String & GetAvailabilityZoneId() const
Definition Instance.h:96
void SetLaunchConfigurationName(LaunchConfigurationNameT &&value)
Definition Instance.h:158
const LaunchTemplateSpecification & GetLaunchTemplate() const
Definition Instance.h:173
AWS_AUTOSCALING_API Instance(const Aws::Utils::Xml::XmlNode &xmlNode)
bool ProtectedFromScaleInHasBeenSet() const
Definition Instance.h:219
void SetImageId(ImageIdT &&value)
Definition Instance.h:202
const Aws::String & GetHealthStatus() const
Definition Instance.h:137
Instance & WithHealthStatus(HealthStatusT &&value)
Definition Instance.h:145
bool WeightedCapacityHasBeenSet() const
Definition Instance.h:236
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream