import static org.opendaylight.mdsal.binding.model.util.Types.STRING;
import static extension org.apache.commons.text.StringEscapeUtils.escapeJava
+import com.google.common.base.Preconditions
import com.google.common.collect.ImmutableList
import com.google.common.collect.Lists
import java.beans.ConstructorProperties
import org.opendaylight.mdsal.binding.model.api.Type
import org.opendaylight.mdsal.binding.model.util.TypeConstants
import org.opendaylight.yangtools.yang.binding.CodeHelpers
+import org.opendaylight.yangtools.yang.common.Empty
import org.opendaylight.yangtools.yang.model.api.type.BitsTypeDefinition
/**
return new «genTO.name»(«Base64.importedName».getDecoder().decode(defaultValue));
«ELSEIF STRING.equals(prop.returnType)»
return new «genTO.name»(defaultValue);
+ «ELSEIF Constants.EMPTY.equals(prop.returnType)»
+ «Preconditions.importedName».checkArgument(defaultValue.isEmpty(), "Invalid value %s", defaultValue);
+ return new «genTO.name»(«Empty.importedName».getInstance());
«ELSEIF allProperties.size > 1»
«bitsArgs»
«ELSEIF BOOLEAN.equals(prop.returnType)»