AWS SDK for C++

AWS SDK for C++ Version 1.11.835

Loading...
Searching...
No Matches
Job.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/sagemaker/SageMaker_EXPORTS.h>
11#include <aws/sagemaker/model/JobCategory.h>
12#include <aws/sagemaker/model/JobSecondaryStatus.h>
13#include <aws/sagemaker/model/JobSecondaryStatusTransition.h>
14#include <aws/sagemaker/model/JobStatus.h>
15#include <aws/sagemaker/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace SageMaker {
27namespace Model {
28
36class Job {
37 public:
38 AWS_SAGEMAKER_API Job() = default;
39 AWS_SAGEMAKER_API Job(Aws::Utils::Json::JsonView jsonValue);
40 AWS_SAGEMAKER_API Job& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline const Aws::String& GetJobName() const { return m_jobName; }
48 inline bool JobNameHasBeenSet() const { return m_jobNameHasBeenSet; }
49 template <typename JobNameT = Aws::String>
50 void SetJobName(JobNameT&& value) {
51 m_jobNameHasBeenSet = true;
52 m_jobName = std::forward<JobNameT>(value);
53 }
54 template <typename JobNameT = Aws::String>
55 Job& WithJobName(JobNameT&& value) {
56 SetJobName(std::forward<JobNameT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetJobArn() const { return m_jobArn; }
66 inline bool JobArnHasBeenSet() const { return m_jobArnHasBeenSet; }
67 template <typename JobArnT = Aws::String>
68 void SetJobArn(JobArnT&& value) {
69 m_jobArnHasBeenSet = true;
70 m_jobArn = std::forward<JobArnT>(value);
71 }
72 template <typename JobArnT = Aws::String>
73 Job& WithJobArn(JobArnT&& value) {
74 SetJobArn(std::forward<JobArnT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
84 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
85 template <typename RoleArnT = Aws::String>
86 void SetRoleArn(RoleArnT&& value) {
87 m_roleArnHasBeenSet = true;
88 m_roleArn = std::forward<RoleArnT>(value);
89 }
90 template <typename RoleArnT = Aws::String>
91 Job& WithRoleArn(RoleArnT&& value) {
92 SetRoleArn(std::forward<RoleArnT>(value));
93 return *this;
94 }
96
98
101 inline JobCategory GetJobCategory() const { return m_jobCategory; }
102 inline bool JobCategoryHasBeenSet() const { return m_jobCategoryHasBeenSet; }
103 inline void SetJobCategory(JobCategory value) {
104 m_jobCategoryHasBeenSet = true;
105 m_jobCategory = value;
106 }
108 SetJobCategory(value);
109 return *this;
110 }
112
114
117 inline const Aws::String& GetJobConfigSchemaVersion() const { return m_jobConfigSchemaVersion; }
118 inline bool JobConfigSchemaVersionHasBeenSet() const { return m_jobConfigSchemaVersionHasBeenSet; }
119 template <typename JobConfigSchemaVersionT = Aws::String>
120 void SetJobConfigSchemaVersion(JobConfigSchemaVersionT&& value) {
121 m_jobConfigSchemaVersionHasBeenSet = true;
122 m_jobConfigSchemaVersion = std::forward<JobConfigSchemaVersionT>(value);
123 }
124 template <typename JobConfigSchemaVersionT = Aws::String>
125 Job& WithJobConfigSchemaVersion(JobConfigSchemaVersionT&& value) {
126 SetJobConfigSchemaVersion(std::forward<JobConfigSchemaVersionT>(value));
127 return *this;
128 }
130
132
135 inline const Aws::String& GetJobConfigDocument() const { return m_jobConfigDocument; }
136 inline bool JobConfigDocumentHasBeenSet() const { return m_jobConfigDocumentHasBeenSet; }
137 template <typename JobConfigDocumentT = Aws::String>
138 void SetJobConfigDocument(JobConfigDocumentT&& value) {
139 m_jobConfigDocumentHasBeenSet = true;
140 m_jobConfigDocument = std::forward<JobConfigDocumentT>(value);
141 }
142 template <typename JobConfigDocumentT = Aws::String>
143 Job& WithJobConfigDocument(JobConfigDocumentT&& value) {
144 SetJobConfigDocument(std::forward<JobConfigDocumentT>(value));
145 return *this;
146 }
148
150
153 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
154 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
155 template <typename CreationTimeT = Aws::Utils::DateTime>
156 void SetCreationTime(CreationTimeT&& value) {
157 m_creationTimeHasBeenSet = true;
158 m_creationTime = std::forward<CreationTimeT>(value);
159 }
160 template <typename CreationTimeT = Aws::Utils::DateTime>
161 Job& WithCreationTime(CreationTimeT&& value) {
162 SetCreationTime(std::forward<CreationTimeT>(value));
163 return *this;
164 }
166
168
171 inline const Aws::Utils::DateTime& GetLastModifiedTime() const { return m_lastModifiedTime; }
172 inline bool LastModifiedTimeHasBeenSet() const { return m_lastModifiedTimeHasBeenSet; }
173 template <typename LastModifiedTimeT = Aws::Utils::DateTime>
174 void SetLastModifiedTime(LastModifiedTimeT&& value) {
175 m_lastModifiedTimeHasBeenSet = true;
176 m_lastModifiedTime = std::forward<LastModifiedTimeT>(value);
177 }
178 template <typename LastModifiedTimeT = Aws::Utils::DateTime>
179 Job& WithLastModifiedTime(LastModifiedTimeT&& value) {
180 SetLastModifiedTime(std::forward<LastModifiedTimeT>(value));
181 return *this;
182 }
184
186
189 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
190 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
191 template <typename EndTimeT = Aws::Utils::DateTime>
192 void SetEndTime(EndTimeT&& value) {
193 m_endTimeHasBeenSet = true;
194 m_endTime = std::forward<EndTimeT>(value);
195 }
196 template <typename EndTimeT = Aws::Utils::DateTime>
197 Job& WithEndTime(EndTimeT&& value) {
198 SetEndTime(std::forward<EndTimeT>(value));
199 return *this;
200 }
202
204
207 inline JobStatus GetJobStatus() const { return m_jobStatus; }
208 inline bool JobStatusHasBeenSet() const { return m_jobStatusHasBeenSet; }
209 inline void SetJobStatus(JobStatus value) {
210 m_jobStatusHasBeenSet = true;
211 m_jobStatus = value;
212 }
213 inline Job& WithJobStatus(JobStatus value) {
214 SetJobStatus(value);
215 return *this;
216 }
218
220
224 inline JobSecondaryStatus GetSecondaryStatus() const { return m_secondaryStatus; }
225 inline bool SecondaryStatusHasBeenSet() const { return m_secondaryStatusHasBeenSet; }
227 m_secondaryStatusHasBeenSet = true;
228 m_secondaryStatus = value;
229 }
231 SetSecondaryStatus(value);
232 return *this;
233 }
235
237
241 inline const Aws::Vector<JobSecondaryStatusTransition>& GetSecondaryStatusTransitions() const { return m_secondaryStatusTransitions; }
242 inline bool SecondaryStatusTransitionsHasBeenSet() const { return m_secondaryStatusTransitionsHasBeenSet; }
243 template <typename SecondaryStatusTransitionsT = Aws::Vector<JobSecondaryStatusTransition>>
244 void SetSecondaryStatusTransitions(SecondaryStatusTransitionsT&& value) {
245 m_secondaryStatusTransitionsHasBeenSet = true;
246 m_secondaryStatusTransitions = std::forward<SecondaryStatusTransitionsT>(value);
247 }
248 template <typename SecondaryStatusTransitionsT = Aws::Vector<JobSecondaryStatusTransition>>
249 Job& WithSecondaryStatusTransitions(SecondaryStatusTransitionsT&& value) {
250 SetSecondaryStatusTransitions(std::forward<SecondaryStatusTransitionsT>(value));
251 return *this;
252 }
253 template <typename SecondaryStatusTransitionsT = JobSecondaryStatusTransition>
254 Job& AddSecondaryStatusTransitions(SecondaryStatusTransitionsT&& value) {
255 m_secondaryStatusTransitionsHasBeenSet = true;
256 m_secondaryStatusTransitions.emplace_back(std::forward<SecondaryStatusTransitionsT>(value));
257 return *this;
258 }
260
262
265 inline const Aws::String& GetFailureReason() const { return m_failureReason; }
266 inline bool FailureReasonHasBeenSet() const { return m_failureReasonHasBeenSet; }
267 template <typename FailureReasonT = Aws::String>
268 void SetFailureReason(FailureReasonT&& value) {
269 m_failureReasonHasBeenSet = true;
270 m_failureReason = std::forward<FailureReasonT>(value);
271 }
272 template <typename FailureReasonT = Aws::String>
273 Job& WithFailureReason(FailureReasonT&& value) {
274 SetFailureReason(std::forward<FailureReasonT>(value));
275 return *this;
276 }
278
280
283 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
284 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
285 template <typename TagsT = Aws::Vector<Tag>>
286 void SetTags(TagsT&& value) {
287 m_tagsHasBeenSet = true;
288 m_tags = std::forward<TagsT>(value);
289 }
290 template <typename TagsT = Aws::Vector<Tag>>
291 Job& WithTags(TagsT&& value) {
292 SetTags(std::forward<TagsT>(value));
293 return *this;
294 }
295 template <typename TagsT = Tag>
296 Job& AddTags(TagsT&& value) {
297 m_tagsHasBeenSet = true;
298 m_tags.emplace_back(std::forward<TagsT>(value));
299 return *this;
300 }
302 private:
303 Aws::String m_jobName;
304
305 Aws::String m_jobArn;
306
307 Aws::String m_roleArn;
308
309 JobCategory m_jobCategory{JobCategory::NOT_SET};
310
311 Aws::String m_jobConfigSchemaVersion;
312
313 Aws::String m_jobConfigDocument;
314
315 Aws::Utils::DateTime m_creationTime{};
316
317 Aws::Utils::DateTime m_lastModifiedTime{};
318
319 Aws::Utils::DateTime m_endTime{};
320
321 JobStatus m_jobStatus{JobStatus::NOT_SET};
322
324
325 Aws::Vector<JobSecondaryStatusTransition> m_secondaryStatusTransitions;
326
327 Aws::String m_failureReason;
328
329 Aws::Vector<Tag> m_tags;
330 bool m_jobNameHasBeenSet = false;
331 bool m_jobArnHasBeenSet = false;
332 bool m_roleArnHasBeenSet = false;
333 bool m_jobCategoryHasBeenSet = false;
334 bool m_jobConfigSchemaVersionHasBeenSet = false;
335 bool m_jobConfigDocumentHasBeenSet = false;
336 bool m_creationTimeHasBeenSet = false;
337 bool m_lastModifiedTimeHasBeenSet = false;
338 bool m_endTimeHasBeenSet = false;
339 bool m_jobStatusHasBeenSet = false;
340 bool m_secondaryStatusHasBeenSet = false;
341 bool m_secondaryStatusTransitionsHasBeenSet = false;
342 bool m_failureReasonHasBeenSet = false;
343 bool m_tagsHasBeenSet = false;
344};
345
346} // namespace Model
347} // namespace SageMaker
348} // namespace Aws
Job & WithSecondaryStatusTransitions(SecondaryStatusTransitionsT &&value)
Definition Job.h:249
bool SecondaryStatusHasBeenSet() const
Definition Job.h:225
AWS_SAGEMAKER_API Job & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetJobStatus(JobStatus value)
Definition Job.h:209
const Aws::Utils::DateTime & GetEndTime() const
Definition Job.h:189
const Aws::String & GetJobConfigDocument() const
Definition Job.h:135
Job & WithSecondaryStatus(JobSecondaryStatus value)
Definition Job.h:230
bool JobStatusHasBeenSet() const
Definition Job.h:208
bool JobNameHasBeenSet() const
Definition Job.h:48
bool FailureReasonHasBeenSet() const
Definition Job.h:266
const Aws::String & GetRoleArn() const
Definition Job.h:83
void SetTags(TagsT &&value)
Definition Job.h:286
const Aws::String & GetJobArn() const
Definition Job.h:65
void SetRoleArn(RoleArnT &&value)
Definition Job.h:86
bool JobArnHasBeenSet() const
Definition Job.h:66
Job & WithJobName(JobNameT &&value)
Definition Job.h:55
Job & AddSecondaryStatusTransitions(SecondaryStatusTransitionsT &&value)
Definition Job.h:254
AWS_SAGEMAKER_API Job()=default
void SetJobConfigDocument(JobConfigDocumentT &&value)
Definition Job.h:138
bool JobConfigSchemaVersionHasBeenSet() const
Definition Job.h:118
const Aws::String & GetFailureReason() const
Definition Job.h:265
JobStatus GetJobStatus() const
Definition Job.h:207
void SetJobCategory(JobCategory value)
Definition Job.h:103
JobCategory GetJobCategory() const
Definition Job.h:101
const Aws::Vector< JobSecondaryStatusTransition > & GetSecondaryStatusTransitions() const
Definition Job.h:241
void SetSecondaryStatus(JobSecondaryStatus value)
Definition Job.h:226
Job & WithJobArn(JobArnT &&value)
Definition Job.h:73
Job & WithRoleArn(RoleArnT &&value)
Definition Job.h:91
void SetFailureReason(FailureReasonT &&value)
Definition Job.h:268
const Aws::String & GetJobConfigSchemaVersion() const
Definition Job.h:117
void SetSecondaryStatusTransitions(SecondaryStatusTransitionsT &&value)
Definition Job.h:244
Job & WithLastModifiedTime(LastModifiedTimeT &&value)
Definition Job.h:179
bool RoleArnHasBeenSet() const
Definition Job.h:84
bool SecondaryStatusTransitionsHasBeenSet() const
Definition Job.h:242
void SetJobName(JobNameT &&value)
Definition Job.h:50
void SetJobConfigSchemaVersion(JobConfigSchemaVersionT &&value)
Definition Job.h:120
Job & WithJobConfigSchemaVersion(JobConfigSchemaVersionT &&value)
Definition Job.h:125
Job & WithEndTime(EndTimeT &&value)
Definition Job.h:197
bool JobConfigDocumentHasBeenSet() const
Definition Job.h:136
bool JobCategoryHasBeenSet() const
Definition Job.h:102
Job & WithJobCategory(JobCategory value)
Definition Job.h:107
const Aws::Utils::DateTime & GetCreationTime() const
Definition Job.h:153
bool TagsHasBeenSet() const
Definition Job.h:284
bool LastModifiedTimeHasBeenSet() const
Definition Job.h:172
const Aws::Utils::DateTime & GetLastModifiedTime() const
Definition Job.h:171
Job & WithJobConfigDocument(JobConfigDocumentT &&value)
Definition Job.h:143
bool EndTimeHasBeenSet() const
Definition Job.h:190
void SetEndTime(EndTimeT &&value)
Definition Job.h:192
AWS_SAGEMAKER_API Job(Aws::Utils::Json::JsonView jsonValue)
Job & WithCreationTime(CreationTimeT &&value)
Definition Job.h:161
JobSecondaryStatus GetSecondaryStatus() const
Definition Job.h:224
AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const
Job & AddTags(TagsT &&value)
Definition Job.h:296
Job & WithFailureReason(FailureReasonT &&value)
Definition Job.h:273
bool CreationTimeHasBeenSet() const
Definition Job.h:154
void SetLastModifiedTime(LastModifiedTimeT &&value)
Definition Job.h:174
void SetCreationTime(CreationTimeT &&value)
Definition Job.h:156
Job & WithJobStatus(JobStatus value)
Definition Job.h:213
const Aws::Vector< Tag > & GetTags() const
Definition Job.h:283
const Aws::String & GetJobName() const
Definition Job.h:47
void SetJobArn(JobArnT &&value)
Definition Job.h:68
Job & WithTags(TagsT &&value)
Definition Job.h:291
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue