private static Builder getBuilderFromSettings(final Settings settings) {
        final List<String> addresses = settings.hosts;
        if (addresses.isEmpty())
            throw new IllegalStateException("At least one value must be specified to the hosts setting");

        final Builder builder = new Builder(settings.hosts.get(0))
                .port(settings.port)
                .path(settings.path)
                .enableSsl(settings.connectionPool.enableSsl)
                .keyStore(settings.connectionPool.keyStore)
                .keyStorePassword(settings.connectionPool.keyStorePassword)
                .keyStoreType(settings.connectionPool.keyStoreType)
                .trustStore(settings.connectionPool.trustStore)
                .trustStorePassword(settings.connectionPool.trustStorePassword)
                .trustStoreType(settings.connectionPool.trustStoreType)
                .sslCipherSuites(settings.connectionPool.sslCipherSuites)
                .sslEnabledProtocols(settings.connectionPool.sslEnabledProtocols)
                .sslSkipCertValidation(settings.connectionPool.sslSkipCertValidation)
                .nioPoolSize(settings.nioPoolSize)
                .workerPoolSize(settings.workerPoolSize)
                .reconnectInterval(settings.connectionPool.reconnectInterval)
                .resultIterationBatchSize(settings.connectionPool.resultIterationBatchSize)
                .maxResponseContentLength(settings.connectionPool.maxResponseContentLength)
                .maxWaitForConnection(settings.connectionPool.maxWaitForConnection)
                .maxConnectionPoolSize(settings.connectionPool.maxSize)
                .connectionSetupTimeoutMillis(settings.connectionPool.connectionSetupTimeoutMillis)
                .idleConnectionTimeoutMillis(settings.connectionPool.idleConnectionTimeout)
                .enableUserAgentOnConnect(settings.enableUserAgentOnConnect)
                .bulkResults(settings.bulkResults)
                .validationRequest(settings.connectionPool.validationRequest);

        if (!settings.auth.type.isEmpty()) {
            builder.auth(Auth.from(settings.auth));
        }

        // the first address was added above in the constructor, so skip it if there are more
        if (addresses.size() > 1)
            addresses.stream().skip(1).forEach(builder::addContactPoint);

        try {
            builder.serializer(settings.serializer.create());
        } catch (Exception ex) {
            throw new IllegalStateException("Could not establish serializer - " + ex.getMessage());
        }

        return builder;
    }
Creates a new {@link Client} based on the settings provided.
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java