code: public static String getResourceVersion(HasMetadata entity) {
      if (entity != null) {
        ObjectMeta metadata = entity.getMetadata();
        if (metadata != null) {
          String resourceVersion = metadata.getResourceVersion();
          if (!Utils.isNullOrEmpty(resourceVersion)) {
            return resourceVersion;
          }
        }
      }
      return null;
    }
docs: Returns the resource version for the entity or null if it does not have one
  
  @param entity entity provided
  @return returns resource version of provided entity