AWS SDK for C++

AWS SDK for C++ Version 1.11.718

Loading...
Searching...
No Matches
InstanceFleet.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/elasticmapreduce/EMR_EXPORTS.h>
10#include <aws/elasticmapreduce/model/InstanceFleetProvisioningSpecifications.h>
11#include <aws/elasticmapreduce/model/InstanceFleetResizingSpecifications.h>
12#include <aws/elasticmapreduce/model/InstanceFleetStatus.h>
13#include <aws/elasticmapreduce/model/InstanceFleetType.h>
14#include <aws/elasticmapreduce/model/InstanceTypeSpecification.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace EMR {
26namespace Model {
27
39 public:
40 AWS_EMR_API InstanceFleet() = default;
44
46
49 inline const Aws::String& GetId() const { return m_id; }
50 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
51 template <typename IdT = Aws::String>
52 void SetId(IdT&& value) {
53 m_idHasBeenSet = true;
54 m_id = std::forward<IdT>(value);
55 }
56 template <typename IdT = Aws::String>
57 InstanceFleet& WithId(IdT&& value) {
58 SetId(std::forward<IdT>(value));
59 return *this;
60 }
62
64
67 inline const Aws::String& GetName() const { return m_name; }
68 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
69 template <typename NameT = Aws::String>
70 void SetName(NameT&& value) {
71 m_nameHasBeenSet = true;
72 m_name = std::forward<NameT>(value);
73 }
74 template <typename NameT = Aws::String>
75 InstanceFleet& WithName(NameT&& value) {
76 SetName(std::forward<NameT>(value));
77 return *this;
78 }
80
82
85 inline const InstanceFleetStatus& GetStatus() const { return m_status; }
86 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
87 template <typename StatusT = InstanceFleetStatus>
88 void SetStatus(StatusT&& value) {
89 m_statusHasBeenSet = true;
90 m_status = std::forward<StatusT>(value);
91 }
92 template <typename StatusT = InstanceFleetStatus>
93 InstanceFleet& WithStatus(StatusT&& value) {
94 SetStatus(std::forward<StatusT>(value));
95 return *this;
96 }
98
100
104 inline InstanceFleetType GetInstanceFleetType() const { return m_instanceFleetType; }
105 inline bool InstanceFleetTypeHasBeenSet() const { return m_instanceFleetTypeHasBeenSet; }
107 m_instanceFleetTypeHasBeenSet = true;
108 m_instanceFleetType = value;
109 }
112 return *this;
113 }
115
117
138 inline int GetTargetOnDemandCapacity() const { return m_targetOnDemandCapacity; }
139 inline bool TargetOnDemandCapacityHasBeenSet() const { return m_targetOnDemandCapacityHasBeenSet; }
140 inline void SetTargetOnDemandCapacity(int value) {
141 m_targetOnDemandCapacityHasBeenSet = true;
142 m_targetOnDemandCapacity = value;
143 }
146 return *this;
147 }
149
151
171 inline int GetTargetSpotCapacity() const { return m_targetSpotCapacity; }
172 inline bool TargetSpotCapacityHasBeenSet() const { return m_targetSpotCapacityHasBeenSet; }
173 inline void SetTargetSpotCapacity(int value) {
174 m_targetSpotCapacityHasBeenSet = true;
175 m_targetSpotCapacity = value;
176 }
179 return *this;
180 }
182
184
189 inline int GetProvisionedOnDemandCapacity() const { return m_provisionedOnDemandCapacity; }
190 inline bool ProvisionedOnDemandCapacityHasBeenSet() const { return m_provisionedOnDemandCapacityHasBeenSet; }
191 inline void SetProvisionedOnDemandCapacity(int value) {
192 m_provisionedOnDemandCapacityHasBeenSet = true;
193 m_provisionedOnDemandCapacity = value;
194 }
197 return *this;
198 }
200
202
207 inline int GetProvisionedSpotCapacity() const { return m_provisionedSpotCapacity; }
208 inline bool ProvisionedSpotCapacityHasBeenSet() const { return m_provisionedSpotCapacityHasBeenSet; }
209 inline void SetProvisionedSpotCapacity(int value) {
210 m_provisionedSpotCapacityHasBeenSet = true;
211 m_provisionedSpotCapacity = value;
212 }
215 return *this;
216 }
218
220
224 inline const Aws::Vector<InstanceTypeSpecification>& GetInstanceTypeSpecifications() const { return m_instanceTypeSpecifications; }
225 inline bool InstanceTypeSpecificationsHasBeenSet() const { return m_instanceTypeSpecificationsHasBeenSet; }
226 template <typename InstanceTypeSpecificationsT = Aws::Vector<InstanceTypeSpecification>>
227 void SetInstanceTypeSpecifications(InstanceTypeSpecificationsT&& value) {
228 m_instanceTypeSpecificationsHasBeenSet = true;
229 m_instanceTypeSpecifications = std::forward<InstanceTypeSpecificationsT>(value);
230 }
231 template <typename InstanceTypeSpecificationsT = Aws::Vector<InstanceTypeSpecification>>
232 InstanceFleet& WithInstanceTypeSpecifications(InstanceTypeSpecificationsT&& value) {
233 SetInstanceTypeSpecifications(std::forward<InstanceTypeSpecificationsT>(value));
234 return *this;
235 }
236 template <typename InstanceTypeSpecificationsT = InstanceTypeSpecification>
237 InstanceFleet& AddInstanceTypeSpecifications(InstanceTypeSpecificationsT&& value) {
238 m_instanceTypeSpecificationsHasBeenSet = true;
239 m_instanceTypeSpecifications.emplace_back(std::forward<InstanceTypeSpecificationsT>(value));
240 return *this;
241 }
243
245
248 inline const InstanceFleetProvisioningSpecifications& GetLaunchSpecifications() const { return m_launchSpecifications; }
249 inline bool LaunchSpecificationsHasBeenSet() const { return m_launchSpecificationsHasBeenSet; }
250 template <typename LaunchSpecificationsT = InstanceFleetProvisioningSpecifications>
251 void SetLaunchSpecifications(LaunchSpecificationsT&& value) {
252 m_launchSpecificationsHasBeenSet = true;
253 m_launchSpecifications = std::forward<LaunchSpecificationsT>(value);
254 }
255 template <typename LaunchSpecificationsT = InstanceFleetProvisioningSpecifications>
256 InstanceFleet& WithLaunchSpecifications(LaunchSpecificationsT&& value) {
257 SetLaunchSpecifications(std::forward<LaunchSpecificationsT>(value));
258 return *this;
259 }
261
263
266 inline const InstanceFleetResizingSpecifications& GetResizeSpecifications() const { return m_resizeSpecifications; }
267 inline bool ResizeSpecificationsHasBeenSet() const { return m_resizeSpecificationsHasBeenSet; }
268 template <typename ResizeSpecificationsT = InstanceFleetResizingSpecifications>
269 void SetResizeSpecifications(ResizeSpecificationsT&& value) {
270 m_resizeSpecificationsHasBeenSet = true;
271 m_resizeSpecifications = std::forward<ResizeSpecificationsT>(value);
272 }
273 template <typename ResizeSpecificationsT = InstanceFleetResizingSpecifications>
274 InstanceFleet& WithResizeSpecifications(ResizeSpecificationsT&& value) {
275 SetResizeSpecifications(std::forward<ResizeSpecificationsT>(value));
276 return *this;
277 }
279
281
284 inline const Aws::String& GetContext() const { return m_context; }
285 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
286 template <typename ContextT = Aws::String>
287 void SetContext(ContextT&& value) {
288 m_contextHasBeenSet = true;
289 m_context = std::forward<ContextT>(value);
290 }
291 template <typename ContextT = Aws::String>
292 InstanceFleet& WithContext(ContextT&& value) {
293 SetContext(std::forward<ContextT>(value));
294 return *this;
295 }
297 private:
298 Aws::String m_id;
299
300 Aws::String m_name;
301
302 InstanceFleetStatus m_status;
303
305
306 int m_targetOnDemandCapacity{0};
307
308 int m_targetSpotCapacity{0};
309
310 int m_provisionedOnDemandCapacity{0};
311
312 int m_provisionedSpotCapacity{0};
313
314 Aws::Vector<InstanceTypeSpecification> m_instanceTypeSpecifications;
315
316 InstanceFleetProvisioningSpecifications m_launchSpecifications;
317
318 InstanceFleetResizingSpecifications m_resizeSpecifications;
319
320 Aws::String m_context;
321 bool m_idHasBeenSet = false;
322 bool m_nameHasBeenSet = false;
323 bool m_statusHasBeenSet = false;
324 bool m_instanceFleetTypeHasBeenSet = false;
325 bool m_targetOnDemandCapacityHasBeenSet = false;
326 bool m_targetSpotCapacityHasBeenSet = false;
327 bool m_provisionedOnDemandCapacityHasBeenSet = false;
328 bool m_provisionedSpotCapacityHasBeenSet = false;
329 bool m_instanceTypeSpecificationsHasBeenSet = false;
330 bool m_launchSpecificationsHasBeenSet = false;
331 bool m_resizeSpecificationsHasBeenSet = false;
332 bool m_contextHasBeenSet = false;
333};
334
335} // namespace Model
336} // namespace EMR
337} // namespace Aws
void SetInstanceFleetType(InstanceFleetType value)
InstanceFleet & WithContext(ContextT &&value)
AWS_EMR_API InstanceFleet()=default
InstanceFleet & WithTargetOnDemandCapacity(int value)
bool TargetOnDemandCapacityHasBeenSet() const
void SetProvisionedOnDemandCapacity(int value)
InstanceFleet & AddInstanceTypeSpecifications(InstanceTypeSpecificationsT &&value)
void SetResizeSpecifications(ResizeSpecificationsT &&value)
InstanceFleet & WithProvisionedSpotCapacity(int value)
void SetInstanceTypeSpecifications(InstanceTypeSpecificationsT &&value)
bool ProvisionedOnDemandCapacityHasBeenSet() const
InstanceFleet & WithStatus(StatusT &&value)
void SetLaunchSpecifications(LaunchSpecificationsT &&value)
const Aws::String & GetId() const
bool InstanceTypeSpecificationsHasBeenSet() const
InstanceFleet & WithResizeSpecifications(ResizeSpecificationsT &&value)
bool ProvisionedSpotCapacityHasBeenSet() const
InstanceFleet & WithLaunchSpecifications(LaunchSpecificationsT &&value)
void SetTargetSpotCapacity(int value)
const Aws::Vector< InstanceTypeSpecification > & GetInstanceTypeSpecifications() const
InstanceFleet & WithName(NameT &&value)
const InstanceFleetProvisioningSpecifications & GetLaunchSpecifications() const
InstanceFleet & WithProvisionedOnDemandCapacity(int value)
const Aws::String & GetName() const
InstanceFleet & WithInstanceTypeSpecifications(InstanceTypeSpecificationsT &&value)
void SetName(NameT &&value)
const Aws::String & GetContext() const
void SetTargetOnDemandCapacity(int value)
AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const
void SetContext(ContextT &&value)
InstanceFleet & WithId(IdT &&value)
InstanceFleet & WithTargetSpotCapacity(int value)
const InstanceFleetStatus & GetStatus() const
const InstanceFleetResizingSpecifications & GetResizeSpecifications() const
AWS_EMR_API InstanceFleet & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetStatus(StatusT &&value)
InstanceFleet & WithInstanceFleetType(InstanceFleetType value)
InstanceFleetType GetInstanceFleetType() const
AWS_EMR_API InstanceFleet(Aws::Utils::Json::JsonView jsonValue)
bool LaunchSpecificationsHasBeenSet() const
void SetProvisionedSpotCapacity(int value)
bool ResizeSpecificationsHasBeenSet() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue