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

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

        return $this;
    }
public function setType ( $ var ) { GPBUtil :: checkEnum ( $ var , \ Google \ Protobuf \ Internal \ FieldDescriptorProto_Type :: class ) ; $ this -> type = $ var ; $ this -> has_type = true ; return $ this ; }
If type_name is set, this need not be set.  If both this and type_name
are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.

Generated from protobuf field <code>optional .google.protobuf.FieldDescriptorProto.Type type = 5;</code>
@param int $var
@return $this
If type_name is set this need not be set . If both this and type_name are set this must be one of TYPE_ENUM TYPE_MESSAGE or TYPE_GROUP .