AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
Instance.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/snow-device-management/SnowDeviceManagement_EXPORTS.h>
11#include <aws/snow-device-management/model/CpuOptions.h>
12#include <aws/snow-device-management/model/InstanceBlockDeviceMapping.h>
13#include <aws/snow-device-management/model/InstanceState.h>
14#include <aws/snow-device-management/model/SecurityGroupIdentifier.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace SnowDeviceManagement {
26namespace Model {
27
34class Instance {
35 public:
36 AWS_SNOWDEVICEMANAGEMENT_API Instance() = default;
37 AWS_SNOWDEVICEMANAGEMENT_API Instance(Aws::Utils::Json::JsonView jsonValue);
38 AWS_SNOWDEVICEMANAGEMENT_API Instance& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_SNOWDEVICEMANAGEMENT_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
46 inline int GetAmiLaunchIndex() const { return m_amiLaunchIndex; }
47 inline bool AmiLaunchIndexHasBeenSet() const { return m_amiLaunchIndexHasBeenSet; }
48 inline void SetAmiLaunchIndex(int value) {
49 m_amiLaunchIndexHasBeenSet = true;
50 m_amiLaunchIndex = value;
51 }
52 inline Instance& WithAmiLaunchIndex(int value) {
53 SetAmiLaunchIndex(value);
54 return *this;
55 }
57
59
62 inline const Aws::Vector<InstanceBlockDeviceMapping>& GetBlockDeviceMappings() const { return m_blockDeviceMappings; }
63 inline bool BlockDeviceMappingsHasBeenSet() const { return m_blockDeviceMappingsHasBeenSet; }
64 template <typename BlockDeviceMappingsT = Aws::Vector<InstanceBlockDeviceMapping>>
65 void SetBlockDeviceMappings(BlockDeviceMappingsT&& value) {
66 m_blockDeviceMappingsHasBeenSet = true;
67 m_blockDeviceMappings = std::forward<BlockDeviceMappingsT>(value);
68 }
69 template <typename BlockDeviceMappingsT = Aws::Vector<InstanceBlockDeviceMapping>>
70 Instance& WithBlockDeviceMappings(BlockDeviceMappingsT&& value) {
71 SetBlockDeviceMappings(std::forward<BlockDeviceMappingsT>(value));
72 return *this;
73 }
74 template <typename BlockDeviceMappingsT = InstanceBlockDeviceMapping>
75 Instance& AddBlockDeviceMappings(BlockDeviceMappingsT&& value) {
76 m_blockDeviceMappingsHasBeenSet = true;
77 m_blockDeviceMappings.emplace_back(std::forward<BlockDeviceMappingsT>(value));
78 return *this;
79 }
81
83
86 inline const CpuOptions& GetCpuOptions() const { return m_cpuOptions; }
87 inline bool CpuOptionsHasBeenSet() const { return m_cpuOptionsHasBeenSet; }
88 template <typename CpuOptionsT = CpuOptions>
89 void SetCpuOptions(CpuOptionsT&& value) {
90 m_cpuOptionsHasBeenSet = true;
91 m_cpuOptions = std::forward<CpuOptionsT>(value);
92 }
93 template <typename CpuOptionsT = CpuOptions>
94 Instance& WithCpuOptions(CpuOptionsT&& value) {
95 SetCpuOptions(std::forward<CpuOptionsT>(value));
96 return *this;
97 }
99
101
104 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
105 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
106 template <typename CreatedAtT = Aws::Utils::DateTime>
107 void SetCreatedAt(CreatedAtT&& value) {
108 m_createdAtHasBeenSet = true;
109 m_createdAt = std::forward<CreatedAtT>(value);
110 }
111 template <typename CreatedAtT = Aws::Utils::DateTime>
112 Instance& WithCreatedAt(CreatedAtT&& value) {
113 SetCreatedAt(std::forward<CreatedAtT>(value));
114 return *this;
115 }
117
119
122 inline const Aws::String& GetImageId() const { return m_imageId; }
123 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
124 template <typename ImageIdT = Aws::String>
125 void SetImageId(ImageIdT&& value) {
126 m_imageIdHasBeenSet = true;
127 m_imageId = std::forward<ImageIdT>(value);
128 }
129 template <typename ImageIdT = Aws::String>
130 Instance& WithImageId(ImageIdT&& value) {
131 SetImageId(std::forward<ImageIdT>(value));
132 return *this;
133 }
135
137
140 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
141 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
142 template <typename InstanceIdT = Aws::String>
143 void SetInstanceId(InstanceIdT&& value) {
144 m_instanceIdHasBeenSet = true;
145 m_instanceId = std::forward<InstanceIdT>(value);
146 }
147 template <typename InstanceIdT = Aws::String>
148 Instance& WithInstanceId(InstanceIdT&& value) {
149 SetInstanceId(std::forward<InstanceIdT>(value));
150 return *this;
151 }
153
155
158 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
159 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
160 template <typename InstanceTypeT = Aws::String>
161 void SetInstanceType(InstanceTypeT&& value) {
162 m_instanceTypeHasBeenSet = true;
163 m_instanceType = std::forward<InstanceTypeT>(value);
164 }
165 template <typename InstanceTypeT = Aws::String>
166 Instance& WithInstanceType(InstanceTypeT&& value) {
167 SetInstanceType(std::forward<InstanceTypeT>(value));
168 return *this;
169 }
171
173
176 inline const Aws::String& GetPrivateIpAddress() const { return m_privateIpAddress; }
177 inline bool PrivateIpAddressHasBeenSet() const { return m_privateIpAddressHasBeenSet; }
178 template <typename PrivateIpAddressT = Aws::String>
179 void SetPrivateIpAddress(PrivateIpAddressT&& value) {
180 m_privateIpAddressHasBeenSet = true;
181 m_privateIpAddress = std::forward<PrivateIpAddressT>(value);
182 }
183 template <typename PrivateIpAddressT = Aws::String>
184 Instance& WithPrivateIpAddress(PrivateIpAddressT&& value) {
185 SetPrivateIpAddress(std::forward<PrivateIpAddressT>(value));
186 return *this;
187 }
189
191
194 inline const Aws::String& GetPublicIpAddress() const { return m_publicIpAddress; }
195 inline bool PublicIpAddressHasBeenSet() const { return m_publicIpAddressHasBeenSet; }
196 template <typename PublicIpAddressT = Aws::String>
197 void SetPublicIpAddress(PublicIpAddressT&& value) {
198 m_publicIpAddressHasBeenSet = true;
199 m_publicIpAddress = std::forward<PublicIpAddressT>(value);
200 }
201 template <typename PublicIpAddressT = Aws::String>
202 Instance& WithPublicIpAddress(PublicIpAddressT&& value) {
203 SetPublicIpAddress(std::forward<PublicIpAddressT>(value));
204 return *this;
205 }
207
209
213 inline const Aws::String& GetRootDeviceName() const { return m_rootDeviceName; }
214 inline bool RootDeviceNameHasBeenSet() const { return m_rootDeviceNameHasBeenSet; }
215 template <typename RootDeviceNameT = Aws::String>
216 void SetRootDeviceName(RootDeviceNameT&& value) {
217 m_rootDeviceNameHasBeenSet = true;
218 m_rootDeviceName = std::forward<RootDeviceNameT>(value);
219 }
220 template <typename RootDeviceNameT = Aws::String>
221 Instance& WithRootDeviceName(RootDeviceNameT&& value) {
222 SetRootDeviceName(std::forward<RootDeviceNameT>(value));
223 return *this;
224 }
226
228
231 inline const Aws::Vector<SecurityGroupIdentifier>& GetSecurityGroups() const { return m_securityGroups; }
232 inline bool SecurityGroupsHasBeenSet() const { return m_securityGroupsHasBeenSet; }
233 template <typename SecurityGroupsT = Aws::Vector<SecurityGroupIdentifier>>
234 void SetSecurityGroups(SecurityGroupsT&& value) {
235 m_securityGroupsHasBeenSet = true;
236 m_securityGroups = std::forward<SecurityGroupsT>(value);
237 }
238 template <typename SecurityGroupsT = Aws::Vector<SecurityGroupIdentifier>>
239 Instance& WithSecurityGroups(SecurityGroupsT&& value) {
240 SetSecurityGroups(std::forward<SecurityGroupsT>(value));
241 return *this;
242 }
243 template <typename SecurityGroupsT = SecurityGroupIdentifier>
244 Instance& AddSecurityGroups(SecurityGroupsT&& value) {
245 m_securityGroupsHasBeenSet = true;
246 m_securityGroups.emplace_back(std::forward<SecurityGroupsT>(value));
247 return *this;
248 }
250
252
253 inline const InstanceState& GetState() const { return m_state; }
254 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
255 template <typename StateT = InstanceState>
256 void SetState(StateT&& value) {
257 m_stateHasBeenSet = true;
258 m_state = std::forward<StateT>(value);
259 }
260 template <typename StateT = InstanceState>
261 Instance& WithState(StateT&& value) {
262 SetState(std::forward<StateT>(value));
263 return *this;
264 }
266
268
271 inline const Aws::Utils::DateTime& GetUpdatedAt() const { return m_updatedAt; }
272 inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; }
273 template <typename UpdatedAtT = Aws::Utils::DateTime>
274 void SetUpdatedAt(UpdatedAtT&& value) {
275 m_updatedAtHasBeenSet = true;
276 m_updatedAt = std::forward<UpdatedAtT>(value);
277 }
278 template <typename UpdatedAtT = Aws::Utils::DateTime>
279 Instance& WithUpdatedAt(UpdatedAtT&& value) {
280 SetUpdatedAt(std::forward<UpdatedAtT>(value));
281 return *this;
282 }
284 private:
285 int m_amiLaunchIndex{0};
286
287 Aws::Vector<InstanceBlockDeviceMapping> m_blockDeviceMappings;
288
289 CpuOptions m_cpuOptions;
290
291 Aws::Utils::DateTime m_createdAt{};
292
293 Aws::String m_imageId;
294
295 Aws::String m_instanceId;
296
297 Aws::String m_instanceType;
298
299 Aws::String m_privateIpAddress;
300
301 Aws::String m_publicIpAddress;
302
303 Aws::String m_rootDeviceName;
304
306
307 InstanceState m_state;
308
309 Aws::Utils::DateTime m_updatedAt{};
310 bool m_amiLaunchIndexHasBeenSet = false;
311 bool m_blockDeviceMappingsHasBeenSet = false;
312 bool m_cpuOptionsHasBeenSet = false;
313 bool m_createdAtHasBeenSet = false;
314 bool m_imageIdHasBeenSet = false;
315 bool m_instanceIdHasBeenSet = false;
316 bool m_instanceTypeHasBeenSet = false;
317 bool m_privateIpAddressHasBeenSet = false;
318 bool m_publicIpAddressHasBeenSet = false;
319 bool m_rootDeviceNameHasBeenSet = false;
320 bool m_securityGroupsHasBeenSet = false;
321 bool m_stateHasBeenSet = false;
322 bool m_updatedAtHasBeenSet = false;
323};
324
325} // namespace Model
326} // namespace SnowDeviceManagement
327} // namespace Aws
void SetInstanceId(InstanceIdT &&value)
Definition Instance.h:143
const CpuOptions & GetCpuOptions() const
Definition Instance.h:86
AWS_SNOWDEVICEMANAGEMENT_API Instance(Aws::Utils::Json::JsonView jsonValue)
Instance & WithRootDeviceName(RootDeviceNameT &&value)
Definition Instance.h:221
void SetRootDeviceName(RootDeviceNameT &&value)
Definition Instance.h:216
Instance & WithPrivateIpAddress(PrivateIpAddressT &&value)
Definition Instance.h:184
Instance & WithCpuOptions(CpuOptionsT &&value)
Definition Instance.h:94
const InstanceState & GetState() const
Definition Instance.h:253
Instance & WithInstanceId(InstanceIdT &&value)
Definition Instance.h:148
Instance & AddSecurityGroups(SecurityGroupsT &&value)
Definition Instance.h:244
AWS_SNOWDEVICEMANAGEMENT_API Instance()=default
const Aws::Utils::DateTime & GetUpdatedAt() const
Definition Instance.h:271
const Aws::String & GetInstanceType() const
Definition Instance.h:158
void SetInstanceType(InstanceTypeT &&value)
Definition Instance.h:161
Instance & WithState(StateT &&value)
Definition Instance.h:261
Instance & AddBlockDeviceMappings(BlockDeviceMappingsT &&value)
Definition Instance.h:75
const Aws::String & GetPrivateIpAddress() const
Definition Instance.h:176
AWS_SNOWDEVICEMANAGEMENT_API Instance & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetPublicIpAddress(PublicIpAddressT &&value)
Definition Instance.h:197
void SetBlockDeviceMappings(BlockDeviceMappingsT &&value)
Definition Instance.h:65
const Aws::String & GetImageId() const
Definition Instance.h:122
Instance & WithUpdatedAt(UpdatedAtT &&value)
Definition Instance.h:279
Instance & WithImageId(ImageIdT &&value)
Definition Instance.h:130
void SetSecurityGroups(SecurityGroupsT &&value)
Definition Instance.h:234
const Aws::Vector< InstanceBlockDeviceMapping > & GetBlockDeviceMappings() const
Definition Instance.h:62
Instance & WithInstanceType(InstanceTypeT &&value)
Definition Instance.h:166
const Aws::Vector< SecurityGroupIdentifier > & GetSecurityGroups() const
Definition Instance.h:231
void SetCpuOptions(CpuOptionsT &&value)
Definition Instance.h:89
Instance & WithAmiLaunchIndex(int value)
Definition Instance.h:52
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Instance.h:104
const Aws::String & GetRootDeviceName() const
Definition Instance.h:213
Instance & WithCreatedAt(CreatedAtT &&value)
Definition Instance.h:112
Instance & WithBlockDeviceMappings(BlockDeviceMappingsT &&value)
Definition Instance.h:70
Instance & WithPublicIpAddress(PublicIpAddressT &&value)
Definition Instance.h:202
void SetUpdatedAt(UpdatedAtT &&value)
Definition Instance.h:274
AWS_SNOWDEVICEMANAGEMENT_API Aws::Utils::Json::JsonValue Jsonize() const
void SetCreatedAt(CreatedAtT &&value)
Definition Instance.h:107
const Aws::String & GetInstanceId() const
Definition Instance.h:140
Instance & WithSecurityGroups(SecurityGroupsT &&value)
Definition Instance.h:239
void SetPrivateIpAddress(PrivateIpAddressT &&value)
Definition Instance.h:179
const Aws::String & GetPublicIpAddress() const
Definition Instance.h:194
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue