xref: /openbmc/bmcweb/features/redfish/include/generated/enums/pcie_device.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 pcie_device
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class PCIeTypes{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     Gen1,
130ec8b83dSEd Tanous     Gen2,
140ec8b83dSEd Tanous     Gen3,
150ec8b83dSEd Tanous     Gen4,
160ec8b83dSEd Tanous     Gen5,
17dd5c81e9SGunnar Mills     Gen6,
180ec8b83dSEd Tanous };
190ec8b83dSEd Tanous 
200ec8b83dSEd Tanous enum class DeviceType{
210ec8b83dSEd Tanous     Invalid,
220ec8b83dSEd Tanous     SingleFunction,
230ec8b83dSEd Tanous     MultiFunction,
240ec8b83dSEd Tanous     Simulated,
250ec8b83dSEd Tanous     Retimer,
260ec8b83dSEd Tanous };
270ec8b83dSEd Tanous 
280ec8b83dSEd Tanous enum class SlotType{
290ec8b83dSEd Tanous     Invalid,
300ec8b83dSEd Tanous     FullLength,
310ec8b83dSEd Tanous     HalfLength,
320ec8b83dSEd Tanous     LowProfile,
330ec8b83dSEd Tanous     Mini,
340ec8b83dSEd Tanous     M2,
350ec8b83dSEd Tanous     OEM,
360ec8b83dSEd Tanous     OCP3Small,
370ec8b83dSEd Tanous     OCP3Large,
380ec8b83dSEd Tanous     U2,
390ec8b83dSEd Tanous };
400ec8b83dSEd Tanous 
410ec8b83dSEd Tanous enum class LaneSplittingType{
420ec8b83dSEd Tanous     Invalid,
430ec8b83dSEd Tanous     None,
440ec8b83dSEd Tanous     Bridged,
450ec8b83dSEd Tanous     Bifurcated,
460ec8b83dSEd Tanous };
470ec8b83dSEd Tanous 
48a8d8f9d8SEd Tanous enum class CXLDeviceType{
49a8d8f9d8SEd Tanous     Invalid,
50a8d8f9d8SEd Tanous     Type1,
51a8d8f9d8SEd Tanous     Type2,
52a8d8f9d8SEd Tanous     Type3,
53a8d8f9d8SEd Tanous };
54a8d8f9d8SEd Tanous 
55e9cc1bc9SEd Tanous enum class CXLDynamicCapacityPolicies{
56e9cc1bc9SEd Tanous     Invalid,
57e9cc1bc9SEd Tanous     Free,
58e9cc1bc9SEd Tanous     Contiguous,
59e9cc1bc9SEd Tanous     Prescriptive,
60e9cc1bc9SEd Tanous     TagBased,
61e9cc1bc9SEd Tanous };
62e9cc1bc9SEd Tanous 
630ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(PCIeTypes, {
640ec8b83dSEd Tanous     {PCIeTypes::Invalid, "Invalid"},
650ec8b83dSEd Tanous     {PCIeTypes::Gen1, "Gen1"},
660ec8b83dSEd Tanous     {PCIeTypes::Gen2, "Gen2"},
670ec8b83dSEd Tanous     {PCIeTypes::Gen3, "Gen3"},
680ec8b83dSEd Tanous     {PCIeTypes::Gen4, "Gen4"},
690ec8b83dSEd Tanous     {PCIeTypes::Gen5, "Gen5"},
70dd5c81e9SGunnar Mills     {PCIeTypes::Gen6, "Gen6"},
710ec8b83dSEd Tanous });
720ec8b83dSEd Tanous 
730ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DeviceType, {
740ec8b83dSEd Tanous     {DeviceType::Invalid, "Invalid"},
750ec8b83dSEd Tanous     {DeviceType::SingleFunction, "SingleFunction"},
760ec8b83dSEd Tanous     {DeviceType::MultiFunction, "MultiFunction"},
770ec8b83dSEd Tanous     {DeviceType::Simulated, "Simulated"},
780ec8b83dSEd Tanous     {DeviceType::Retimer, "Retimer"},
790ec8b83dSEd Tanous });
800ec8b83dSEd Tanous 
810ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SlotType, {
820ec8b83dSEd Tanous     {SlotType::Invalid, "Invalid"},
830ec8b83dSEd Tanous     {SlotType::FullLength, "FullLength"},
840ec8b83dSEd Tanous     {SlotType::HalfLength, "HalfLength"},
850ec8b83dSEd Tanous     {SlotType::LowProfile, "LowProfile"},
860ec8b83dSEd Tanous     {SlotType::Mini, "Mini"},
870ec8b83dSEd Tanous     {SlotType::M2, "M2"},
880ec8b83dSEd Tanous     {SlotType::OEM, "OEM"},
890ec8b83dSEd Tanous     {SlotType::OCP3Small, "OCP3Small"},
900ec8b83dSEd Tanous     {SlotType::OCP3Large, "OCP3Large"},
910ec8b83dSEd Tanous     {SlotType::U2, "U2"},
920ec8b83dSEd Tanous });
930ec8b83dSEd Tanous 
940ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LaneSplittingType, {
950ec8b83dSEd Tanous     {LaneSplittingType::Invalid, "Invalid"},
960ec8b83dSEd Tanous     {LaneSplittingType::None, "None"},
970ec8b83dSEd Tanous     {LaneSplittingType::Bridged, "Bridged"},
980ec8b83dSEd Tanous     {LaneSplittingType::Bifurcated, "Bifurcated"},
990ec8b83dSEd Tanous });
1000ec8b83dSEd Tanous 
101a8d8f9d8SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(CXLDeviceType, {
102a8d8f9d8SEd Tanous     {CXLDeviceType::Invalid, "Invalid"},
103a8d8f9d8SEd Tanous     {CXLDeviceType::Type1, "Type1"},
104a8d8f9d8SEd Tanous     {CXLDeviceType::Type2, "Type2"},
105a8d8f9d8SEd Tanous     {CXLDeviceType::Type3, "Type3"},
106a8d8f9d8SEd Tanous });
107a8d8f9d8SEd Tanous 
108e9cc1bc9SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(CXLDynamicCapacityPolicies, {
109e9cc1bc9SEd Tanous     {CXLDynamicCapacityPolicies::Invalid, "Invalid"},
110e9cc1bc9SEd Tanous     {CXLDynamicCapacityPolicies::Free, "Free"},
111e9cc1bc9SEd Tanous     {CXLDynamicCapacityPolicies::Contiguous, "Contiguous"},
112e9cc1bc9SEd Tanous     {CXLDynamicCapacityPolicies::Prescriptive, "Prescriptive"},
113e9cc1bc9SEd Tanous     {CXLDynamicCapacityPolicies::TagBased, "TagBased"},
114e9cc1bc9SEd Tanous });
115e9cc1bc9SEd Tanous 
1160ec8b83dSEd Tanous }
1170ec8b83dSEd Tanous // clang-format on
118