public OracleNoSQLInputConfig(final String name, final Map<String, Object> variables, final List<HostConfig> hosts, Optional<String> storeName, Optional<Path> trustFile, Optional<LoginConfig> login) { super(name, variables); checkArgumentNotNullNorEmpty(hosts, "hosts"); this.hosts = hosts; this.storeName = storeName; this.trustFile = trustFile; this.login = login; if (login.isPresent() || trustFile.isPresent() || storeName.isPresent()) { Preconditions.checkArgumentPresent(login, "login"); Preconditions.checkArgumentPresent(trustFile, "trustFile"); if (!Files.exists(trustFile.get())) { throw new IllegalArgumentException("The trust file [" + trustFile.get().toAbsolutePath() + "] does not exist"); } Preconditions.checkArgumentPresent(storeName, "storeName"); } }