1 #pragma once
2 #include <nlohmann/json.hpp>
3 
4 namespace job
5 {
6 // clang-format off
7 
8 enum class JobState{
9     Invalid,
10     New,
11     Starting,
12     Running,
13     Suspended,
14     Interrupted,
15     Pending,
16     Stopping,
17     Completed,
18     Cancelled,
19     Exception,
20     Service,
21     UserIntervention,
22     Continue,
23 };
24 
25 NLOHMANN_JSON_SERIALIZE_ENUM(JobState, {
26     {JobState::Invalid, "Invalid"},
27     {JobState::New, "New"},
28     {JobState::Starting, "Starting"},
29     {JobState::Running, "Running"},
30     {JobState::Suspended, "Suspended"},
31     {JobState::Interrupted, "Interrupted"},
32     {JobState::Pending, "Pending"},
33     {JobState::Stopping, "Stopping"},
34     {JobState::Completed, "Completed"},
35     {JobState::Cancelled, "Cancelled"},
36     {JobState::Exception, "Exception"},
37     {JobState::Service, "Service"},
38     {JobState::UserIntervention, "UserIntervention"},
39     {JobState::Continue, "Continue"},
40 });
41 
42 }
43 // clang-format on
44