Families of graphs where the shortest path between vertices uniquely determines vertex pairs

Imagine a graph $G$ with unlabeled vertices and unlabeled edges, and where we have an arbitrary vertex pair $(v_1,v_2)$. Let $k$ be the length of the shortest edge-wise path between $v_1$ and $v_2$. If $G$ is an $N$-dimensional hypercube, I believe we can say that $k$ uniquely defines these vertices up to isomorphisms of the graph.

Is there a specific name for the family of graphs with this sort of property?