aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/field_mask.proto
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/field_mask.proto')
-rw-r--r--src/google/protobuf/field_mask.proto14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/google/protobuf/field_mask.proto b/src/google/protobuf/field_mask.proto
index c51de09a..76e09f39 100644
--- a/src/google/protobuf/field_mask.proto
+++ b/src/google/protobuf/field_mask.proto
@@ -37,7 +37,7 @@ option java_package = "com.google.protobuf";
option java_outer_classname = "FieldMaskProto";
option java_multiple_files = true;
option objc_class_prefix = "GPB";
-option java_generate_equals_and_hash = true;
+option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask";
// `FieldMask` represents a set of symbolic field paths, for example:
//
@@ -82,7 +82,7 @@ option java_generate_equals_and_hash = true;
// }
//
// A repeated field is not allowed except at the last position of a
-// field mask.
+// paths string.
//
// If a FieldMask object is not present in a get operation, the
// operation applies to all fields (as if a FieldMask of all fields
@@ -109,8 +109,8 @@ option java_generate_equals_and_hash = true;
//
// If a repeated field is specified for an update operation, the existing
// repeated values in the target resource will be overwritten by the new values.
-// Note that a repeated field is only allowed in the last position of a field
-// mask.
+// Note that a repeated field is only allowed in the last position of a `paths`
+// string.
//
// If a sub-message is specified in the last position of the field mask for an
// update operation, then the existing sub-message in the target resource is
@@ -240,6 +240,12 @@ option java_generate_equals_and_hash = true;
//
// Note that oneof type names ("test_oneof" in this case) cannot be used in
// paths.
+//
+// ## Field Mask Verification
+//
+// The implementation of any API method which has a FieldMask type field in the
+// request should verify the included field paths, and return an
+// `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
message FieldMask {
// The set of field mask paths.
repeated string paths = 1;