summaryrefslogtreecommitdiff
path: root/redfish-core/include/generated/enums/allow_deny.hpp
blob: 9be5b9a3577ecf32a30c01a18eded81f34d7b743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include <nlohmann/json.hpp>

namespace allow_deny
{
// clang-format off

enum class IPAddressType{
    Invalid,
    IPv4,
    IPv6,
};

enum class AllowType{
    Invalid,
    Allow,
    Deny,
};

enum class DataDirection{
    Invalid,
    Ingress,
    Egress,
};

NLOHMANN_JSON_SERIALIZE_ENUM(IPAddressType, {
    {IPAddressType::Invalid, "Invalid"},
    {IPAddressType::IPv4, "IPv4"},
    {IPAddressType::IPv6, "IPv6"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(AllowType, {
    {AllowType::Invalid, "Invalid"},
    {AllowType::Allow, "Allow"},
    {AllowType::Deny, "Deny"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(DataDirection, {
    {DataDirection::Invalid, "Invalid"},
    {DataDirection::Ingress, "Ingress"},
    {DataDirection::Egress, "Egress"},
});

// clang-format on
} // namespace allow_deny