code: public ResourceName parentName() {
      PathTemplate parentTemplate = template.parentTemplate();
      return new ResourceName(parentTemplate, values, endpoint);
    }
docs: Returns the parent resource name. For example, if the name is {@code shelves/s1/books/b1}, the
  parent is {@code shelves/s1/books}.