code: public static ApiPlatform fromKeyToApiPlatform(int key) {
          if(keyToPlatform.get() == null) {
              Map<Integer, ApiPlatform> map = new HashMap<>();
              for (ApiPlatform apiPlatform : ApiPlatform.values()) {
                  map.put(apiPlatform.getKey(), apiPlatform);
              }
              keyToPlatform.set(Collections.unmodifiableMap(map));
          }
          return keyToPlatform.get().get(key);
      }
docs: get the api platform given it's integer key value.
  @param key the platform key
  @return platform enum entry.