throw new SettingsException("es_connection/type element of configuration structure not found or empty");
}
if ("local".equalsIgnoreCase(type)) {
sourceClient = new SourceClientESClient(client);
} else if ("remote".equalsIgnoreCase(type)) {
sourceClient = new SourceClientESTransportClient(sourceClientSettings);
} else if ("rest".equalsIgnoreCase(type)) {
sourceClient = new SourceClientREST(sourceClientSettings);
} else {
throw new SettingsException("es_connection/type value '" + type
+ "' is invalid. Use one of local, remote, rest");