diff options
Diffstat (limited to 'src/google/protobuf/field_mask.proto')
-rw-r--r-- | src/google/protobuf/field_mask.proto | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/google/protobuf/field_mask.proto b/src/google/protobuf/field_mask.proto index 908c8a86..b1657f5f 100644 --- a/src/google/protobuf/field_mask.proto +++ b/src/google/protobuf/field_mask.proto @@ -162,6 +162,32 @@ option java_generate_equals_and_hash = true; // mask: "user.displayName,photo" // } // +// # Field Masks and Oneof Fields +// +// Field masks treat fields in oneofs just as regular fields. Consider the +// following message: +// +// message SampleMessage { +// oneof test_oneof { +// string name = 4; +// SubMessage sub_message = 9; +// } +// } +// +// The field mask can be: +// +// mask { +// paths: "name" +// } +// +// Or: +// +// mask { +// paths: "sub_message" +// } +// +// Note that oneof type names ("test_oneof" in this case) cannot be used in +// paths. message FieldMask { // The set of field mask paths. repeated string paths = 1; |