package com.ruoyi.device.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * 解密设备调度配置
 *
 * @author lwm
 */
@Configuration
@ConfigurationProperties(prefix = "decrypt.device.config")
public class DecryptDeviceConfig
{
    /** 最大失败重试次数 */
    private Integer defaultFailTimes = 3;

    /** 每次发送密文数据条数 */
    private Integer defaultSendSize = 20;

    /** 解密超时时间（毫秒） */
    private Integer timeout = 120000;

    /** 解密设备列表 */
    private List<DecryptDevice> decryptDeviceList = new ArrayList<>();

    /** 是否走外部解密 */
    private Boolean outDecrypt = false;

    /** 外部解密接口地址 */
    private String outDecryptUrl;

    public Integer getDefaultFailTimes()
    {
        return defaultFailTimes;
    }

    public void setDefaultFailTimes(Integer defaultFailTimes)
    {
        this.defaultFailTimes = defaultFailTimes;
    }

    public Integer getDefaultSendSize()
    {
        return defaultSendSize;
    }

    public void setDefaultSendSize(Integer defaultSendSize)
    {
        this.defaultSendSize = defaultSendSize;
    }

    public Integer getTimeout()
    {
        return timeout;
    }

    public void setTimeout(Integer timeout)
    {
        this.timeout = timeout;
    }

    public List<DecryptDevice> getDecryptDeviceList()
    {
        return decryptDeviceList;
    }

    public void setDecryptDeviceList(List<DecryptDevice> decryptDeviceList)
    {
        this.decryptDeviceList = decryptDeviceList;
    }

    public Boolean getOutDecrypt()
    {
        return outDecrypt;
    }

    public void setOutDecrypt(Boolean outDecrypt)
    {
        this.outDecrypt = outDecrypt;
    }

    public String getOutDecryptUrl()
    {
        return outDecryptUrl;
    }

    public void setOutDecryptUrl(String outDecryptUrl)
    {
        this.outDecryptUrl = outDecryptUrl;
    }
}
