AWS SDK for C++

AWS SDK for C++ Version 1.11.925

Loading...
Searching...
No Matches
OperationConfig.h
1
6#pragma once
7#include <aws/sagemakertrainingsessionruntime/SageMakerTrainingSessionRuntime_EXPORTS.h>
8#include <aws/sagemakertrainingsessionruntime/model/ForwardBackwardConfig.h>
9#include <aws/sagemakertrainingsessionruntime/model/ForwardConfig.h>
10#include <aws/sagemakertrainingsessionruntime/model/LoadStateConfig.h>
11#include <aws/sagemakertrainingsessionruntime/model/OptimizerStepConfig.h>
12#include <aws/sagemakertrainingsessionruntime/model/SaveStateConfig.h>
13#include <aws/sagemakertrainingsessionruntime/model/SaveWeightsConfig.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace SageMakerTrainingSessionRuntime {
25namespace Model {
26
34 public:
35 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API OperationConfig() = default;
36 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API OperationConfig(Aws::Utils::Json::JsonView jsonValue);
37 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API OperationConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
45 inline const ForwardConfig& GetForward() const { return m_forward; }
46 inline bool ForwardHasBeenSet() const { return m_forwardHasBeenSet; }
47 template <typename ForwardT = ForwardConfig>
48 void SetForward(ForwardT&& value) {
49 m_forwardHasBeenSet = true;
50 m_forward = std::forward<ForwardT>(value);
51 }
52 template <typename ForwardT = ForwardConfig>
53 OperationConfig& WithForward(ForwardT&& value) {
54 SetForward(std::forward<ForwardT>(value));
55 return *this;
56 }
58
60
64 inline const ForwardBackwardConfig& GetForwardBackward() const { return m_forwardBackward; }
65 inline bool ForwardBackwardHasBeenSet() const { return m_forwardBackwardHasBeenSet; }
66 template <typename ForwardBackwardT = ForwardBackwardConfig>
67 void SetForwardBackward(ForwardBackwardT&& value) {
68 m_forwardBackwardHasBeenSet = true;
69 m_forwardBackward = std::forward<ForwardBackwardT>(value);
70 }
71 template <typename ForwardBackwardT = ForwardBackwardConfig>
72 OperationConfig& WithForwardBackward(ForwardBackwardT&& value) {
73 SetForwardBackward(std::forward<ForwardBackwardT>(value));
74 return *this;
75 }
77
79
83 inline const OptimizerStepConfig& GetOptimizerStep() const { return m_optimizerStep; }
84 inline bool OptimizerStepHasBeenSet() const { return m_optimizerStepHasBeenSet; }
85 template <typename OptimizerStepT = OptimizerStepConfig>
86 void SetOptimizerStep(OptimizerStepT&& value) {
87 m_optimizerStepHasBeenSet = true;
88 m_optimizerStep = std::forward<OptimizerStepT>(value);
89 }
90 template <typename OptimizerStepT = OptimizerStepConfig>
91 OperationConfig& WithOptimizerStep(OptimizerStepT&& value) {
92 SetOptimizerStep(std::forward<OptimizerStepT>(value));
93 return *this;
94 }
96
98
101 inline const SaveWeightsConfig& GetSaveWeights() const { return m_saveWeights; }
102 inline bool SaveWeightsHasBeenSet() const { return m_saveWeightsHasBeenSet; }
103 template <typename SaveWeightsT = SaveWeightsConfig>
104 void SetSaveWeights(SaveWeightsT&& value) {
105 m_saveWeightsHasBeenSet = true;
106 m_saveWeights = std::forward<SaveWeightsT>(value);
107 }
108 template <typename SaveWeightsT = SaveWeightsConfig>
109 OperationConfig& WithSaveWeights(SaveWeightsT&& value) {
110 SetSaveWeights(std::forward<SaveWeightsT>(value));
111 return *this;
112 }
114
116
120 inline const SaveStateConfig& GetSaveState() const { return m_saveState; }
121 inline bool SaveStateHasBeenSet() const { return m_saveStateHasBeenSet; }
122 template <typename SaveStateT = SaveStateConfig>
123 void SetSaveState(SaveStateT&& value) {
124 m_saveStateHasBeenSet = true;
125 m_saveState = std::forward<SaveStateT>(value);
126 }
127 template <typename SaveStateT = SaveStateConfig>
128 OperationConfig& WithSaveState(SaveStateT&& value) {
129 SetSaveState(std::forward<SaveStateT>(value));
130 return *this;
131 }
133
135
139 inline const LoadStateConfig& GetLoadState() const { return m_loadState; }
140 inline bool LoadStateHasBeenSet() const { return m_loadStateHasBeenSet; }
141 template <typename LoadStateT = LoadStateConfig>
142 void SetLoadState(LoadStateT&& value) {
143 m_loadStateHasBeenSet = true;
144 m_loadState = std::forward<LoadStateT>(value);
145 }
146 template <typename LoadStateT = LoadStateConfig>
147 OperationConfig& WithLoadState(LoadStateT&& value) {
148 SetLoadState(std::forward<LoadStateT>(value));
149 return *this;
150 }
152 private:
153 ForwardConfig m_forward;
154
155 ForwardBackwardConfig m_forwardBackward;
156
157 OptimizerStepConfig m_optimizerStep;
158
159 SaveWeightsConfig m_saveWeights;
160
161 SaveStateConfig m_saveState;
162
163 LoadStateConfig m_loadState;
164 bool m_forwardHasBeenSet = false;
165 bool m_forwardBackwardHasBeenSet = false;
166 bool m_optimizerStepHasBeenSet = false;
167 bool m_saveWeightsHasBeenSet = false;
168 bool m_saveStateHasBeenSet = false;
169 bool m_loadStateHasBeenSet = false;
170};
171
172} // namespace Model
173} // namespace SageMakerTrainingSessionRuntime
174} // namespace Aws
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API OperationConfig(Aws::Utils::Json::JsonView jsonValue)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API OperationConfig()=default
const ForwardBackwardConfig & GetForwardBackward() const
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API OperationConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
OperationConfig & WithSaveWeights(SaveWeightsT &&value)
OperationConfig & WithOptimizerStep(OptimizerStepT &&value)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
OperationConfig & WithForwardBackward(ForwardBackwardT &&value)
Aws::Utils::Json::JsonValue JsonValue