1*5ecf7b4eSGunnar Mills // SPDX-License-Identifier: Apache-2.0 2*5ecf7b4eSGunnar Mills // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3*5ecf7b4eSGunnar Mills #pragma once 4*5ecf7b4eSGunnar Mills #include <nlohmann/json.hpp> 5*5ecf7b4eSGunnar Mills 6*5ecf7b4eSGunnar Mills namespace certificate_enrollment 7*5ecf7b4eSGunnar Mills { 8*5ecf7b4eSGunnar Mills // clang-format off 9*5ecf7b4eSGunnar Mills 10*5ecf7b4eSGunnar Mills enum class EnrollmentProtocolType{ 11*5ecf7b4eSGunnar Mills Invalid, 12*5ecf7b4eSGunnar Mills ACME, 13*5ecf7b4eSGunnar Mills SCEP, 14*5ecf7b4eSGunnar Mills OEM, 15*5ecf7b4eSGunnar Mills }; 16*5ecf7b4eSGunnar Mills 17*5ecf7b4eSGunnar Mills enum class LastOperationType{ 18*5ecf7b4eSGunnar Mills Invalid, 19*5ecf7b4eSGunnar Mills Renew, 20*5ecf7b4eSGunnar Mills UpdateAcmeEmail, 21*5ecf7b4eSGunnar Mills }; 22*5ecf7b4eSGunnar Mills 23*5ecf7b4eSGunnar Mills enum class OperationStatus{ 24*5ecf7b4eSGunnar Mills Invalid, 25*5ecf7b4eSGunnar Mills Success, 26*5ecf7b4eSGunnar Mills Failed, 27*5ecf7b4eSGunnar Mills InProgress, 28*5ecf7b4eSGunnar Mills Unknown, 29*5ecf7b4eSGunnar Mills }; 30*5ecf7b4eSGunnar Mills 31*5ecf7b4eSGunnar Mills enum class ACMEChallengeType{ 32*5ecf7b4eSGunnar Mills Invalid, 33*5ecf7b4eSGunnar Mills Http01, 34*5ecf7b4eSGunnar Mills Dns01, 35*5ecf7b4eSGunnar Mills }; 36*5ecf7b4eSGunnar Mills 37*5ecf7b4eSGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(EnrollmentProtocolType, { 38*5ecf7b4eSGunnar Mills {EnrollmentProtocolType::Invalid, "Invalid"}, 39*5ecf7b4eSGunnar Mills {EnrollmentProtocolType::ACME, "ACME"}, 40*5ecf7b4eSGunnar Mills {EnrollmentProtocolType::SCEP, "SCEP"}, 41*5ecf7b4eSGunnar Mills {EnrollmentProtocolType::OEM, "OEM"}, 42*5ecf7b4eSGunnar Mills }); 43*5ecf7b4eSGunnar Mills 44*5ecf7b4eSGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(LastOperationType, { 45*5ecf7b4eSGunnar Mills {LastOperationType::Invalid, "Invalid"}, 46*5ecf7b4eSGunnar Mills {LastOperationType::Renew, "Renew"}, 47*5ecf7b4eSGunnar Mills {LastOperationType::UpdateAcmeEmail, "UpdateAcmeEmail"}, 48*5ecf7b4eSGunnar Mills }); 49*5ecf7b4eSGunnar Mills 50*5ecf7b4eSGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(OperationStatus, { 51*5ecf7b4eSGunnar Mills {OperationStatus::Invalid, "Invalid"}, 52*5ecf7b4eSGunnar Mills {OperationStatus::Success, "Success"}, 53*5ecf7b4eSGunnar Mills {OperationStatus::Failed, "Failed"}, 54*5ecf7b4eSGunnar Mills {OperationStatus::InProgress, "InProgress"}, 55*5ecf7b4eSGunnar Mills {OperationStatus::Unknown, "Unknown"}, 56*5ecf7b4eSGunnar Mills }); 57*5ecf7b4eSGunnar Mills 58*5ecf7b4eSGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(ACMEChallengeType, { 59*5ecf7b4eSGunnar Mills {ACMEChallengeType::Invalid, "Invalid"}, 60*5ecf7b4eSGunnar Mills {ACMEChallengeType::Http01, "Http01"}, 61*5ecf7b4eSGunnar Mills {ACMEChallengeType::Dns01, "Dns01"}, 62*5ecf7b4eSGunnar Mills }); 63*5ecf7b4eSGunnar Mills 64*5ecf7b4eSGunnar Mills } 65*5ecf7b4eSGunnar Mills // clang-format on 66