class InfluxDBClientFactory {

    @Nonnull
    public static InfluxDBClient createV1(@Nonnull final String url,
                                          @Nullable final String username,
                                          final char[] password,
                                          @Nonnull final String database,
                                          @Nullable final String retentionPolicy) {

        Arguments.checkNonEmpty(database, "database");

        InfluxDBClientOptions options = InfluxDBClientOptions.builder()
                .url(url)
                .org("-")
                .authenticateToken(String.format("%s:%s",
                        username == null ? "" : username,
                        password == null ? "" : String.valueOf(password)).toCharArray())
                .bucket(String.format("%s/%s", database, retentionPolicy == null ? "" : retentionPolicy))
                .build();

        return create(options);
    }

    private  InfluxDBClientFactory();

}