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;
8 import java.util.Objects;
9 import java.util.Optional;
10 import org.opendaylight.yangtools.yang.binding.Enumeration;
12 public enum TAvailabilityStatus implements Enumeration {
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.
24 * The resource has an internal fault that prevents it from operating.The
25 * operational state is disabled.
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.
36 POWEROFF(2, "POWER OFF"),
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.
44 OFFLINE(3, "OFF LINE"),
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
54 OFFDUTY(4, "OFF DUTY"),
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.
63 DEPENDENCY(5, "DEPENDENCY"),
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
77 DEGRADED(6, "DEGRADED"),
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.
85 NOTINSTALLED(7, "NOT INSTALLED"),
88 * This indicates a log full condition.
91 LOGFULL(8, "LOG FULL")
94 private static final Map<String, TAvailabilityStatus> NAME_MAP;
95 private static final Map<Integer, TAvailabilityStatus> VALUE_MAP;
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);
105 NAME_MAP = nb.build();
106 VALUE_MAP = vb.build();
109 private final String name;
110 private final int value;
112 private TAvailabilityStatus(int value, String name) {
118 public String getName() {
123 public int getIntValue() {
128 * Return the enumeration member whose {@link #getName()} matches specified value.
130 * @param name YANG assigned name
131 * @return corresponding TAvailabilityStatus item, if present
132 * @throws NullPointerException if name is null
134 public static Optional<TAvailabilityStatus> forName(String name) {
135 return Optional.ofNullable(NAME_MAP.get(Objects.requireNonNull(name)));
139 * Return the enumeration member whose {@link #getIntValue()} matches specified value.
141 * @param intValue integer value
142 * @return corresponding TAvailabilityStatus item, or null if no such item exists
144 public static TAvailabilityStatus forValue(int intValue) {
145 return VALUE_MAP.get(intValue);