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 / TAdministrativeState.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 TAdministrativeState implements Enumeration {
13     /**
14      * The resource is administratively prohibited from performingservices for its 
15      * users.
16      *
17      */
18     Locked(0, "Locked"),
19     
20     /**
21      * Use of the resource is administratively permitted to existinginstances of use 
22      * only. While the system remains in the shutting down statethe manager may at any 
23      * time cause the managed object to revert to theunlocked state.
24      *
25      */
26     Shutdown(1, "Shutdown"),
27     
28     /**
29      * The resource is administratively permitted to perform services forits users. 
30      * This is independent of its inherent operability.
31      *
32      */
33     Unlocked(2, "Unlocked")
34     ;
35
36     private static final Map<String, TAdministrativeState> NAME_MAP;
37     private static final Map<Integer, TAdministrativeState> VALUE_MAP;
38
39     static {
40         final Builder<String, TAdministrativeState> nb = ImmutableMap.builder();
41         final Builder<Integer, TAdministrativeState> vb = ImmutableMap.builder();
42         for (TAdministrativeState enumItem : TAdministrativeState.values()) {
43             vb.put(enumItem.value, enumItem);
44             nb.put(enumItem.name, enumItem);
45         }
46
47         NAME_MAP = nb.build();
48         VALUE_MAP = vb.build();
49     }
50
51     private final String name;
52     private final int value;
53
54     private TAdministrativeState(int value, String name) {
55         this.value = value;
56         this.name = name;
57     }
58
59     @Override
60     public String getName() {
61         return name;
62     }
63
64     @Override
65     public int getIntValue() {
66         return value;
67     }
68
69     /**
70      * Return the enumeration member whose {@link #getName()} matches specified value.
71      *
72      * @param name YANG assigned name
73      * @return corresponding TAdministrativeState item, if present
74      * @throws NullPointerException if name is null
75      */
76     public static Optional<TAdministrativeState> forName(String name) {
77         return Optional.ofNullable(NAME_MAP.get(Objects.requireNonNull(name)));
78     }
79
80     /**
81      * Return the enumeration member whose {@link #getIntValue()} matches specified value.
82      *
83      * @param intValue integer value
84      * @return corresponding TAdministrativeState item, or null if no such item exists
85      */
86     public static TAdministrativeState forValue(int intValue) {
87         return VALUE_MAP.get(intValue);
88     }
89 }