<commit_before>package lt.msemys.esjc;

import lt.msemys.esjc.node.cluster.ClusterNodeSettings;
import lt.msemys.esjc.node.static_.StaticNodeSettings;
import lt.msemys.esjc.operation.UserCredentials;
import lt.msemys.esjc.tcp.TcpSettings;

import java.time.Duration;
import java.util.Optional;

import static lt.msemys.esjc.util.Preconditions.checkArgument;

public class Settings {
    public final TcpSettings tcpSettings;
    public final Optional<StaticNodeSettings> staticNodeSettings;
    public final Optional<ClusterNodeSettings> clusterNodeSettings;
    public final boolean ssl;
    public final Duration reconnectionDelay;
    public final Duration heartbeatInterval;
    public final Duration heartbeatTimeout;
    public final boolean requireMaster;
    public final Optional<UserCredentials> userCredentials;
    public final Duration operationTimeout;
    public final Duration operationTimeoutCheckInterval;
    public final int maxQueueSize;
    public final int maxConcurrentOperations;
    public final int maxOperationRetries;
    public final int maxReconnections;
    public final int maxPushQueueSize;
    public final int readBatchSize;
    public final int persistentSubscriptionBufferSize;
    public final boolean persistentSubscriptionAutoAckEnabled;
    public final boolean failOnNoServerResponse;

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Settings{");
        sb.append("tcpSettings=").append(tcpSettings);
        sb.append(", staticNodeSettings=").append(staticNodeSettings);
        sb.append(", clusterNodeSettings=").append(clusterNodeSettings);
        sb.append(", ssl=").append(ssl);
        sb.append(", reconnectionDelay=").append(reconnectionDelay);
        sb.append(", heartbeatInterval=").append(heartbeatInterval);
        sb.append(", heartbeatTimeout=").append(heartbeatTimeout);
        sb.append(", requireMaster=").append(requireMaster);
        sb.append(", userCredentials=").append(userCredentials);
        sb.append(", operationTimeout=").append(operationTimeout);
        sb.append(", operationTimeoutCheckInterval=").append(operationTimeoutCheckInterval);
        sb.append(", maxQueueSize=").append(maxQueueSize);
        sb.append(", maxConcurrentOperations=").append(maxConcurrentOperations);
        sb.append(", maxOperationRetries=").append(maxOperationRetries);
        sb.append(", maxReconnections=").append(maxReconnections);
        sb.append(", maxPushQueueSize=").append(maxPushQueueSize);
        sb.append(", readBatchSize=").append(readBatchSize);
        sb.append(", persistentSubscriptionBufferSize=").append(persistentSubscriptionBufferSize);
        sb.append(", persistentSubscriptionAutoAckEnabled=").append(persistentSubscriptionAutoAckEnabled);
        sb.append(", failOnNoServerResponse=").append(failOnNoServerResponse);
        sb.append('}');
        return sb.toString();
    }

