How to use ProtocolBuffer field masks?

We just recently adopted ProtocolBuffers on the platform, and I saw the introduction of FieldMasks in v3, but we cannot figure out how to use them.

We generated our proto-classes using the v3 compiler, here is an example of how we intend to use them:

FieldMask fieldMask = FieldMask.newBuilder().addPaths("field1").build();

Now, how do I apply this FieldMask to my proto-generated class to search through it?

I figured out how to search through FieldDescriptors, but I cannot find a way to associate FieldMask with the object I want to find.

Any help would be greatly appreciated. Thanks

+4
source share
1 answer

, FieldMaskUtil, merge(), .

+2

Source: https://habr.com/ru/post/1612398/


All Articles