code: func validateUpdateMask(m *field_mask.FieldMask) error {
  	switch {
  	case m == nil:
  		return status.Error(codes.InvalidArgument, "update mask is required")
  	case len(m.Paths) == 0:
  		return status.Error(codes.InvalidArgument, "at least one update mask path is required")
  	}
  	// Path names must be unique.
  	// Keep records of ones we've already seen.
  	paths := stringset.New(len(m.Paths))
  	for _, path := range m.Paths {
  		if !paths.Add(path) {
  			return status.Errorf(codes.InvalidArgument, "duplicate update mask path %q", path)
  		}
  	}
  	return nil
  }
docs: // valdiateUpdateMask validates the given update mask.