code: public function parseValue($value)
      {
          $lookup = $this->getNameLookup();
          if (isset($lookup[$value])) {
              return $lookup[$value]->value;
          }
  
          throw new Error('Cannot represent value as enum: ' . Utils::printSafe($value));
      }
docs: @param mixed $value
  
  @return mixed
  
  @throws Error