AWS SDK for C++

AWS SDK for C++ Version 1.11.743

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
100 inline LifecycleState GetLifecycleState() const { return m_lifecycleState; }
101 inline bool LifecycleStateHasBeenSet() const { return m_lifecycleStateHasBeenSet; }
103 m_lifecycleStateHasBeenSet = true;
104 m_lifecycleState = value;
105 }
107 SetLifecycleState(value);
108 return *this;
109 }
111
113
119 inline const Aws::String& GetHealthStatus() const { return m_healthStatus; }
120 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
121 template <typename HealthStatusT = Aws::String>
122 void SetHealthStatus(HealthStatusT&& value) {
123 m_healthStatusHasBeenSet = true;
124 m_healthStatus = std::forward<HealthStatusT>(value);
125 }
126 template <typename HealthStatusT = Aws::String>
127 Instance& WithHealthStatus(HealthStatusT&& value) {
128 SetHealthStatus(std::forward<HealthStatusT>(value));
129 return *this;
130 }
132
134
137 inline const Aws::String& GetLaunchConfigurationName() const { return m_launchConfigurationName; }
138 inline bool LaunchConfigurationNameHasBeenSet() const { return m_launchConfigurationNameHasBeenSet; }
139 template <typename LaunchConfigurationNameT = Aws::String>
140 void SetLaunchConfigurationName(LaunchConfigurationNameT&& value) {
141 m_launchConfigurationNameHasBeenSet = true;
142 m_launchConfigurationName = std::forward<LaunchConfigurationNameT>(value);
143 }
144 template <typename LaunchConfigurationNameT = Aws::String>
145 Instance& WithLaunchConfigurationName(LaunchConfigurationNameT&& value) {
146 SetLaunchConfigurationName(std::forward<LaunchConfigurationNameT>(value));
147 return *this;
148 }
150
152
155 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
156 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
157 template <typename LaunchTemplateT = LaunchTemplateSpecification>
158 void SetLaunchTemplate(LaunchTemplateT&& value) {
159 m_launchTemplateHasBeenSet = true;
160 m_launchTemplate = std::forward<LaunchTemplateT>(value);
161 }
162 template <typename LaunchTemplateT = LaunchTemplateSpecification>
163 Instance& WithLaunchTemplate(LaunchTemplateT&& value) {
164 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
165 return *this;
166 }
168
170
181 inline const Aws::String& GetImageId() const { return m_imageId; }
182 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
183 template <typename ImageIdT = Aws::String>
184 void SetImageId(ImageIdT&& value) {
185 m_imageIdHasBeenSet = true;
186 m_imageId = std::forward<ImageIdT>(value);
187 }
188 template <typename ImageIdT = Aws::String>
189 Instance& WithImageId(ImageIdT&& value) {
190 SetImageId(std::forward<ImageIdT>(value));
191 return *this;
192 }
194
196
200 inline bool GetProtectedFromScaleIn() const { return m_protectedFromScaleIn; }
201 inline bool ProtectedFromScaleInHasBeenSet() const { return m_protectedFromScaleInHasBeenSet; }
202 inline void SetProtectedFromScaleIn(bool value) {
203 m_protectedFromScaleInHasBeenSet = true;
204 m_protectedFromScaleIn = value;
205 }
206 inline Instance& WithProtectedFromScaleIn(bool value) {
208 return *this;
209 }
211
213
217 inline const Aws::String& GetWeightedCapacity() const { return m_weightedCapacity; }
218 inline bool WeightedCapacityHasBeenSet() const { return m_weightedCapacityHasBeenSet; }
219 template <typename WeightedCapacityT = Aws::String>
220 void SetWeightedCapacity(WeightedCapacityT&& value) {
221 m_weightedCapacityHasBeenSet = true;
222 m_weightedCapacity = std::forward<WeightedCapacityT>(value);
223 }
224 template <typename WeightedCapacityT = Aws::String>
225 Instance& WithWeightedCapacity(WeightedCapacityT&& value) {
226 SetWeightedCapacity(std::forward<WeightedCapacityT>(value));
227 return *this;
228 }
230 private:
231 Aws::String m_instanceId;
232
233 Aws::String m_instanceType;
234
235 Aws::String m_availabilityZone;
236
237 LifecycleState m_lifecycleState{LifecycleState::NOT_SET};
238
239 Aws::String m_healthStatus;
240
241 Aws::String m_launchConfigurationName;
242
243 LaunchTemplateSpecification m_launchTemplate;
244
245 Aws::String m_imageId;
246
247 bool m_protectedFromScaleIn{false};
248
249 Aws::String m_weightedCapacity;
250 bool m_instanceIdHasBeenSet = false;
251 bool m_instanceTypeHasBeenSet = false;
252 bool m_availabilityZoneHasBeenSet = false;
253 bool m_lifecycleStateHasBeenSet = false;
254 bool m_healthStatusHasBeenSet = false;
255 bool m_launchConfigurationNameHasBeenSet = false;
256 bool m_launchTemplateHasBeenSet = false;
257 bool m_imageIdHasBeenSet = false;
258 bool m_protectedFromScaleInHasBeenSet = false;
259 bool m_weightedCapacityHasBeenSet = false;
260};
261
262} // namespace Model
263} // namespace AutoScaling
264} // 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:137
const Aws::String & GetImageId() const
Definition Instance.h:181
Instance & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition Instance.h:86
void SetProtectedFromScaleIn(bool value)
Definition Instance.h:202
void SetWeightedCapacity(WeightedCapacityT &&value)
Definition Instance.h:220
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:217
Instance & WithProtectedFromScaleIn(bool value)
Definition Instance.h:206
Instance & WithLifecycleState(LifecycleState value)
Definition Instance.h:106
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 & WithImageId(ImageIdT &&value)
Definition Instance.h:189
Instance & WithLaunchConfigurationName(LaunchConfigurationNameT &&value)
Definition Instance.h:145
LifecycleState GetLifecycleState() const
Definition Instance.h:100
bool LaunchConfigurationNameHasBeenSet() const
Definition Instance.h:138
void SetLifecycleState(LifecycleState value)
Definition Instance.h:102
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:163
void SetLaunchTemplate(LaunchTemplateT &&value)
Definition Instance.h:158
AWS_AUTOSCALING_API Instance()=default
Instance & WithInstanceId(InstanceIdT &&value)
Definition Instance.h:50
Instance & WithWeightedCapacity(WeightedCapacityT &&value)
Definition Instance.h:225
void SetHealthStatus(HealthStatusT &&value)
Definition Instance.h:122
void SetLaunchConfigurationName(LaunchConfigurationNameT &&value)
Definition Instance.h:140
const LaunchTemplateSpecification & GetLaunchTemplate() const
Definition Instance.h:155
AWS_AUTOSCALING_API Instance(const Aws::Utils::Xml::XmlNode &xmlNode)
bool ProtectedFromScaleInHasBeenSet() const
Definition Instance.h:201
void SetImageId(ImageIdT &&value)
Definition Instance.h:184
const Aws::String & GetHealthStatus() const
Definition Instance.h:119
Instance & WithHealthStatus(HealthStatusT &&value)
Definition Instance.h:127
bool WeightedCapacityHasBeenSet() const
Definition Instance.h:218
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream