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