aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-gran/provider/src/main/java/org/opendaylight/yang/gen/v1/urn/_3gpp/tsg/sa5/nrm/types/rev180731/TUEMobilityLevel.java
blob: 96aa56c07d4cf2e244ead662498392b417c6fd20 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package org.opendaylight.yang.gen.v1.urn._3gpp.tsg.sa5.nrm.types.rev180731;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import org.opendaylight.yangtools.yang.binding.Enumeration;

public enum TUEMobilityLevel implements Enumeration {
    Stationary(0, "stationary"),
    
    Nomadic(1, "nomadic"),
    
    RestrictedMobility(2, "restricted mobility"),
    
    FullyMobility(3, "fully mobility")
    ;

    private static final Map<String, TUEMobilityLevel> NAME_MAP;
    private static final Map<Integer, TUEMobilityLevel> VALUE_MAP;

    static {
        final Builder<String, TUEMobilityLevel> nb = ImmutableMap.builder();
        final Builder<Integer, TUEMobilityLevel> vb = ImmutableMap.builder();
        for (TUEMobilityLevel enumItem : TUEMobilityLevel.values()) {
            vb.put(enumItem.value, enumItem);
            nb.put(enumItem.name, enumItem);
        }

        NAME_MAP = nb.build();
        VALUE_MAP = vb.build();
    }

    private final String name;
    private final int value;

    private TUEMobilityLevel(int value, String name) {
        this.value = value;
        this.name = name;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public int getIntValue() {
        return value;
    }

    /**
     * Return the enumeration member whose {@link #getName()} matches specified value.
     *
     * @param name YANG assigned name
     * @return corresponding TUEMobilityLevel item, if present
     * @throws NullPointerException if name is null
     */
    public static Optional<TUEMobilityLevel> forName(String name) {
        return Optional.ofNullable(NAME_MAP.get(Objects.requireNonNull(name)));
    }

    /**
     * Return the enumeration member whose {@link #getIntValue()} matches specified value.
     *
     * @param intValue integer value
     * @return corresponding TUEMobilityLevel item, or null if no such item exists
     */
    public static TUEMobilityLevel forValue(int intValue) {
        return VALUE_MAP.get(intValue);
    }
}