Index: third_party/protobuf/src/google/protobuf/field_mask.proto |
diff --git a/third_party/protobuf/src/google/protobuf/field_mask.proto b/third_party/protobuf/src/google/protobuf/field_mask.proto |
index 908c8a86d8205c1c04cf25d47ecd83200c6f7d80..6af6dbe89805963c66ae99be1b3affd0dcec8135 100644 |
--- a/third_party/protobuf/src/google/protobuf/field_mask.proto |
+++ b/third_party/protobuf/src/google/protobuf/field_mask.proto |
@@ -88,7 +88,7 @@ option java_generate_equals_and_hash = true; |
// operation applies to all fields (as if a FieldMask of all fields |
// had been specified). |
// |
-// Note that a field mask does not necessarily applies to the |
+// Note that a field mask does not necessarily apply to the |
// top-level response message. In case of a REST get operation, the |
// field mask applies directly to the response, but in case of a REST |
// list operation, the mask instead applies to each individual message |
@@ -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; |