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 / N2InformationClass.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 N2InformationClass implements Enumeration {
13     SM(0, "SM"),
14     
15     NRPPa(1, "NRPPa"),
16     
17     PWS(2, "PWS"),
18     
19     PWSBCAL(3, "PWS-BCAL"),
20     
21     PWSRF(4, "PWS-RF")
22     ;
23
24     private static final Map<String, N2InformationClass> NAME_MAP;
25     private static final Map<Integer, N2InformationClass> VALUE_MAP;
26
27     static {
28         final Builder<String, N2InformationClass> nb = ImmutableMap.builder();
29         final Builder<Integer, N2InformationClass> vb = ImmutableMap.builder();
30         for (N2InformationClass enumItem : N2InformationClass.values()) {
31             vb.put(enumItem.value, enumItem);
32             nb.put(enumItem.name, enumItem);
33         }
34
35         NAME_MAP = nb.build();
36         VALUE_MAP = vb.build();
37     }
38
39     private final String name;
40     private final int value;
41
42     private N2InformationClass(int value, String name) {
43         this.value = value;
44         this.name = name;
45     }
46
47     @Override
48     public String getName() {
49         return name;
50     }
51
52     @Override
53     public int getIntValue() {
54         return value;
55     }
56
57     /**
58      * Return the enumeration member whose {@link #getName()} matches specified value.
59      *
60      * @param name YANG assigned name
61      * @return corresponding N2InformationClass item, if present
62      * @throws NullPointerException if name is null
63      */
64     public static Optional<N2InformationClass> forName(String name) {
65         return Optional.ofNullable(NAME_MAP.get(Objects.requireNonNull(name)));
66     }
67
68     /**
69      * Return the enumeration member whose {@link #getIntValue()} matches specified value.
70      *
71      * @param intValue integer value
72      * @return corresponding N2InformationClass item, or null if no such item exists
73      */
74     public static N2InformationClass forValue(int intValue) {
75         return VALUE_MAP.get(intValue);
76     }
77 }