code: public void setTemplates(List<DockerSlaveTemplate> replaceTemplates) {
          if (replaceTemplates != null) {
              templates = new ArrayList<>(replaceTemplates);
          } else {
              templates = Collections.emptyList();
          }
      }
docs: Set list of available templates