The two proto files are not related. api.proto in dgo is the one used by clients to communicate with dgraph. pb.proto in dgraph is used by dgraph for its internal comm between alphas.
The issues you are facing is because of this:
For uids, you should use setObjectId(string uid) instead of setObjectValue. For anything else, you would use setObjectValue.