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