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 / TAvailabilityStatus.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 TAvailabilityStatus implements Enumeration {
13     /**
14      * The resource is undergoing a test procedure. If the administrativestate is 
15      * locked or shutting down then normal users are precluded from usingthe resource 
16      * and the control status attribute has the value reserved for test.Tests that do 
17      * not exclude additional users can be present in any operationalor administrative 
18      * state but the reserved for test condition should not bepresent.
19      *
20      */
21     INTEST(0, "IN TEST"),
22     
23     /**
24      * The resource has an internal fault that prevents it from operating.The 
25      * operational state is disabled.
26      *
27      */
28     FAILED(1, "FAILED"),
29     
30     /**
31      * The resource requires power to be applied and is not powered on.For example, a 
32      * fuse or other protection device is known to have removedpower or a low voltage 
33      * condition has been detected. The operational stateis disabled.
34      *
35      */
36     POWEROFF(2, "POWER OFF"),
37     
38     /**
39      * The resource requires a routine operation to be performed to placeit online and 
40      * make it available for use. The operation may be manual orautomatic, or both. The
41      * operational state is disabled.
42      *
43      */
44     OFFLINE(3, "OFF LINE"),
45     
46     /**
47      * The resource has been made inactive by an internal control processin accordance 
48      * with a predetermined time schedule. Under normal conditionsthe control process 
49      * can be expected to reactivate the resource at somescheduled time, and it is 
50      * therefore considered to be optional. Theoperational state is enabled or 
51      * disabled.
52      *
53      */
54     OFFDUTY(4, "OFF DUTY"),
55     
56     /**
57      * The resource cannot operate because some other resource on which itdepends is 
58      * (i.e. a resource not represented by the same managed object)unavailable. For 
59      * example, a device is not accessible because its controlleris powered off. The 
60      * operational state is disabled.
61      *
62      */
63     DEPENDENCY(5, "DEPENDENCY"),
64     
65     /**
66      * The service available from the resource is degraded in some respect,such as in 
67      * speed or operating capacity. Failure of a test or an unacceptableperformance 
68      * measurement has established that some or all services are notfunctional or are 
69      * degraded due to the presence of a defect. However, theresource remains available
70      * for service, either because some services aresatisfactory or because degraded 
71      * service is preferable to no service at all.Object specific attributes may be 
72      * defined to represent further informationindicating, for example, which services 
73      * are not functional and the nature ofthe degradation. The operational state is 
74      * enabled.
75      *
76      */
77     DEGRADED(6, "DEGRADED"),
78     
79     /**
80      * The resource represented by the managed object is not present, or isincomplete. 
81      * For example, a plug-in module is missing, a cable is disconnectedor a software 
82      * module is not loaded. The operational state is disabled.
83      *
84      */
85     NOTINSTALLED(7, "NOT INSTALLED"),
86     
87     /**
88      * This indicates a log full condition.
89      *
90      */
91     LOGFULL(8, "LOG FULL")
92     ;
93
94     private static final Map<String, TAvailabilityStatus> NAME_MAP;
95     private static final Map<Integer, TAvailabilityStatus> VALUE_MAP;
96
97     static {
98         final Builder<String, TAvailabilityStatus> nb = ImmutableMap.builder();
99         final Builder<Integer, TAvailabilityStatus> vb = ImmutableMap.builder();
100         for (TAvailabilityStatus enumItem : TAvailabilityStatus.values()) {
101             vb.put(enumItem.value, enumItem);
102             nb.put(enumItem.name, enumItem);
103         }
104
105         NAME_MAP = nb.build();
106         VALUE_MAP = vb.build();
107     }
108
109     private final String name;
110     private final int value;
111
112     private TAvailabilityStatus(int value, String name) {
113         this.value = value;
114         this.name = name;
115     }
116
117     @Override
118     public String getName() {
119         return name;
120     }
121
122     @Override
123     public int getIntValue() {
124         return value;
125     }
126
127     /**
128      * Return the enumeration member whose {@link #getName()} matches specified value.
129      *
130      * @param name YANG assigned name
131      * @return corresponding TAvailabilityStatus item, if present
132      * @throws NullPointerException if name is null
133      */
134     public static Optional<TAvailabilityStatus> forName(String name) {
135         return Optional.ofNullable(NAME_MAP.get(Objects.requireNonNull(name)));
136     }
137
138     /**
139      * Return the enumeration member whose {@link #getIntValue()} matches specified value.
140      *
141      * @param intValue integer value
142      * @return corresponding TAvailabilityStatus item, or null if no such item exists
143      */
144     public static TAvailabilityStatus forValue(int intValue) {
145         return VALUE_MAP.get(intValue);
146     }
147 }