package com.cm.common.plugin.pojo.vos.dynamic.config;

import com.cm.common.annotation.CheckEmptyAnnotation;
import com.cm.common.annotation.CheckNumberAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: EmptyProjectVO
 * @Description: 空项目
 * @Author: WangGeng
 * @Date: 2020/3/16 10:45 下午
 * @Version: 1.0
 **/
@ApiModel
public class EmptyProjectVO {

    @ApiModelProperty(name = "systemUrl", value = "系统地址")
    @CheckEmptyAnnotation(name = "系统地址", verifyType = "url")
    private String systemUrl;
    @ApiModelProperty(name = "systemPort", value = "系统端口")
    @CheckEmptyAnnotation(name = "系统端口", verifyType = "number")
    private String systemPort;
    @ApiModelProperty(name = "systemName", value = "系统名")
    @CheckEmptyAnnotation(name = "系统名", verifyType = "letter")
    private String systemName;
    @ApiModelProperty(name = "systemSummary", value = "系统说明")
    @CheckEmptyAnnotation(name = "系统说明")
    private String systemSummary;
    @ApiModelProperty(name = "oauthServerUrl", value = "认证地址")
    @CheckEmptyAnnotation(name = "认证地址", verifyType = "url")
    private String oauthServerUrl;
    @ApiModelProperty(name = "clientId", value = "认证用户名")
    private String clientId;
    @ApiModelProperty(name = "clientSecret", value = "认证密码")
    private String clientSecret;

    public String getSystemUrl() {
        return systemUrl == null ? "" : systemUrl.trim();
    }

    public void setSystemUrl(String systemUrl) {
        this.systemUrl = systemUrl;
    }

    public String getSystemPort() {
        return systemPort;
    }

    public void setSystemPort(String systemPort) {
        this.systemPort = systemPort;
    }

    public String getSystemName() {
        return systemName == null ? "" : systemName.trim();
    }

    public void setSystemName(String systemName) {
        this.systemName = systemName;
    }

    public String getSystemSummary() {
        return systemSummary == null ? "" : systemSummary.trim();
    }

    public void setSystemSummary(String systemSummary) {
        this.systemSummary = systemSummary;
    }

    public String getOauthServerUrl() {
        return oauthServerUrl == null ? "" : oauthServerUrl.trim();
    }

    public void setOauthServerUrl(String oauthServerUrl) {
        this.oauthServerUrl = oauthServerUrl;
    }

    public String getClientId() {
        return clientId == null ? "客户端认证用户名" : clientId.trim();
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getClientSecret() {
        return clientSecret == null ? "客户端认证密码" : clientSecret.trim();
    }

    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"systemUrl\":")
                .append("\"").append(systemUrl).append("\"");
        sb.append(",\"systemPort\":")
                .append(systemPort);
        sb.append(",\"systemName\":")
                .append("\"").append(systemName).append("\"");
        sb.append(",\"systemSummary\":")
                .append("\"").append(systemSummary).append("\"");
        sb.append(",\"oauthServerUrl\":")
                .append("\"").append(oauthServerUrl).append("\"");
        sb.append(",\"clientId\":")
                .append("\"").append(clientId).append("\"");
        sb.append(",\"clientSecret\":")
                .append("\"").append(clientSecret).append("\"");
        sb.append('}');
        return sb.toString();
    }
}
