package com.dowse.base.param.maintenance;

import android.content.Context;
import com.dowse.base.param.NetType;
import com.dowse.base.util.DeviceUtil;

/* loaded from: ds_base_2.0.9_23030112.aar:classes.jar:com/dowse/base/param/maintenance/MaintenanceParam.class */
public class MaintenanceParam {
    private static final String defaultIP = "180.166.218.222";
    private static final int defaultPort = 51168;
    private static final String AUTH_NAME = "ds_android";
    private int enable;
    private String ip;
    private int port;
    private NetType net;
    private String net_name;
    private String authName;
    private String deviceID;

    public String getAuthName() {
        return this.authName;
    }

    public void setAuthName(String authName) {
        this.authName = authName;
    }

    public String getDeviceID() {
        return this.deviceID;
    }

    public void setDeviceID(String deviceID) {
        this.deviceID = deviceID;
    }

    public int getEnable() {
        return this.enable;
    }

    public void setEnable(int enable) {
        this.enable = enable;
    }

    public String getIp() {
        return this.ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getPort() {
        return this.port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public NetType getNet() {
        return this.net;
    }

    public void setNet(NetType net) {
        this.net = net;
    }

    public String getNet_name() {
        return this.net_name;
    }

    public void setNet_name(String net_name) {
        this.net_name = net_name;
    }

    public int getSim() {
        return this.net.getNet_type();
    }

    public static MaintenanceParam getDefault(Context context) {
        MaintenanceParam param = new MaintenanceParam();
        param.setAuthName(AUTH_NAME);
        param.setDeviceID(DeviceUtil.getSN());
        param.setEnable(1);
        param.setNet(NetType.SIM_2);
        // param.setNet_name(NetUtil.getOut4GEthName(context));
        param.setIp(defaultIP);
        param.setPort(defaultPort);
        param.setAuthName(AUTH_NAME);
        param.setDeviceID(DeviceUtil.getSN());
        return param;
    }

    public void setSim(int sim) {
        NetType netType = NetType.getNetType(sim);
        if (netType == null) {
            netType = NetType.SIM_2;
        }
        this.net = netType;
    }

    public String toString() {
        return "MaintenanceParam{enable=" + this.enable + ", ip='" + this.ip + "', port=" + this.port + ", net=" + this.net + ", net_name='" + this.net_name + "'}";
    }
}
