code: private static Optional<String> getFullName(FileDescriptorProto descriptor, List<Integer> path) {
          String fullNameSoFar = descriptor.getPackage();
          switch (path.get(0)) {
              case FileDescriptorProto.MESSAGE_TYPE_FIELD_NUMBER:
                  final DescriptorProto message = descriptor.getMessageType(path.get(1));
                  return appendMessageToFullName(message, path, fullNameSoFar);
              case FileDescriptorProto.ENUM_TYPE_FIELD_NUMBER:
                  final EnumDescriptorProto enumDescriptor = descriptor.getEnumType(path.get(1));
                  return Optional.of(appendEnumToFullName(enumDescriptor, path, fullNameSoFar));
              case FileDescriptorProto.SERVICE_FIELD_NUMBER:
                  final ServiceDescriptorProto serviceDescriptor = descriptor.getService(path.get(1));
                  fullNameSoFar = appendNameComponent(fullNameSoFar, serviceDescriptor.getName());
                  if (path.size() > 2) {
                      fullNameSoFar = appendFieldComponent(
                              fullNameSoFar, serviceDescriptor.getMethod(path.get(3)).getName());
                  }
                  return Optional.of(fullNameSoFar);
              default:
                  return Optional.empty();
          }
      }
docs: would have path [MESSAGE_TYPE_FIELD_NUMBER, 0, NESTED_TYPE_FIELD_NUMBER, 2, FIELD_FIELD_NUMBER, 1]