/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.objectmodel.Goid
 */
package com.l7tech.server.log.syslog;

import com.l7tech.objectmodel.Goid;
import com.l7tech.server.log.syslog.SyslogProtocol;
import java.net.SocketAddress;

public class SyslogConfig {
    private SyslogProtocol a;
    private SocketAddress[] b;
    private String c;
    private Goid d;
    private int e;
    private int f;
    private int g;
    private int h;
    private int i;
    private int j;
    private boolean k;

    private SyslogConfig() {
    }

    public boolean isSSL() {
        return SyslogProtocol.SSL.equals((Object)this.a);
    }

    public SyslogProtocol getProtocol() {
        return this.a;
    }

    public SocketAddress[] getSyslogAddresses() {
        return this.b;
    }

    public String getSslKeystoreAlias() {
        return this.c;
    }

    public Goid getSslKeystoreId() {
        return this.d;
    }

    public int getQueueSize() {
        return this.e;
    }

    public int getConnectTimeOut() {
        return this.f;
    }

    public int getMaxReconnectAttempts() {
        return this.g;
    }

    public int getReconnectInterval() {
        return this.h;
    }

    public int getDropSize() {
        return this.j;
    }

    public boolean isValidateExtendedKeyUsage() {
        return this.k;
    }

    public static class Builder {
        private SyslogProtocol a;
        private SocketAddress[] b;
        private String c;
        private Goid d;
        private int e;
        private int f;
        private int g;
        private int h;
        private int i;
        private boolean j;

        public Builder setProtocol(SyslogProtocol syslogProtocol) {
            this.a = syslogProtocol;
            return this;
        }

        public Builder setAddresses(SocketAddress[] socketAddressArray) {
            this.b = socketAddressArray;
            return this;
        }

        public Builder setSslKeystoreAlias(String string) {
            this.c = string;
            return this;
        }

        public Builder setSslKeystoreId(Goid goid) {
            this.d = goid;
            return this;
        }

        public Builder setQueueSize(int n2) {
            this.e = n2;
            return this;
        }

        public Builder setConnectTimeOut(int n2) {
            this.f = n2;
            return this;
        }

        public Builder setMaxReconnectAttempts(int n2) {
            this.g = n2;
            return this;
        }

        public Builder setReconnectInterval(int n2) {
            this.h = n2;
            return this;
        }

        public Builder setDropRatePercent(int n2) {
            this.i = n2;
            return this;
        }

        public Builder setValidateExtendedKeyUsage(boolean bl2) {
            this.j = bl2;
            return this;
        }

        public SyslogConfig createSyslogConfig() {
            SyslogConfig syslogConfig = new SyslogConfig();
            syslogConfig.f = this.f;
            syslogConfig.i = this.i;
            syslogConfig.g = this.g;
            syslogConfig.a = this.a;
            syslogConfig.e = this.e;
            syslogConfig.h = this.h;
            syslogConfig.c = this.c;
            syslogConfig.d = this.d;
            syslogConfig.b = this.b;
            syslogConfig.j = Math.max(1, (int)((double)syslogConfig.e * ((double)syslogConfig.i / 100.0)));
            syslogConfig.k = this.j;
            return syslogConfig;
        }
    }
}

