10ec8b83dSEd Tanous #pragma once 20ec8b83dSEd Tanous #include <nlohmann/json.hpp> 30ec8b83dSEd Tanous 40ec8b83dSEd Tanous namespace update_service 50ec8b83dSEd Tanous { 60ec8b83dSEd Tanous // clang-format off 70ec8b83dSEd Tanous 80ec8b83dSEd Tanous enum class TransferProtocolType{ 90ec8b83dSEd Tanous Invalid, 100ec8b83dSEd Tanous CIFS, 110ec8b83dSEd Tanous FTP, 120ec8b83dSEd Tanous SFTP, 130ec8b83dSEd Tanous HTTP, 140ec8b83dSEd Tanous HTTPS, 150ec8b83dSEd Tanous NSF, 160ec8b83dSEd Tanous SCP, 170ec8b83dSEd Tanous TFTP, 180ec8b83dSEd Tanous OEM, 190ec8b83dSEd Tanous NFS, 200ec8b83dSEd Tanous }; 210ec8b83dSEd Tanous 220ec8b83dSEd Tanous enum class ApplyTime{ 230ec8b83dSEd Tanous Invalid, 240ec8b83dSEd Tanous Immediate, 250ec8b83dSEd Tanous OnReset, 260ec8b83dSEd Tanous AtMaintenanceWindowStart, 270ec8b83dSEd Tanous InMaintenanceWindowOnReset, 280ec8b83dSEd Tanous OnStartUpdateRequest, 29*f2a8e57eSGunnar Mills OnTargetReset, 300ec8b83dSEd Tanous }; 310ec8b83dSEd Tanous 322ae81db9SGunnar Mills enum class SupportedUpdateImageFormatType{ 332ae81db9SGunnar Mills Invalid, 342ae81db9SGunnar Mills PLDMv1_0, 352ae81db9SGunnar Mills PLDMv1_1, 362ae81db9SGunnar Mills PLDMv1_2, 372ae81db9SGunnar Mills PLDMv1_3, 382ae81db9SGunnar Mills UEFICapsule, 392ae81db9SGunnar Mills VendorDefined, 402ae81db9SGunnar Mills }; 412ae81db9SGunnar Mills 420ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(TransferProtocolType, { 430ec8b83dSEd Tanous {TransferProtocolType::Invalid, "Invalid"}, 440ec8b83dSEd Tanous {TransferProtocolType::CIFS, "CIFS"}, 450ec8b83dSEd Tanous {TransferProtocolType::FTP, "FTP"}, 460ec8b83dSEd Tanous {TransferProtocolType::SFTP, "SFTP"}, 470ec8b83dSEd Tanous {TransferProtocolType::HTTP, "HTTP"}, 480ec8b83dSEd Tanous {TransferProtocolType::HTTPS, "HTTPS"}, 490ec8b83dSEd Tanous {TransferProtocolType::NSF, "NSF"}, 500ec8b83dSEd Tanous {TransferProtocolType::SCP, "SCP"}, 510ec8b83dSEd Tanous {TransferProtocolType::TFTP, "TFTP"}, 520ec8b83dSEd Tanous {TransferProtocolType::OEM, "OEM"}, 530ec8b83dSEd Tanous {TransferProtocolType::NFS, "NFS"}, 540ec8b83dSEd Tanous }); 550ec8b83dSEd Tanous 560ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ApplyTime, { 570ec8b83dSEd Tanous {ApplyTime::Invalid, "Invalid"}, 580ec8b83dSEd Tanous {ApplyTime::Immediate, "Immediate"}, 590ec8b83dSEd Tanous {ApplyTime::OnReset, "OnReset"}, 600ec8b83dSEd Tanous {ApplyTime::AtMaintenanceWindowStart, "AtMaintenanceWindowStart"}, 610ec8b83dSEd Tanous {ApplyTime::InMaintenanceWindowOnReset, "InMaintenanceWindowOnReset"}, 620ec8b83dSEd Tanous {ApplyTime::OnStartUpdateRequest, "OnStartUpdateRequest"}, 63*f2a8e57eSGunnar Mills {ApplyTime::OnTargetReset, "OnTargetReset"}, 640ec8b83dSEd Tanous }); 650ec8b83dSEd Tanous 662ae81db9SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(SupportedUpdateImageFormatType, { 672ae81db9SGunnar Mills {SupportedUpdateImageFormatType::Invalid, "Invalid"}, 682ae81db9SGunnar Mills {SupportedUpdateImageFormatType::PLDMv1_0, "PLDMv1_0"}, 692ae81db9SGunnar Mills {SupportedUpdateImageFormatType::PLDMv1_1, "PLDMv1_1"}, 702ae81db9SGunnar Mills {SupportedUpdateImageFormatType::PLDMv1_2, "PLDMv1_2"}, 712ae81db9SGunnar Mills {SupportedUpdateImageFormatType::PLDMv1_3, "PLDMv1_3"}, 722ae81db9SGunnar Mills {SupportedUpdateImageFormatType::UEFICapsule, "UEFICapsule"}, 732ae81db9SGunnar Mills {SupportedUpdateImageFormatType::VendorDefined, "VendorDefined"}, 742ae81db9SGunnar Mills }); 752ae81db9SGunnar Mills 760ec8b83dSEd Tanous } 770ec8b83dSEd Tanous // clang-format on 78