code: public static long parseResourceVersion(HasMetadata obj) {
          ObjectMeta metadata = obj.getMetadata();
          if (metadata != null) {
              String resourceVersion = metadata.getResourceVersion();
              if (notEmpty(resourceVersion)) {
                  try {
                      return Long.parseLong(resourceVersion);
                  } catch (NumberFormatException e) {
                      // ignore
                  }
              }
          }
          return 0;
      }
docs: Returns the numeric resource version of the resource