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