+ * Return the enumeration member whose {@link #getName()} matches specified assigned name.
+ *
+ * @param name YANG assigned name
+ * @return corresponding «enums.name» item, or {@code null} if no such item exists
+ * @throws NullPointerException if {@code name} is null
+ */
+ public static «enums.importedNullable» forName(«STRING.importedName» name) {
+ return switch (name) {
+ «FOR v : enums.values»
+ case "«v.name»" -> «v.mappedName»;
+ «ENDFOR»
+ default -> null;
+ };
+ }
+
+ /**
+ * Return the enumeration member whose {@link #getIntValue()} matches specified value.
+ *
+ * @param intValue integer value
+ * @return corresponding «enums.name» item, or {@code null} if no such item exists
+ */
+ public static «enums.importedNullable» forValue(int intValue) {
+ return switch (intValue) {
+ «FOR v : enums.values»
+ case «v.value» -> «v.mappedName»;
+ «ENDFOR»
+ default -> null;
+ };
+ }
+
+ /**
+ * Return the enumeration member whose {@link #getName()} matches specified assigned name.