@Override
    public void writeTo(BerBuffer buffer) {
        buffer.beginSequence(LdapTagConst.SEARCH_REQUEST)
                .writeOctetString(baseDn)
                .writeEnumeration(scope)
                .writeEnumeration(derefAliases)
                .writeInteger(sizeLimit)
                .writeInteger(timeLimit)
                .writeBoolean(typesOnly);

        Filter.write(buffer, filter);

        buffer.beginSequence()
                .writeOctetStrings(attributes)
                .endSequence();

        buffer.endSequence();
    }
@author James Chen
@implSpec <a href="https://datatracker.ietf.org/doc/html/rfc4511#section-4.5.1">4.5.1. Search
          Request</a>
turms-gateway/src/main/java/im/turms/gateway/infra/ldap/element/operation/search/SearchRequest.java