AWS SDK for C++

AWS SDK for C++ Version 1.11.889

Loading...
Searching...
No Matches
ResourceConfig.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/sagemaker/SageMaker_EXPORTS.h>
10#include <aws/sagemaker/model/InstanceGroup.h>
11#include <aws/sagemaker/model/InstancePlacementConfig.h>
12#include <aws/sagemaker/model/InstancePreference.h>
13#include <aws/sagemaker/model/TrainingInstanceType.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace SageMaker {
25namespace Model {
26
35 public:
36 AWS_SAGEMAKER_API ResourceConfig() = default;
37 AWS_SAGEMAKER_API ResourceConfig(Aws::Utils::Json::JsonView jsonValue);
39 AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline TrainingInstanceType GetInstanceType() const { return m_instanceType; }
46 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
48 m_instanceTypeHasBeenSet = true;
49 m_instanceType = value;
50 }
52 SetInstanceType(value);
53 return *this;
54 }
56
58
62 inline int GetInstanceCount() const { return m_instanceCount; }
63 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
64 inline void SetInstanceCount(int value) {
65 m_instanceCountHasBeenSet = true;
66 m_instanceCount = value;
67 }
68 inline ResourceConfig& WithInstanceCount(int value) {
69 SetInstanceCount(value);
70 return *this;
71 }
73
75
104 inline int GetVolumeSizeInGB() const { return m_volumeSizeInGB; }
105 inline bool VolumeSizeInGBHasBeenSet() const { return m_volumeSizeInGBHasBeenSet; }
106 inline void SetVolumeSizeInGB(int value) {
107 m_volumeSizeInGBHasBeenSet = true;
108 m_volumeSizeInGB = value;
109 }
111 SetVolumeSizeInGB(value);
112 return *this;
113 }
115
117
136 inline const Aws::String& GetVolumeKmsKeyId() const { return m_volumeKmsKeyId; }
137 inline bool VolumeKmsKeyIdHasBeenSet() const { return m_volumeKmsKeyIdHasBeenSet; }
138 template <typename VolumeKmsKeyIdT = Aws::String>
139 void SetVolumeKmsKeyId(VolumeKmsKeyIdT&& value) {
140 m_volumeKmsKeyIdHasBeenSet = true;
141 m_volumeKmsKeyId = std::forward<VolumeKmsKeyIdT>(value);
142 }
143 template <typename VolumeKmsKeyIdT = Aws::String>
144 ResourceConfig& WithVolumeKmsKeyId(VolumeKmsKeyIdT&& value) {
145 SetVolumeKmsKeyId(std::forward<VolumeKmsKeyIdT>(value));
146 return *this;
147 }
149
151
155 inline int GetKeepAlivePeriodInSeconds() const { return m_keepAlivePeriodInSeconds; }
156 inline bool KeepAlivePeriodInSecondsHasBeenSet() const { return m_keepAlivePeriodInSecondsHasBeenSet; }
157 inline void SetKeepAlivePeriodInSeconds(int value) {
158 m_keepAlivePeriodInSecondsHasBeenSet = true;
159 m_keepAlivePeriodInSeconds = value;
160 }
163 return *this;
164 }
166
168
171 inline const Aws::Vector<InstanceGroup>& GetInstanceGroups() const { return m_instanceGroups; }
172 inline bool InstanceGroupsHasBeenSet() const { return m_instanceGroupsHasBeenSet; }
173 template <typename InstanceGroupsT = Aws::Vector<InstanceGroup>>
174 void SetInstanceGroups(InstanceGroupsT&& value) {
175 m_instanceGroupsHasBeenSet = true;
176 m_instanceGroups = std::forward<InstanceGroupsT>(value);
177 }
178 template <typename InstanceGroupsT = Aws::Vector<InstanceGroup>>
179 ResourceConfig& WithInstanceGroups(InstanceGroupsT&& value) {
180 SetInstanceGroups(std::forward<InstanceGroupsT>(value));
181 return *this;
182 }
183 template <typename InstanceGroupsT = InstanceGroup>
184 ResourceConfig& AddInstanceGroups(InstanceGroupsT&& value) {
185 m_instanceGroupsHasBeenSet = true;
186 m_instanceGroups.emplace_back(std::forward<InstanceGroupsT>(value));
187 return *this;
188 }
190
192
196 inline const Aws::String& GetTrainingPlanArn() const { return m_trainingPlanArn; }
197 inline bool TrainingPlanArnHasBeenSet() const { return m_trainingPlanArnHasBeenSet; }
198 template <typename TrainingPlanArnT = Aws::String>
199 void SetTrainingPlanArn(TrainingPlanArnT&& value) {
200 m_trainingPlanArnHasBeenSet = true;
201 m_trainingPlanArn = std::forward<TrainingPlanArnT>(value);
202 }
203 template <typename TrainingPlanArnT = Aws::String>
204 ResourceConfig& WithTrainingPlanArn(TrainingPlanArnT&& value) {
205 SetTrainingPlanArn(std::forward<TrainingPlanArnT>(value));
206 return *this;
207 }
209
211
215 inline const InstancePlacementConfig& GetInstancePlacementConfig() const { return m_instancePlacementConfig; }
216 inline bool InstancePlacementConfigHasBeenSet() const { return m_instancePlacementConfigHasBeenSet; }
217 template <typename InstancePlacementConfigT = InstancePlacementConfig>
218 void SetInstancePlacementConfig(InstancePlacementConfigT&& value) {
219 m_instancePlacementConfigHasBeenSet = true;
220 m_instancePlacementConfig = std::forward<InstancePlacementConfigT>(value);
221 }
222 template <typename InstancePlacementConfigT = InstancePlacementConfig>
223 ResourceConfig& WithInstancePlacementConfig(InstancePlacementConfigT&& value) {
224 SetInstancePlacementConfig(std::forward<InstancePlacementConfigT>(value));
225 return *this;
226 }
228
230
241 inline const Aws::Vector<InstancePreference>& GetInstancePreferences() const { return m_instancePreferences; }
242 inline bool InstancePreferencesHasBeenSet() const { return m_instancePreferencesHasBeenSet; }
243 template <typename InstancePreferencesT = Aws::Vector<InstancePreference>>
244 void SetInstancePreferences(InstancePreferencesT&& value) {
245 m_instancePreferencesHasBeenSet = true;
246 m_instancePreferences = std::forward<InstancePreferencesT>(value);
247 }
248 template <typename InstancePreferencesT = Aws::Vector<InstancePreference>>
249 ResourceConfig& WithInstancePreferences(InstancePreferencesT&& value) {
250 SetInstancePreferences(std::forward<InstancePreferencesT>(value));
251 return *this;
252 }
253 template <typename InstancePreferencesT = InstancePreference>
254 ResourceConfig& AddInstancePreferences(InstancePreferencesT&& value) {
255 m_instancePreferencesHasBeenSet = true;
256 m_instancePreferences.emplace_back(std::forward<InstancePreferencesT>(value));
257 return *this;
258 }
260
262
270 inline TrainingInstanceType GetSelectedInstanceType() const { return m_selectedInstanceType; }
271 inline bool SelectedInstanceTypeHasBeenSet() const { return m_selectedInstanceTypeHasBeenSet; }
273 m_selectedInstanceTypeHasBeenSet = true;
274 m_selectedInstanceType = value;
275 }
278 return *this;
279 }
281
283
290 inline int GetSelectedInstanceCount() const { return m_selectedInstanceCount; }
291 inline bool SelectedInstanceCountHasBeenSet() const { return m_selectedInstanceCountHasBeenSet; }
292 inline void SetSelectedInstanceCount(int value) {
293 m_selectedInstanceCountHasBeenSet = true;
294 m_selectedInstanceCount = value;
295 }
298 return *this;
299 }
301 private:
303
304 int m_instanceCount{0};
305
306 int m_volumeSizeInGB{0};
307
308 Aws::String m_volumeKmsKeyId;
309
310 int m_keepAlivePeriodInSeconds{0};
311
312 Aws::Vector<InstanceGroup> m_instanceGroups;
313
314 Aws::String m_trainingPlanArn;
315
316 InstancePlacementConfig m_instancePlacementConfig;
317
318 Aws::Vector<InstancePreference> m_instancePreferences;
319
321
322 int m_selectedInstanceCount{0};
323 bool m_instanceTypeHasBeenSet = false;
324 bool m_instanceCountHasBeenSet = false;
325 bool m_volumeSizeInGBHasBeenSet = false;
326 bool m_volumeKmsKeyIdHasBeenSet = false;
327 bool m_keepAlivePeriodInSecondsHasBeenSet = false;
328 bool m_instanceGroupsHasBeenSet = false;
329 bool m_trainingPlanArnHasBeenSet = false;
330 bool m_instancePlacementConfigHasBeenSet = false;
331 bool m_instancePreferencesHasBeenSet = false;
332 bool m_selectedInstanceTypeHasBeenSet = false;
333 bool m_selectedInstanceCountHasBeenSet = false;
334};
335
336} // namespace Model
337} // namespace SageMaker
338} // namespace Aws
ResourceConfig & WithSelectedInstanceType(TrainingInstanceType value)
ResourceConfig & WithSelectedInstanceCount(int value)
ResourceConfig & AddInstancePreferences(InstancePreferencesT &&value)
const Aws::String & GetVolumeKmsKeyId() const
void SetVolumeKmsKeyId(VolumeKmsKeyIdT &&value)
const Aws::String & GetTrainingPlanArn() const
ResourceConfig & WithVolumeKmsKeyId(VolumeKmsKeyIdT &&value)
ResourceConfig & WithInstancePlacementConfig(InstancePlacementConfigT &&value)
TrainingInstanceType GetSelectedInstanceType() const
ResourceConfig & WithKeepAlivePeriodInSeconds(int value)
void SetInstanceGroups(InstanceGroupsT &&value)
AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const
ResourceConfig & WithInstanceGroups(InstanceGroupsT &&value)
const InstancePlacementConfig & GetInstancePlacementConfig() const
void SetSelectedInstanceType(TrainingInstanceType value)
ResourceConfig & WithInstancePreferences(InstancePreferencesT &&value)
AWS_SAGEMAKER_API ResourceConfig(Aws::Utils::Json::JsonView jsonValue)
AWS_SAGEMAKER_API ResourceConfig()=default
const Aws::Vector< InstancePreference > & GetInstancePreferences() const
ResourceConfig & WithInstanceCount(int value)
void SetInstancePreferences(InstancePreferencesT &&value)
ResourceConfig & WithTrainingPlanArn(TrainingPlanArnT &&value)
AWS_SAGEMAKER_API ResourceConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
ResourceConfig & WithVolumeSizeInGB(int value)
void SetInstanceType(TrainingInstanceType value)
ResourceConfig & AddInstanceGroups(InstanceGroupsT &&value)
void SetInstancePlacementConfig(InstancePlacementConfigT &&value)
void SetTrainingPlanArn(TrainingPlanArnT &&value)
const Aws::Vector< InstanceGroup > & GetInstanceGroups() const
TrainingInstanceType GetInstanceType() const
ResourceConfig & WithInstanceType(TrainingInstanceType 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