diff options
author | 2019-12-14 00:50:38 +0100 | |
---|---|---|
committer | 2019-12-16 11:26:39 +0000 | |
commit | 6b98928b7b1b0ebc28d2ef286e8c932fca67c305 (patch) | |
tree | d734c78f257acfb7dd3dc4a74229ee23d93d79e3 /sdnr/wt/devicemanager-gran/provider/src/main/java/org/opendaylight/yang/gen/v1/urn/_3gpp/tsg/sa5/nrm/types/rev180731/NFStatus.java | |
parent | 2cf702de0b65fe132ec32b6abfffe4c2c976dca0 (diff) |
add new devicemanager
v2 add disaggregated devicemanager bundled
Issue-ID: SDNC-1007
Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: Ibb65f7f21deade7b3cef62c53b439519a931e301
Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-gran/provider/src/main/java/org/opendaylight/yang/gen/v1/urn/_3gpp/tsg/sa5/nrm/types/rev180731/NFStatus.java')
-rw-r--r-- | sdnr/wt/devicemanager-gran/provider/src/main/java/org/opendaylight/yang/gen/v1/urn/_3gpp/tsg/sa5/nrm/types/rev180731/NFStatus.java | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/sdnr/wt/devicemanager-gran/provider/src/main/java/org/opendaylight/yang/gen/v1/urn/_3gpp/tsg/sa5/nrm/types/rev180731/NFStatus.java b/sdnr/wt/devicemanager-gran/provider/src/main/java/org/opendaylight/yang/gen/v1/urn/_3gpp/tsg/sa5/nrm/types/rev180731/NFStatus.java new file mode 100644 index 000000000..aa11f7135 --- /dev/null +++ b/sdnr/wt/devicemanager-gran/provider/src/main/java/org/opendaylight/yang/gen/v1/urn/_3gpp/tsg/sa5/nrm/types/rev180731/NFStatus.java @@ -0,0 +1,71 @@ +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 NFStatus implements Enumeration { + REGISTERED(0, "REGISTERED"), + + SUSPENDED(1, "SUSPENDED") + ; + + private static final Map<String, NFStatus> NAME_MAP; + private static final Map<Integer, NFStatus> VALUE_MAP; + + static { + final Builder<String, NFStatus> nb = ImmutableMap.builder(); + final Builder<Integer, NFStatus> vb = ImmutableMap.builder(); + for (NFStatus enumItem : NFStatus.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 NFStatus(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 NFStatus item, if present + * @throws NullPointerException if name is null + */ + public static Optional<NFStatus> 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 NFStatus item, or null if no such item exists + */ + public static NFStatus forValue(int intValue) { + return VALUE_MAP.get(intValue); + } +} |