class Transformers {

   public static Optional<GoogleDevice> modelToDevice(Model m, boolean whitelisted, @Nullable ProductCatalogEntry pm, boolean reportStateEnabled) {
      if(!Predicates.isSupportedModel(m, whitelisted, pm)) {
         return Optional.empty();
      }

      GoogleDevice dev = new GoogleDevice();
      modelToDeviceName(m).ifPresent((n) -> dev.setName(n.toMap()));
      dev.setId(m.getAddress().getRepresentation());
      modelToGoogleType(m).ifPresent(dev::setType);
      dev.setTraits(capabilitiesToTraits(m.getCapabilities()));
      dev.setAttributes(modelToTraitAttributes(m));
      modelToDeviceInfo(m).ifPresent((i) -> dev.setDeviceInfo(i.toMap()));
      dev.setCustomData(modelToCustomData(m));

      if(!reportStateEnabled || !StringUtils.isBlank(SceneModel.getName(m))) {
         dev.setWillReportState(false); // scenes don't have a state to update
      }
      else {
         dev.setWillReportState(true); // device states are updated via ReportState
      }

      if(dev.getName() == null || dev.getType() == null) {
         return Optional.empty();
      }

      return Optional.of(dev);
   }

   private  Transformers();

}