package com.cm.common.plugin.pojo.vos.systemlogger;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @ClassName: SystemLoggerVO
 * @Description: 系统日志
 * @Author: admin
 * @Date: 2019-05-28 17:42:45
 * @Version: 1.0
 **/
@ApiModel
public class SystemLoggerVO {

    @ApiModelProperty(name = "host", value = "主机")
    private String host;
    @ApiModelProperty(name = "port", value = "端口")
    private Integer port;
    @ApiModelProperty(name = "getRequestIp", value = "请求地址")
    private String requestIp;
    @ApiModelProperty(name = "contextPath", value = "访问路径")
    private String contextPath;
    @ApiModelProperty(name = "uri", value = "接口")
    private String uri;
    @ApiModelProperty(name = "classNameFull", value = "完整路径")
    private String classNameFull;
    @ApiModelProperty(name = "className", value = "类名")
    private String className;
    @ApiModelProperty(name = "methodName", value = "方法名")
    private String methodName;
    @ApiModelProperty(name = "parameterValues", value = "参数名称")
    private String parameterValues;
    @ApiModelProperty(name = "startTime", value = "开始时间")
    private Long startTime;
    @ApiModelProperty(name = "endTime", value = "截止时间")
    private Long endTime;
    @ApiModelProperty(name = "usedTime", value = "耗时")
    private Long usedTime;
    @ApiModelProperty(name = "responseResult", value = "响应内容")
    private String responseResult;
    @ApiModelProperty(name = "creatorName", value = "创建人名称")
    private String creatorName;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

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

    public String getRequestIp() {
        return requestIp == null ? "" : requestIp.trim();
    }

    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp;
    }

    public String getContextPath() {
        return contextPath;
    }

    public void setContextPath(String contextPath) {
        this.contextPath = contextPath;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getClassNameFull() {
        return classNameFull;
    }

    public void setClassNameFull(String classNameFull) {
        this.classNameFull = classNameFull;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getParameterValues() {
        return parameterValues;
    }

    public void setParameterValues(String parameterValues) {
        this.parameterValues = parameterValues;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public Long getUsedTime() {
        return usedTime;
    }

    public void setUsedTime(Long usedTime) {
        this.usedTime = usedTime;
    }

    public String getResponseResult() {
        return responseResult;
    }

    public void setResponseResult(String responseResult) {
        this.responseResult = responseResult;
    }

    public String getCreatorName() {
        return creatorName == null ? "" : creatorName.trim();
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"host\":")
                .append("\"").append(host).append("\"");
        sb.append(",\"port\":")
                .append(port);
        sb.append(",\"getRequestIp\":")
                .append("\"").append(requestIp).append("\"");
        sb.append(",\"contextPath\":")
                .append("\"").append(contextPath).append("\"");
        sb.append(",\"uri\":")
                .append("\"").append(uri).append("\"");
        sb.append(",\"classNameFull\":")
                .append("\"").append(classNameFull).append("\"");
        sb.append(",\"className\":")
                .append("\"").append(className).append("\"");
        sb.append(",\"methodName\":")
                .append("\"").append(methodName).append("\"");
        sb.append(",\"parameterValues\":")
                .append("\"").append(parameterValues).append("\"");
        sb.append(",\"startTime\":")
                .append(startTime);
        sb.append(",\"endTime\":")
                .append(endTime);
        sb.append(",\"usedTime\":")
                .append(usedTime);
        sb.append(",\"responseResult\":")
                .append("\"").append(responseResult).append("\"");
        sb.append(",\"creatorName\":")
                .append("\"").append(creatorName).append("\"");
        sb.append('}');
        return sb.toString();
    }
}