xref: /openbmc/bmcweb/features/redfish/include/generated/enums/update_service.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
30ec8b83dSEd Tanous #pragma once
40ec8b83dSEd Tanous #include <nlohmann/json.hpp>
50ec8b83dSEd Tanous 
60ec8b83dSEd Tanous namespace update_service
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class TransferProtocolType{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     CIFS,
130ec8b83dSEd Tanous     FTP,
140ec8b83dSEd Tanous     SFTP,
150ec8b83dSEd Tanous     HTTP,
160ec8b83dSEd Tanous     HTTPS,
170ec8b83dSEd Tanous     NSF,
180ec8b83dSEd Tanous     SCP,
190ec8b83dSEd Tanous     TFTP,
200ec8b83dSEd Tanous     OEM,
210ec8b83dSEd Tanous     NFS,
220ec8b83dSEd Tanous };
230ec8b83dSEd Tanous 
240ec8b83dSEd Tanous enum class ApplyTime{
250ec8b83dSEd Tanous     Invalid,
260ec8b83dSEd Tanous     Immediate,
270ec8b83dSEd Tanous     OnReset,
280ec8b83dSEd Tanous     AtMaintenanceWindowStart,
290ec8b83dSEd Tanous     InMaintenanceWindowOnReset,
300ec8b83dSEd Tanous     OnStartUpdateRequest,
31f2a8e57eSGunnar Mills     OnTargetReset,
320ec8b83dSEd Tanous };
330ec8b83dSEd Tanous 
342ae81db9SGunnar Mills enum class SupportedUpdateImageFormatType{
352ae81db9SGunnar Mills     Invalid,
362ae81db9SGunnar Mills     PLDMv1_0,
372ae81db9SGunnar Mills     PLDMv1_1,
382ae81db9SGunnar Mills     PLDMv1_2,
392ae81db9SGunnar Mills     PLDMv1_3,
402ae81db9SGunnar Mills     UEFICapsule,
412ae81db9SGunnar Mills     VendorDefined,
422ae81db9SGunnar Mills };
432ae81db9SGunnar Mills 
440ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(TransferProtocolType, {
450ec8b83dSEd Tanous     {TransferProtocolType::Invalid, "Invalid"},
460ec8b83dSEd Tanous     {TransferProtocolType::CIFS, "CIFS"},
470ec8b83dSEd Tanous     {TransferProtocolType::FTP, "FTP"},
480ec8b83dSEd Tanous     {TransferProtocolType::SFTP, "SFTP"},
490ec8b83dSEd Tanous     {TransferProtocolType::HTTP, "HTTP"},
500ec8b83dSEd Tanous     {TransferProtocolType::HTTPS, "HTTPS"},
510ec8b83dSEd Tanous     {TransferProtocolType::NSF, "NSF"},
520ec8b83dSEd Tanous     {TransferProtocolType::SCP, "SCP"},
530ec8b83dSEd Tanous     {TransferProtocolType::TFTP, "TFTP"},
540ec8b83dSEd Tanous     {TransferProtocolType::OEM, "OEM"},
550ec8b83dSEd Tanous     {TransferProtocolType::NFS, "NFS"},
560ec8b83dSEd Tanous });
570ec8b83dSEd Tanous 
580ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ApplyTime, {
590ec8b83dSEd Tanous     {ApplyTime::Invalid, "Invalid"},
600ec8b83dSEd Tanous     {ApplyTime::Immediate, "Immediate"},
610ec8b83dSEd Tanous     {ApplyTime::OnReset, "OnReset"},
620ec8b83dSEd Tanous     {ApplyTime::AtMaintenanceWindowStart, "AtMaintenanceWindowStart"},
630ec8b83dSEd Tanous     {ApplyTime::InMaintenanceWindowOnReset, "InMaintenanceWindowOnReset"},
640ec8b83dSEd Tanous     {ApplyTime::OnStartUpdateRequest, "OnStartUpdateRequest"},
65f2a8e57eSGunnar Mills     {ApplyTime::OnTargetReset, "OnTargetReset"},
660ec8b83dSEd Tanous });
670ec8b83dSEd Tanous 
682ae81db9SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(SupportedUpdateImageFormatType, {
692ae81db9SGunnar Mills     {SupportedUpdateImageFormatType::Invalid, "Invalid"},
702ae81db9SGunnar Mills     {SupportedUpdateImageFormatType::PLDMv1_0, "PLDMv1_0"},
712ae81db9SGunnar Mills     {SupportedUpdateImageFormatType::PLDMv1_1, "PLDMv1_1"},
722ae81db9SGunnar Mills     {SupportedUpdateImageFormatType::PLDMv1_2, "PLDMv1_2"},
732ae81db9SGunnar Mills     {SupportedUpdateImageFormatType::PLDMv1_3, "PLDMv1_3"},
742ae81db9SGunnar Mills     {SupportedUpdateImageFormatType::UEFICapsule, "UEFICapsule"},
752ae81db9SGunnar Mills     {SupportedUpdateImageFormatType::VendorDefined, "VendorDefined"},
762ae81db9SGunnar Mills });
772ae81db9SGunnar Mills 
780ec8b83dSEd Tanous }
790ec8b83dSEd Tanous // clang-format on
80