AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Instance.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/autoscaling/model/LifecycleState.h>
11#include <aws/autoscaling/model/LaunchTemplateSpecification.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Xml
19{
20 class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace AutoScaling
24{
25namespace Model
26{
27
34 {
35 public:
36 AWS_AUTOSCALING_API Instance() = default;
37 AWS_AUTOSCALING_API Instance(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_AUTOSCALING_API Instance& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
43
45
48 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
49 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
50 template<typename InstanceIdT = Aws::String>
51 void SetInstanceId(InstanceIdT&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::forward<InstanceIdT>(value); }
52 template<typename InstanceIdT = Aws::String>
53 Instance& WithInstanceId(InstanceIdT&& value) { SetInstanceId(std::forward<InstanceIdT>(value)); return *this;}
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) { m_instanceTypeHasBeenSet = true; m_instanceType = std::forward<InstanceTypeT>(value); }
64 template<typename InstanceTypeT = Aws::String>
65 Instance& WithInstanceType(InstanceTypeT&& value) { SetInstanceType(std::forward<InstanceTypeT>(value)); return *this;}
67
69
72 inline const Aws::String& GetAvailabilityZone() const { return m_availabilityZone; }
73 inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; }
74 template<typename AvailabilityZoneT = Aws::String>
75 void SetAvailabilityZone(AvailabilityZoneT&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::forward<AvailabilityZoneT>(value); }
76 template<typename AvailabilityZoneT = Aws::String>
77 Instance& WithAvailabilityZone(AvailabilityZoneT&& value) { SetAvailabilityZone(std::forward<AvailabilityZoneT>(value)); return *this;}
79
81
88 inline LifecycleState GetLifecycleState() const { return m_lifecycleState; }
89 inline bool LifecycleStateHasBeenSet() const { return m_lifecycleStateHasBeenSet; }
90 inline void SetLifecycleState(LifecycleState value) { m_lifecycleStateHasBeenSet = true; m_lifecycleState = value; }
91 inline Instance& WithLifecycleState(LifecycleState value) { SetLifecycleState(value); return *this;}
93
95
101 inline const Aws::String& GetHealthStatus() const { return m_healthStatus; }
102 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
103 template<typename HealthStatusT = Aws::String>
104 void SetHealthStatus(HealthStatusT&& value) { m_healthStatusHasBeenSet = true; m_healthStatus = std::forward<HealthStatusT>(value); }
105 template<typename HealthStatusT = Aws::String>
106 Instance& WithHealthStatus(HealthStatusT&& value) { SetHealthStatus(std::forward<HealthStatusT>(value)); return *this;}
108
110
113 inline const Aws::String& GetLaunchConfigurationName() const { return m_launchConfigurationName; }
114 inline bool LaunchConfigurationNameHasBeenSet() const { return m_launchConfigurationNameHasBeenSet; }
115 template<typename LaunchConfigurationNameT = Aws::String>
116 void SetLaunchConfigurationName(LaunchConfigurationNameT&& value) { m_launchConfigurationNameHasBeenSet = true; m_launchConfigurationName = std::forward<LaunchConfigurationNameT>(value); }
117 template<typename LaunchConfigurationNameT = Aws::String>
118 Instance& WithLaunchConfigurationName(LaunchConfigurationNameT&& value) { SetLaunchConfigurationName(std::forward<LaunchConfigurationNameT>(value)); return *this;}
120
122
125 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
126 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
127 template<typename LaunchTemplateT = LaunchTemplateSpecification>
128 void SetLaunchTemplate(LaunchTemplateT&& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = std::forward<LaunchTemplateT>(value); }
129 template<typename LaunchTemplateT = LaunchTemplateSpecification>
130 Instance& WithLaunchTemplate(LaunchTemplateT&& value) { SetLaunchTemplate(std::forward<LaunchTemplateT>(value)); return *this;}
132
134
138 inline bool GetProtectedFromScaleIn() const { return m_protectedFromScaleIn; }
139 inline bool ProtectedFromScaleInHasBeenSet() const { return m_protectedFromScaleInHasBeenSet; }
140 inline void SetProtectedFromScaleIn(bool value) { m_protectedFromScaleInHasBeenSet = true; m_protectedFromScaleIn = value; }
141 inline Instance& WithProtectedFromScaleIn(bool value) { SetProtectedFromScaleIn(value); return *this;}
143
145
149 inline const Aws::String& GetWeightedCapacity() const { return m_weightedCapacity; }
150 inline bool WeightedCapacityHasBeenSet() const { return m_weightedCapacityHasBeenSet; }
151 template<typename WeightedCapacityT = Aws::String>
152 void SetWeightedCapacity(WeightedCapacityT&& value) { m_weightedCapacityHasBeenSet = true; m_weightedCapacity = std::forward<WeightedCapacityT>(value); }
153 template<typename WeightedCapacityT = Aws::String>
154 Instance& WithWeightedCapacity(WeightedCapacityT&& value) { SetWeightedCapacity(std::forward<WeightedCapacityT>(value)); return *this;}
156 private:
157
158 Aws::String m_instanceId;
159 bool m_instanceIdHasBeenSet = false;
160
161 Aws::String m_instanceType;
162 bool m_instanceTypeHasBeenSet = false;
163
164 Aws::String m_availabilityZone;
165 bool m_availabilityZoneHasBeenSet = false;
166
167 LifecycleState m_lifecycleState{LifecycleState::NOT_SET};
168 bool m_lifecycleStateHasBeenSet = false;
169
170 Aws::String m_healthStatus;
171 bool m_healthStatusHasBeenSet = false;
172
173 Aws::String m_launchConfigurationName;
174 bool m_launchConfigurationNameHasBeenSet = false;
175
176 LaunchTemplateSpecification m_launchTemplate;
177 bool m_launchTemplateHasBeenSet = false;
178
179 bool m_protectedFromScaleIn{false};
180 bool m_protectedFromScaleInHasBeenSet = false;
181
182 Aws::String m_weightedCapacity;
183 bool m_weightedCapacityHasBeenSet = false;
184 };
185
186} // namespace Model
187} // namespace AutoScaling
188} // namespace Aws
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetAvailabilityZone(AvailabilityZoneT &&value)
Definition Instance.h:75
const Aws::String & GetLaunchConfigurationName() const
Definition Instance.h:113
Instance & WithAvailabilityZone(AvailabilityZoneT &&value)
Definition Instance.h:77
void SetProtectedFromScaleIn(bool value)
Definition Instance.h:140
void SetWeightedCapacity(WeightedCapacityT &&value)
Definition Instance.h:152
void SetInstanceId(InstanceIdT &&value)
Definition Instance.h:51
const Aws::String & GetInstanceType() const
Definition Instance.h:60
bool LifecycleStateHasBeenSet() const
Definition Instance.h:89
const Aws::String & GetWeightedCapacity() const
Definition Instance.h:149
Instance & WithProtectedFromScaleIn(bool value)
Definition Instance.h:141
Instance & WithLifecycleState(LifecycleState value)
Definition Instance.h:91
Instance & WithInstanceType(InstanceTypeT &&value)
Definition Instance.h:65
AWS_AUTOSCALING_API Instance & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetInstanceId() const
Definition Instance.h:48
bool AvailabilityZoneHasBeenSet() const
Definition Instance.h:73
Instance & WithLaunchConfigurationName(LaunchConfigurationNameT &&value)
Definition Instance.h:118
LifecycleState GetLifecycleState() const
Definition Instance.h:88
bool LaunchConfigurationNameHasBeenSet() const
Definition Instance.h:114
void SetLifecycleState(LifecycleState value)
Definition Instance.h:90
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:72
Instance & WithLaunchTemplate(LaunchTemplateT &&value)
Definition Instance.h:130
void SetLaunchTemplate(LaunchTemplateT &&value)
Definition Instance.h:128
AWS_AUTOSCALING_API Instance()=default
Instance & WithInstanceId(InstanceIdT &&value)
Definition Instance.h:53
Instance & WithWeightedCapacity(WeightedCapacityT &&value)
Definition Instance.h:154
void SetHealthStatus(HealthStatusT &&value)
Definition Instance.h:104
void SetLaunchConfigurationName(LaunchConfigurationNameT &&value)
Definition Instance.h:116
const LaunchTemplateSpecification & GetLaunchTemplate() const
Definition Instance.h:125
AWS_AUTOSCALING_API Instance(const Aws::Utils::Xml::XmlNode &xmlNode)
bool ProtectedFromScaleInHasBeenSet() const
Definition Instance.h:139
const Aws::String & GetHealthStatus() const
Definition Instance.h:101
Instance & WithHealthStatus(HealthStatusT &&value)
Definition Instance.h:106
bool WeightedCapacityHasBeenSet() const
Definition Instance.h:150
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream