Create VES client example for domain 'notification'
[oam.git] / features / devicemanager / g-ran / ru-fh / provider / src / main / java / org / opendaylight / yang / gen / v1 / urn / _3gpp / tsg / sa5 / nrm / types / rev180731 / NFType.java
1 package org.opendaylight.yang.gen.v1.urn._3gpp.tsg.sa5.nrm.types.rev180731;
2 import com.google.common.collect.ImmutableMap;
3 import com.google.common.collect.ImmutableMap.Builder;
4 import java.lang.Integer;
5 import java.lang.Override;
6 import java.lang.String;
7 import java.util.Map;
8 import java.util.Objects;
9 import java.util.Optional;
10 import org.opendaylight.yangtools.yang.binding.Enumeration;
11
12 public enum NFType implements Enumeration {
13     NRF(0, "NRF"),
14     
15     UDM(1, "UDM"),
16     
17     AMF(2, "AMF"),
18     
19     SMF(3, "SMF"),
20     
21     AUSF(4, "AUSF"),
22     
23     NEF(5, "NEF"),
24     
25     PCF(6, "PCF"),
26     
27     SMSF(7, "SMSF"),
28     
29     NSSF(8, "NSSF"),
30     
31     UDR(9, "UDR"),
32     
33     LMF(10, "LMF"),
34     
35     GMLC(11, "GMLC"),
36     
37     _5GEIR(12, "5G_EIR"),
38     
39     SEPP(13, "SEPP"),
40     
41     UPF(14, "UPF"),
42     
43     N3IWF(15, "N3IWF"),
44     
45     AF(16, "AF"),
46     
47     UDSF(17, "UDSF"),
48     
49     BSF(18, "BSF"),
50     
51     CHF(19, "CHF")
52     ;
53
54     private static final Map<String, NFType> NAME_MAP;
55     private static final Map<Integer, NFType> VALUE_MAP;
56
57     static {
58         final Builder<String, NFType> nb = ImmutableMap.builder();
59         final Builder<Integer, NFType> vb = ImmutableMap.builder();
60         for (NFType enumItem : NFType.values()) {
61             vb.put(enumItem.value, enumItem);
62             nb.put(enumItem.name, enumItem);
63         }
64
65         NAME_MAP = nb.build();
66         VALUE_MAP = vb.build();
67     }
68
69     private final String name;
70     private final int value;
71
72     private NFType(int value, String name) {
73         this.value = value;
74         this.name = name;
75     }
76
77     @Override
78     public String getName() {
79         return name;
80     }
81
82     @Override
83     public int getIntValue() {
84         return value;
85     }
86
87     /**
88      * Return the enumeration member whose {@link #getName()} matches specified value.
89      *
90      * @param name YANG assigned name
91      * @return corresponding NFType item, if present
92      * @throws NullPointerException if name is null
93      */
94     public static Optional<NFType> forName(String name) {
95         return Optional.ofNullable(NAME_MAP.get(Objects.requireNonNull(name)));
96     }
97
98     /**
99      * Return the enumeration member whose {@link #getIntValue()} matches specified value.
100      *
101      * @param intValue integer value
102      * @return corresponding NFType item, or null if no such item exists
103      */
104     public static NFType forValue(int intValue) {
105         return VALUE_MAP.get(intValue);
106     }
107 }