public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Protobuf\Internal\FieldDescriptorProto_Type::class);
        $this->type = $var;
        $this->has_type = true;

        return $this;
    }