1 #pragma once
2 #include <nlohmann/json.hpp>
3 
4 namespace endpoint
5 {
6 // clang-format off
7 
8 enum class EntityType{
9     Invalid,
10     StorageInitiator,
11     RootComplex,
12     NetworkController,
13     Drive,
14     StorageExpander,
15     DisplayController,
16     Bridge,
17     Processor,
18     Volume,
19     AccelerationFunction,
20     MediaController,
21     MemoryChunk,
22     Switch,
23     FabricBridge,
24     Manager,
25     StorageSubsystem,
26     Memory,
27     CXLDevice,
28 };
29 
30 enum class EntityRole{
31     Invalid,
32     Initiator,
33     Target,
34     Both,
35 };
36 
37 NLOHMANN_JSON_SERIALIZE_ENUM(EntityType, {
38     {EntityType::Invalid, "Invalid"},
39     {EntityType::StorageInitiator, "StorageInitiator"},
40     {EntityType::RootComplex, "RootComplex"},
41     {EntityType::NetworkController, "NetworkController"},
42     {EntityType::Drive, "Drive"},
43     {EntityType::StorageExpander, "StorageExpander"},
44     {EntityType::DisplayController, "DisplayController"},
45     {EntityType::Bridge, "Bridge"},
46     {EntityType::Processor, "Processor"},
47     {EntityType::Volume, "Volume"},
48     {EntityType::AccelerationFunction, "AccelerationFunction"},
49     {EntityType::MediaController, "MediaController"},
50     {EntityType::MemoryChunk, "MemoryChunk"},
51     {EntityType::Switch, "Switch"},
52     {EntityType::FabricBridge, "FabricBridge"},
53     {EntityType::Manager, "Manager"},
54     {EntityType::StorageSubsystem, "StorageSubsystem"},
55     {EntityType::Memory, "Memory"},
56     {EntityType::CXLDevice, "CXLDevice"},
57 });
58 
59 NLOHMANN_JSON_SERIALIZE_ENUM(EntityRole, {
60     {EntityRole::Invalid, "Invalid"},
61     {EntityRole::Initiator, "Initiator"},
62     {EntityRole::Target, "Target"},
63     {EntityRole::Both, "Both"},
64 });
65 
66 }
67 // clang-format on
68