    private Settings(Builder builder) {
        tcpSettings = builder.tcpSettings;
        staticNodeSettings = Optional.ofNullable(builder.staticNodeSettings);
        clusterNodeSettings = Optional.ofNullable(builder.clusterNodeSettings);
        ssl = builder.ssl;
        reconnectionDelay = builder.reconnectionDelay;
        heartbeatInterval = builder.heartbeatInterval;
        heartbeatTimeout = builder.heartbeatTimeout;
        requireMaster = builder.requireMaster;
        userCredentials = Optional.ofNullable(builder.userCredentials);
        operationTimeout = builder.operationTimeout;
        operationTimeoutCheckInterval = builder.operationTimeoutCheckInterval;
        maxQueueSize = builder.maxQueueSize;
        maxConcurrentOperations = builder.maxConcurrentOperations;
        maxOperationRetries = builder.maxOperationRetries;
        maxReconnections = builder.maxReconnections;
        maxPushQueueSize = builder.maxPushQueueSize;
        readBatchSize = builder.readBatchSize;
        persistentSubscriptionBufferSize = builder.persistentSubscriptionBufferSize;
        persistentSubscriptionAutoAckEnabled = builder.persistentSubscriptionAutoAckEnabled;
        failOnNoServerResponse = builder.failOnNoServerResponse;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static class Builder {
        private TcpSettings tcpSettings;
        private StaticNodeSettings staticNodeSettings;
        private ClusterNodeSettings clusterNodeSettings;
        private Boolean ssl;<commit_msg>maintenance: 'toString' method placed after constructor<commit_after>package lt.msemys.esjc;

import lt.msemys.esjc.node.cluster.ClusterNodeSettings;
import lt.msemys.esjc.node.static_.StaticNodeSettings;
import lt.msemys.esjc.operation.UserCredentials;
import lt.msemys.esjc.tcp.TcpSettings;

import java.time.Duration;
import java.util.Optional;

import static lt.msemys.esjc.util.Preconditions.checkArgument;

public class Settings {
    public final TcpSettings tcpSettings;
    public final Optional<StaticNodeSettings> staticNodeSettings;
    public final Optional<ClusterNodeSettings> clusterNodeSettings;
    public final boolean ssl;
    public final Duration reconnectionDelay;
    public final Duration heartbeatInterval;
    public final Duration heartbeatTimeout;
    public final boolean requireMaster;
    public final Optional<UserCredentials> userCredentials;
    public final Duration operationTimeout;
    public final Duration operationTimeoutCheckInterval;
    public final int maxQueueSize;
    public final int maxConcurrentOperations;
    public final int maxOperationRetries;
    public final int maxReconnections;
    public final int maxPushQueueSize;
    public final int readBatchSize;
    public final int persistentSubscriptionBufferSize;
    public final boolean persistentSubscriptionAutoAckEnabled;
    public final boolean failOnNoServerResponse;

    private Settings(Builder builder) {
        tcpSettings = builder.tcpSettings;
        staticNodeSettings = Optional.ofNullable(builder.staticNodeSettings);
        clusterNodeSettings = Optional.ofNullable(builder.clusterNodeSettings);
        ssl = builder.ssl;
        reconnectionDelay = builder.reconnectionDelay;
        heartbeatInterval = builder.heartbeatInterval;
        heartbeatTimeout = builder.heartbeatTimeout;
        requireMaster = builder.requireMaster;
        userCredentials = Optional.ofNullable(builder.userCredentials);
        operationTimeout = builder.operationTimeout;
        operationTimeoutCheckInterval = builder.operationTimeoutCheckInterval;
        maxQueueSize = builder.maxQueueSize;
        maxConcurrentOperations = builder.maxConcurrentOperations;
        maxOperationRetries = builder.maxOperationRetries;
        maxReconnections = builder.maxReconnections;
        maxPushQueueSize = builder.maxPushQueueSize;
        readBatchSize = builder.readBatchSize;
        persistentSubscriptionBufferSize = builder.persistentSubscriptionBufferSize;
        persistentSubscriptionAutoAckEnabled = builder.persistentSubscriptionAutoAckEnabled;
        failOnNoServerResponse = builder.failOnNoServerResponse;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Settings{");
        sb.append("tcpSettings=").append(tcpSettings);
        sb.append(", staticNodeSettings=").append(staticNodeSettings);
        sb.append(", clusterNodeSettings=").append(clusterNodeSettings);
        sb.append(", ssl=").append(ssl);
        sb.append(", reconnectionDelay=").append(reconnectionDelay);
        sb.append(", heartbeatInterval=").append(heartbeatInterval);
        sb.append(", heartbeatTimeout=").append(heartbeatTimeout);
        sb.append(", requireMaster=").append(requireMaster);
        sb.append(", userCredentials=").append(userCredentials);
        sb.append(", operationTimeout=").append(operationTimeout);
        sb.append(", operationTimeoutCheckInterval=").append(operationTimeoutCheckInterval);
        sb.append(", maxQueueSize=").append(maxQueueSize);
        sb.append(", maxConcurrentOperations=").append(maxConcurrentOperations);
        sb.append(", maxOperationRetries=").append(maxOperationRetries);
        sb.append(", maxReconnections=").append(maxReconnections);
        sb.append(", maxPushQueueSize=").append(maxPushQueueSize);
        sb.append(", readBatchSize=").append(readBatchSize);
        sb.append(", persistentSubscriptionBufferSize=").append(persistentSubscriptionBufferSize);
        sb.append(", persistentSubscriptionAutoAckEnabled=").append(persistentSubscriptionAutoAckEnabled);
        sb.append(", failOnNoServerResponse=").append(failOnNoServerResponse);
        sb.append('}');
        return sb.toString();
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static class Builder {
        private TcpSettings tcpSettings;
        private StaticNodeSettings staticNodeSettings;
        private ClusterNodeSettings clusterNodeSettings;
        private Boolean ssl;
{'fraction_non_alphanumeric': 0.08777185974256548, 'fraction_numerical': 0.0, 'mean_word_length': 4.326832151300237, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5314078', 'n_tokens_mistral': 2198, 'n_tokens_neox': 2218, 'n_words': 438}