| #pragma once |
| #include <cstdint> |
| #include <nlohmann/json.hpp> |
| |
| namespace computer_system |
| { |
| // clang-format off |
| |
| enum class BootSource : std::uint8_t{ |
| Invalid, |
| None, |
| Pxe, |
| Floppy, |
| Cd, |
| Usb, |
| Hdd, |
| BiosSetup, |
| Utilities, |
| Diags, |
| UefiShell, |
| UefiTarget, |
| SDCard, |
| UefiHttp, |
| RemoteDrive, |
| UefiBootNext, |
| Recovery, |
| }; |
| |
| enum class SystemType : std::uint8_t{ |
| Invalid, |
| Physical, |
| Virtual, |
| OS, |
| PhysicallyPartitioned, |
| VirtuallyPartitioned, |
| Composed, |
| DPU, |
| }; |
| |
| enum class IndicatorLED : std::uint8_t{ |
| Invalid, |
| Unknown, |
| Lit, |
| Blinking, |
| Off, |
| }; |
| |
| enum class BootSourceOverrideEnabled : std::uint8_t{ |
| Invalid, |
| Disabled, |
| Once, |
| Continuous, |
| }; |
| |
| enum class MemoryMirroring : std::uint8_t{ |
| Invalid, |
| System, |
| DIMM, |
| Hybrid, |
| None, |
| }; |
| |
| enum class BootSourceOverrideMode : std::uint8_t{ |
| Invalid, |
| Legacy, |
| UEFI, |
| }; |
| |
| enum class InterfaceType : std::uint8_t{ |
| Invalid, |
| TPM1_2, |
| TPM2_0, |
| TCM1_0, |
| }; |
| |
| enum class HostingRole : std::uint8_t{ |
| Invalid, |
| ApplicationServer, |
| StorageServer, |
| Switch, |
| Appliance, |
| BareMetalServer, |
| VirtualMachineServer, |
| ContainerServer, |
| }; |
| |
| enum class InterfaceTypeSelection : std::uint8_t{ |
| Invalid, |
| None, |
| FirmwareUpdate, |
| BiosSetting, |
| OemMethod, |
| }; |
| |
| enum class WatchdogWarningActions : std::uint8_t{ |
| Invalid, |
| None, |
| DiagnosticInterrupt, |
| SMI, |
| MessagingInterrupt, |
| SCI, |
| OEM, |
| }; |
| |
| enum class WatchdogTimeoutActions : std::uint8_t{ |
| Invalid, |
| None, |
| ResetSystem, |
| PowerCycle, |
| PowerDown, |
| OEM, |
| }; |
| |
| enum class PowerRestorePolicyTypes : std::uint8_t{ |
| Invalid, |
| AlwaysOn, |
| AlwaysOff, |
| LastState, |
| }; |
| |
| enum class BootOrderTypes : std::uint8_t{ |
| Invalid, |
| BootOrder, |
| AliasBootOrder, |
| }; |
| |
| enum class AutomaticRetryConfig : std::uint8_t{ |
| Invalid, |
| Disabled, |
| RetryAttempts, |
| RetryAlways, |
| }; |
| |
| enum class BootProgressTypes : std::uint8_t{ |
| Invalid, |
| None, |
| PrimaryProcessorInitializationStarted, |
| BusInitializationStarted, |
| MemoryInitializationStarted, |
| SecondaryProcessorInitializationStarted, |
| PCIResourceConfigStarted, |
| SystemHardwareInitializationComplete, |
| SetupEntered, |
| OSBootStarted, |
| OSRunning, |
| OEM, |
| }; |
| |
| enum class GraphicalConnectTypesSupported : std::uint8_t{ |
| Invalid, |
| KVMIP, |
| OEM, |
| }; |
| |
| enum class TrustedModuleRequiredToBoot : std::uint8_t{ |
| Invalid, |
| Disabled, |
| Required, |
| }; |
| |
| enum class StopBootOnFault : std::uint8_t{ |
| Invalid, |
| Never, |
| AnyFault, |
| }; |
| |
| enum class PowerMode : std::uint8_t{ |
| Invalid, |
| MaximumPerformance, |
| BalancedPerformance, |
| PowerSaving, |
| Static, |
| OSControlled, |
| OEM, |
| }; |
| |
| enum class CompositionUseCase : std::uint8_t{ |
| Invalid, |
| ResourceBlockCapable, |
| ExpandableSystem, |
| }; |
| |
| enum class KMIPCachePolicy : std::uint8_t{ |
| Invalid, |
| None, |
| AfterFirstUse, |
| }; |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(BootSource, { |
| {BootSource::Invalid, "Invalid"}, |
| {BootSource::None, "None"}, |
| {BootSource::Pxe, "Pxe"}, |
| {BootSource::Floppy, "Floppy"}, |
| {BootSource::Cd, "Cd"}, |
| {BootSource::Usb, "Usb"}, |
| {BootSource::Hdd, "Hdd"}, |
| {BootSource::BiosSetup, "BiosSetup"}, |
| {BootSource::Utilities, "Utilities"}, |
| {BootSource::Diags, "Diags"}, |
| {BootSource::UefiShell, "UefiShell"}, |
| {BootSource::UefiTarget, "UefiTarget"}, |
| {BootSource::SDCard, "SDCard"}, |
| {BootSource::UefiHttp, "UefiHttp"}, |
| {BootSource::RemoteDrive, "RemoteDrive"}, |
| {BootSource::UefiBootNext, "UefiBootNext"}, |
| {BootSource::Recovery, "Recovery"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(SystemType, { |
| {SystemType::Invalid, "Invalid"}, |
| {SystemType::Physical, "Physical"}, |
| {SystemType::Virtual, "Virtual"}, |
| {SystemType::OS, "OS"}, |
| {SystemType::PhysicallyPartitioned, "PhysicallyPartitioned"}, |
| {SystemType::VirtuallyPartitioned, "VirtuallyPartitioned"}, |
| {SystemType::Composed, "Composed"}, |
| {SystemType::DPU, "DPU"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(IndicatorLED, { |
| {IndicatorLED::Invalid, "Invalid"}, |
| {IndicatorLED::Unknown, "Unknown"}, |
| {IndicatorLED::Lit, "Lit"}, |
| {IndicatorLED::Blinking, "Blinking"}, |
| {IndicatorLED::Off, "Off"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(BootSourceOverrideEnabled, { |
| {BootSourceOverrideEnabled::Invalid, "Invalid"}, |
| {BootSourceOverrideEnabled::Disabled, "Disabled"}, |
| {BootSourceOverrideEnabled::Once, "Once"}, |
| {BootSourceOverrideEnabled::Continuous, "Continuous"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(MemoryMirroring, { |
| {MemoryMirroring::Invalid, "Invalid"}, |
| {MemoryMirroring::System, "System"}, |
| {MemoryMirroring::DIMM, "DIMM"}, |
| {MemoryMirroring::Hybrid, "Hybrid"}, |
| {MemoryMirroring::None, "None"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(BootSourceOverrideMode, { |
| {BootSourceOverrideMode::Invalid, "Invalid"}, |
| {BootSourceOverrideMode::Legacy, "Legacy"}, |
| {BootSourceOverrideMode::UEFI, "UEFI"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(InterfaceType, { |
| {InterfaceType::Invalid, "Invalid"}, |
| {InterfaceType::TPM1_2, "TPM1_2"}, |
| {InterfaceType::TPM2_0, "TPM2_0"}, |
| {InterfaceType::TCM1_0, "TCM1_0"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(HostingRole, { |
| {HostingRole::Invalid, "Invalid"}, |
| {HostingRole::ApplicationServer, "ApplicationServer"}, |
| {HostingRole::StorageServer, "StorageServer"}, |
| {HostingRole::Switch, "Switch"}, |
| {HostingRole::Appliance, "Appliance"}, |
| {HostingRole::BareMetalServer, "BareMetalServer"}, |
| {HostingRole::VirtualMachineServer, "VirtualMachineServer"}, |
| {HostingRole::ContainerServer, "ContainerServer"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(InterfaceTypeSelection, { |
| {InterfaceTypeSelection::Invalid, "Invalid"}, |
| {InterfaceTypeSelection::None, "None"}, |
| {InterfaceTypeSelection::FirmwareUpdate, "FirmwareUpdate"}, |
| {InterfaceTypeSelection::BiosSetting, "BiosSetting"}, |
| {InterfaceTypeSelection::OemMethod, "OemMethod"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(WatchdogWarningActions, { |
| {WatchdogWarningActions::Invalid, "Invalid"}, |
| {WatchdogWarningActions::None, "None"}, |
| {WatchdogWarningActions::DiagnosticInterrupt, "DiagnosticInterrupt"}, |
| {WatchdogWarningActions::SMI, "SMI"}, |
| {WatchdogWarningActions::MessagingInterrupt, "MessagingInterrupt"}, |
| {WatchdogWarningActions::SCI, "SCI"}, |
| {WatchdogWarningActions::OEM, "OEM"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(WatchdogTimeoutActions, { |
| {WatchdogTimeoutActions::Invalid, "Invalid"}, |
| {WatchdogTimeoutActions::None, "None"}, |
| {WatchdogTimeoutActions::ResetSystem, "ResetSystem"}, |
| {WatchdogTimeoutActions::PowerCycle, "PowerCycle"}, |
| {WatchdogTimeoutActions::PowerDown, "PowerDown"}, |
| {WatchdogTimeoutActions::OEM, "OEM"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(PowerRestorePolicyTypes, { |
| {PowerRestorePolicyTypes::Invalid, "Invalid"}, |
| {PowerRestorePolicyTypes::AlwaysOn, "AlwaysOn"}, |
| {PowerRestorePolicyTypes::AlwaysOff, "AlwaysOff"}, |
| {PowerRestorePolicyTypes::LastState, "LastState"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(BootOrderTypes, { |
| {BootOrderTypes::Invalid, "Invalid"}, |
| {BootOrderTypes::BootOrder, "BootOrder"}, |
| {BootOrderTypes::AliasBootOrder, "AliasBootOrder"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(AutomaticRetryConfig, { |
| {AutomaticRetryConfig::Invalid, "Invalid"}, |
| {AutomaticRetryConfig::Disabled, "Disabled"}, |
| {AutomaticRetryConfig::RetryAttempts, "RetryAttempts"}, |
| {AutomaticRetryConfig::RetryAlways, "RetryAlways"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(BootProgressTypes, { |
| {BootProgressTypes::Invalid, "Invalid"}, |
| {BootProgressTypes::None, "None"}, |
| {BootProgressTypes::PrimaryProcessorInitializationStarted, "PrimaryProcessorInitializationStarted"}, |
| {BootProgressTypes::BusInitializationStarted, "BusInitializationStarted"}, |
| {BootProgressTypes::MemoryInitializationStarted, "MemoryInitializationStarted"}, |
| {BootProgressTypes::SecondaryProcessorInitializationStarted, "SecondaryProcessorInitializationStarted"}, |
| {BootProgressTypes::PCIResourceConfigStarted, "PCIResourceConfigStarted"}, |
| {BootProgressTypes::SystemHardwareInitializationComplete, "SystemHardwareInitializationComplete"}, |
| {BootProgressTypes::SetupEntered, "SetupEntered"}, |
| {BootProgressTypes::OSBootStarted, "OSBootStarted"}, |
| {BootProgressTypes::OSRunning, "OSRunning"}, |
| {BootProgressTypes::OEM, "OEM"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(GraphicalConnectTypesSupported, { |
| {GraphicalConnectTypesSupported::Invalid, "Invalid"}, |
| {GraphicalConnectTypesSupported::KVMIP, "KVMIP"}, |
| {GraphicalConnectTypesSupported::OEM, "OEM"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(TrustedModuleRequiredToBoot, { |
| {TrustedModuleRequiredToBoot::Invalid, "Invalid"}, |
| {TrustedModuleRequiredToBoot::Disabled, "Disabled"}, |
| {TrustedModuleRequiredToBoot::Required, "Required"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(StopBootOnFault, { |
| {StopBootOnFault::Invalid, "Invalid"}, |
| {StopBootOnFault::Never, "Never"}, |
| {StopBootOnFault::AnyFault, "AnyFault"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(PowerMode, { |
| {PowerMode::Invalid, "Invalid"}, |
| {PowerMode::MaximumPerformance, "MaximumPerformance"}, |
| {PowerMode::BalancedPerformance, "BalancedPerformance"}, |
| {PowerMode::PowerSaving, "PowerSaving"}, |
| {PowerMode::Static, "Static"}, |
| {PowerMode::OSControlled, "OSControlled"}, |
| {PowerMode::OEM, "OEM"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(CompositionUseCase, { |
| {CompositionUseCase::Invalid, "Invalid"}, |
| {CompositionUseCase::ResourceBlockCapable, "ResourceBlockCapable"}, |
| {CompositionUseCase::ExpandableSystem, "ExpandableSystem"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(KMIPCachePolicy, { |
| {KMIPCachePolicy::Invalid, "Invalid"}, |
| {KMIPCachePolicy::None, "None"}, |
| {KMIPCachePolicy::AfterFirstUse, "AfterFirstUse"}, |
| }); |
| |
| } // namespace computer_system |
| // clang-format on |