aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-gran/provider/src/main/java/org/opendaylight/yang/gen/v1/urn/_3gpp/tsg/sa5/nrm/types/rev180731/TAvailabilityStatus.java
blob: d86f688807a88613f37e491f1c5d33be0adc0d35 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
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 TAvailabilityStatus implements Enumeration {
    /**
     * The resource is undergoing a test procedure. If the administrativestate is 
     * locked or shutting down then normal users are precluded from usingthe resource 
     * and the control status attribute has the value reserved for test.Tests that do 
     * not exclude additional users can be present in any operationalor administrative 
     * state but the reserved for test condition should not bepresent.
     *
     */
    INTEST(0, "IN TEST"),
    
    /**
     * The resource has an internal fault that prevents it from operating.The 
     * operational state is disabled.
     *
     */
    FAILED(1, "FAILED"),
    
    /**
     * The resource requires power to be applied and is not powered on.For example, a 
     * fuse or other protection device is known to have removedpower or a low voltage 
     * condition has been detected. The operational stateis disabled.
     *
     */
    POWEROFF(2, "POWER OFF"),
    
    /**
     * The resource requires a routine operation to be performed to placeit online and 
     * make it available for use. The operation may be manual orautomatic, or both. The
     * operational state is disabled.
     *
     */
    OFFLINE(3, "OFF LINE"),
    
    /**
     * The resource has been made inactive by an internal control processin accordance 
     * with a predetermined time schedule. Under normal conditionsthe control process 
     * can be expected to reactivate the resource at somescheduled time, and it is 
     * therefore considered to be optional. Theoperational state is enabled or 
     * disabled.
     *
     */
    OFFDUTY(4, "OFF DUTY"),
    
    /**
     * The resource cannot operate because some other resource on which itdepends is 
     * (i.e. a resource not represented by the same managed object)unavailable. For 
     * example, a device is not accessible because its controlleris powered off. The 
     * operational state is disabled.
     *
     */
    DEPENDENCY(5, "DEPENDENCY"),
    
    /**
     * The service available from the resource is degraded in some respect,such as in 
     * speed or operating capacity. Failure of a test or an unacceptableperformance 
     * measurement has established that some or all services are notfunctional or are 
     * degraded due to the presence of a defect. However, theresource remains available
     * for service, either because some services aresatisfactory or because degraded 
     * service is preferable to no service at all.Object specific attributes may be 
     * defined to represent further informationindicating, for example, which services 
     * are not functional and the nature ofthe degradation. The operational state is 
     * enabled.
     *
     */
    DEGRADED(6, "DEGRADED"),
    
    /**
     * The resource represented by the managed object is not present, or isincomplete. 
     * For example, a plug-in module is missing, a cable is disconnectedor a software 
     * module is not loaded. The operational state is disabled.
     *
     */
    NOTINSTALLED(7, "NOT INSTALLED"),
    
    /**
     * This indicates a log full condition.
     *
     */
    LOGFULL(8, "LOG FULL")
    ;

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

    static {
        final Builder<String, TAvailabilityStatus> nb = ImmutableMap.builder();
        final Builder<Integer, TAvailabilityStatus> vb = ImmutableMap.builder();
        for (TAvailabilityStatus enumItem : TAvailabilityStatus.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 TAvailabilityStatus(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 TAvailabilityStatus item, if present
     * @throws NullPointerException if name is null
     */
    public static Optional<TAvailabilityStatus> 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 TAvailabilityStatus item, or null if no such item exists
     */
    public static TAvailabilityStatus forValue(int intValue) {
        return VALUE_MAP.get(intValue);
    }
}