package com.cm.manager.sms.config.properties;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: SmsDefaultProperties
 * @Description: 默认短信属性
 * @Author: WangGeng
 * @Date: 2020/3/10 12:55 下午
 * @Version: 1.0
 **/
public class SmsDefaultProperties {

    private String account;
    private String password;
    private String sign;
    private SmsDefaultTemplateProperties template;

    public String getAccount() {
        return account == null ? "" : account.trim();
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password == null ? "" : password.trim();
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSign() {
        return sign == null ? "" : sign.trim();
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public SmsDefaultTemplateProperties getTemplate() {
        return template;
    }

    public void setTemplate(SmsDefaultTemplateProperties template) {
        this.template = template;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"account\":")
                .append("\"").append(account).append("\"");
        sb.append(",\"password\":")
                .append("\"").append(password).append("\"");
        sb.append(",\"sign\":")
                .append("\"").append(sign).append("\"");
        sb.append(",\"template\":")
                .append(template);
        sb.append('}');
        return sb.toString();
    }
}
