AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
InstanceGroupConfig.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/AutoScalingPolicy.h>
11#include <aws/elasticmapreduce/model/Configuration.h>
12#include <aws/elasticmapreduce/model/EbsConfiguration.h>
13#include <aws/elasticmapreduce/model/InstanceRoleType.h>
14#include <aws/elasticmapreduce/model/MarketType.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
34 public:
35 AWS_EMR_API InstanceGroupConfig() = default;
39
41
44 inline const Aws::String& GetName() const { return m_name; }
45 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
46 template <typename NameT = Aws::String>
47 void SetName(NameT&& value) {
48 m_nameHasBeenSet = true;
49 m_name = std::forward<NameT>(value);
50 }
51 template <typename NameT = Aws::String>
52 InstanceGroupConfig& WithName(NameT&& value) {
53 SetName(std::forward<NameT>(value));
54 return *this;
55 }
57
59
62 inline MarketType GetMarket() const { return m_market; }
63 inline bool MarketHasBeenSet() const { return m_marketHasBeenSet; }
64 inline void SetMarket(MarketType value) {
65 m_marketHasBeenSet = true;
66 m_market = value;
67 }
69 SetMarket(value);
70 return *this;
71 }
73
75
78 inline InstanceRoleType GetInstanceRole() const { return m_instanceRole; }
79 inline bool InstanceRoleHasBeenSet() const { return m_instanceRoleHasBeenSet; }
80 inline void SetInstanceRole(InstanceRoleType value) {
81 m_instanceRoleHasBeenSet = true;
82 m_instanceRole = value;
83 }
85 SetInstanceRole(value);
86 return *this;
87 }
89
91
97 inline const Aws::String& GetBidPrice() const { return m_bidPrice; }
98 inline bool BidPriceHasBeenSet() const { return m_bidPriceHasBeenSet; }
99 template <typename BidPriceT = Aws::String>
100 void SetBidPrice(BidPriceT&& value) {
101 m_bidPriceHasBeenSet = true;
102 m_bidPrice = std::forward<BidPriceT>(value);
103 }
104 template <typename BidPriceT = Aws::String>
105 InstanceGroupConfig& WithBidPrice(BidPriceT&& value) {
106 SetBidPrice(std::forward<BidPriceT>(value));
107 return *this;
108 }
110
112
115 inline const Aws::String& GetInstanceType() const { return m_instanceType; }
116 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
117 template <typename InstanceTypeT = Aws::String>
118 void SetInstanceType(InstanceTypeT&& value) {
119 m_instanceTypeHasBeenSet = true;
120 m_instanceType = std::forward<InstanceTypeT>(value);
121 }
122 template <typename InstanceTypeT = Aws::String>
123 InstanceGroupConfig& WithInstanceType(InstanceTypeT&& value) {
124 SetInstanceType(std::forward<InstanceTypeT>(value));
125 return *this;
126 }
128
130
133 inline int GetInstanceCount() const { return m_instanceCount; }
134 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
135 inline void SetInstanceCount(int value) {
136 m_instanceCountHasBeenSet = true;
137 m_instanceCount = value;
138 }
140 SetInstanceCount(value);
141 return *this;
142 }
144
146
152 inline const Aws::Vector<Configuration>& GetConfigurations() const { return m_configurations; }
153 inline bool ConfigurationsHasBeenSet() const { return m_configurationsHasBeenSet; }
154 template <typename ConfigurationsT = Aws::Vector<Configuration>>
155 void SetConfigurations(ConfigurationsT&& value) {
156 m_configurationsHasBeenSet = true;
157 m_configurations = std::forward<ConfigurationsT>(value);
158 }
159 template <typename ConfigurationsT = Aws::Vector<Configuration>>
160 InstanceGroupConfig& WithConfigurations(ConfigurationsT&& value) {
161 SetConfigurations(std::forward<ConfigurationsT>(value));
162 return *this;
163 }
164 template <typename ConfigurationsT = Configuration>
165 InstanceGroupConfig& AddConfigurations(ConfigurationsT&& value) {
166 m_configurationsHasBeenSet = true;
167 m_configurations.emplace_back(std::forward<ConfigurationsT>(value));
168 return *this;
169 }
171
173
177 inline const EbsConfiguration& GetEbsConfiguration() const { return m_ebsConfiguration; }
178 inline bool EbsConfigurationHasBeenSet() const { return m_ebsConfigurationHasBeenSet; }
179 template <typename EbsConfigurationT = EbsConfiguration>
180 void SetEbsConfiguration(EbsConfigurationT&& value) {
181 m_ebsConfigurationHasBeenSet = true;
182 m_ebsConfiguration = std::forward<EbsConfigurationT>(value);
183 }
184 template <typename EbsConfigurationT = EbsConfiguration>
185 InstanceGroupConfig& WithEbsConfiguration(EbsConfigurationT&& value) {
186 SetEbsConfiguration(std::forward<EbsConfigurationT>(value));
187 return *this;
188 }
190
192
198 inline const AutoScalingPolicy& GetAutoScalingPolicy() const { return m_autoScalingPolicy; }
199 inline bool AutoScalingPolicyHasBeenSet() const { return m_autoScalingPolicyHasBeenSet; }
200 template <typename AutoScalingPolicyT = AutoScalingPolicy>
201 void SetAutoScalingPolicy(AutoScalingPolicyT&& value) {
202 m_autoScalingPolicyHasBeenSet = true;
203 m_autoScalingPolicy = std::forward<AutoScalingPolicyT>(value);
204 }
205 template <typename AutoScalingPolicyT = AutoScalingPolicy>
206 InstanceGroupConfig& WithAutoScalingPolicy(AutoScalingPolicyT&& value) {
207 SetAutoScalingPolicy(std::forward<AutoScalingPolicyT>(value));
208 return *this;
209 }
211
213
216 inline const Aws::String& GetCustomAmiId() const { return m_customAmiId; }
217 inline bool CustomAmiIdHasBeenSet() const { return m_customAmiIdHasBeenSet; }
218 template <typename CustomAmiIdT = Aws::String>
219 void SetCustomAmiId(CustomAmiIdT&& value) {
220 m_customAmiIdHasBeenSet = true;
221 m_customAmiId = std::forward<CustomAmiIdT>(value);
222 }
223 template <typename CustomAmiIdT = Aws::String>
224 InstanceGroupConfig& WithCustomAmiId(CustomAmiIdT&& value) {
225 SetCustomAmiId(std::forward<CustomAmiIdT>(value));
226 return *this;
227 }
229 private:
230 Aws::String m_name;
231
233
235
236 Aws::String m_bidPrice;
237
238 Aws::String m_instanceType;
239
240 int m_instanceCount{0};
241
242 Aws::Vector<Configuration> m_configurations;
243
244 EbsConfiguration m_ebsConfiguration;
245
246 AutoScalingPolicy m_autoScalingPolicy;
247
248 Aws::String m_customAmiId;
249 bool m_nameHasBeenSet = false;
250 bool m_marketHasBeenSet = false;
251 bool m_instanceRoleHasBeenSet = false;
252 bool m_bidPriceHasBeenSet = false;
253 bool m_instanceTypeHasBeenSet = false;
254 bool m_instanceCountHasBeenSet = false;
255 bool m_configurationsHasBeenSet = false;
256 bool m_ebsConfigurationHasBeenSet = false;
257 bool m_autoScalingPolicyHasBeenSet = false;
258 bool m_customAmiIdHasBeenSet = false;
259};
260
261} // namespace Model
262} // namespace EMR
263} // namespace Aws
const Aws::Vector< Configuration > & GetConfigurations() const
const Aws::String & GetName() const
void SetInstanceRole(InstanceRoleType value)
void SetInstanceType(InstanceTypeT &&value)
const Aws::String & GetBidPrice() const
const EbsConfiguration & GetEbsConfiguration() const
InstanceGroupConfig & WithAutoScalingPolicy(AutoScalingPolicyT &&value)
InstanceGroupConfig & WithCustomAmiId(CustomAmiIdT &&value)
InstanceGroupConfig & WithInstanceCount(int value)
AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const
InstanceGroupConfig & WithConfigurations(ConfigurationsT &&value)
InstanceGroupConfig & WithInstanceRole(InstanceRoleType value)
void SetAutoScalingPolicy(AutoScalingPolicyT &&value)
InstanceGroupConfig & WithEbsConfiguration(EbsConfigurationT &&value)
InstanceGroupConfig & WithBidPrice(BidPriceT &&value)
InstanceGroupConfig & WithName(NameT &&value)
InstanceGroupConfig & WithMarket(MarketType value)
const Aws::String & GetCustomAmiId() const
AWS_EMR_API InstanceGroupConfig(Aws::Utils::Json::JsonView jsonValue)
AWS_EMR_API InstanceGroupConfig()=default
AWS_EMR_API InstanceGroupConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
InstanceGroupConfig & WithInstanceType(InstanceTypeT &&value)
InstanceGroupConfig & AddConfigurations(ConfigurationsT &&value)
const Aws::String & GetInstanceType() const
void SetEbsConfiguration(EbsConfigurationT &&value)
const AutoScalingPolicy & GetAutoScalingPolicy() const
void SetConfigurations(ConfigurationsT &&value)
void SetCustomAmiId(CustomAmiIdT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue