blob: 939c33c037246a789cf781a59a59d79fe3d24f4b [file] [log] [blame]
{{#unless (isInConfigList (concat ns "::" label) "EnumsNotUsedAsTypeInXML")}}
static auto __attribute__((unused)) EnsureKnownEnumValue({{ns}}::{{asType label}} val)
{
using EnumType = {{ns}}::{{asType label}};
switch (val) {
{{#zcl_enum_items}}
case EnumType::k{{asUpperCamelCase label}}:
{{/zcl_enum_items}}
return val;
default:
return EnumType::kUnknownEnumValue;
}
}
{{/unless}}