package com.bocloud.ims.entity.resource;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;


@Table("resource_audit")
public class ResourceAudit extends GenericEntity {

    @PK(value = PKStrategy.AUTO)
    private Long id;
    /**
     * 审计的类型 tui/gui/file/db
     */
    @Column("type")
    private String type;
    /**
     * 开始时间
     */
    @Column("begin")
    private String begin;
    /**
     * 结束时间
     */
    @Column("end")
    private String end;
    /**
     * 用户账号
     */
    @Column("user")
    private String user;
    /**
     * 来自
     */
    @Column("client_ip")
    private String clientIp;
    /**
     * 来自
     */
    @Column("target_ip")
    private String targetIp;
    /**
     * 资产名称
     */
    @Column("target_name")
    private String targetName;
    /**
     * 协议
     */
    @Column("protocol")
    private String protocol;
    /**
     * 系统账户
     */
    @Column("account")
    private String account;
    /**
     * 是否在线
     */
    @Column("is_online")
    private Boolean online;
    /**
     * 会话时长
     */
    @Column("session_time")
    private String sessionTime;
    /**
     * 资产ip
     */
    @Column("hostid")
    private String hostId;
    /**
     * 资产类型
     */
    @Column("resource_type")
    private String resourceType;
    /**
     * 堡垒机中审计id
     */
    @Column("resource_audit_uuid")
    private String resourceAuditUuid;
    /**
     * 权限来源id
     */
    @Column("auth_source_id")
    private String authSourceId;
    /**
     * 权限来源类型
     */
    @Column("auth_source_type")
    private String authSourceType;
    /**
     * CPU百分比
     */
    @Column("cpu_percent")
    private String cpuPercent;
    /**
     * 缓存百分比
     */
    @Column("mem_percent")
    private String memPercent;
    /**
     * 会话启动所在集群节点名
     */
    @Column("node_name")
    private String nodeName;
    /**
     * 图形会话明细
     */
    @Column("gui_sess")
    private String guiSess;
    /**
     * 字符会话明细
     */
    @Column("tui_sess")
    private String tuiSess;
    /**
     * 数据库会话明细
     */
    @Column("db_sess")
    private String dbSess;
    /**
     * 文件传输明细
     */
    @Column("file_sess")
    private String fileSess;
    /**
     * 平台ID
     */
    @Column("vendor_id")
    private Long vendorId;
    /**
     * 平台名称
     */
    @IgnoreAll
    private String vendorName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getBegin() {
        return begin;
    }

    public void setBegin(String begin) {
        this.begin = begin;
    }

    public String getEnd() {
        return end;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    public String getTargetIp() {
        return targetIp;
    }

    public void setTargetIp(String targetIp) {
        this.targetIp = targetIp;
    }

    public String getTargetName() {
        return targetName;
    }

    public void setTargetName(String targetName) {
        this.targetName = targetName;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public String getAccount() {
        return account;
    }

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

    public Boolean getOnline() {
        return online;
    }

    public void setOnline(Boolean online) {
        this.online = online;
    }

    public String getSessionTime() {
        return sessionTime;
    }

    public void setSessionTime(String sessionTime) {
        this.sessionTime = sessionTime;
    }

    public String getHostId() {
        return hostId;
    }

    public void setHostId(String hostId) {
        this.hostId = hostId;
    }

    public String getResourceType() {
        return resourceType;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public String getResourceAuditUuid() {
        return resourceAuditUuid;
    }

    public void setResourceAuditUuid(String resourceAuditUuid) {
        this.resourceAuditUuid = resourceAuditUuid;
    }

    public String getAuthSourceId() {
        return authSourceId;
    }

    public void setAuthSourceId(String authSourceId) {
        this.authSourceId = authSourceId;
    }

    public String getAuthSourceType() {
        return authSourceType;
    }

    public void setAuthSourceType(String authSourceType) {
        this.authSourceType = authSourceType;
    }

    public String getCpuPercent() {
        return cpuPercent;
    }

    public void setCpuPercent(String cpuPercent) {
        this.cpuPercent = cpuPercent;
    }

    public String getMemPercent() {
        return memPercent;
    }

    public void setMemPercent(String memPercent) {
        this.memPercent = memPercent;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public String getGuiSess() {
        return guiSess;
    }

    public void setGuiSess(String guiSess) {
        this.guiSess = guiSess;
    }

    public String getTuiSess() {
        return tuiSess;
    }

    public void setTuiSess(String tuiSess) {
        this.tuiSess = tuiSess;
    }

    public String getDbSess() {
        return dbSess;
    }

    public void setDbSess(String dbSess) {
        this.dbSess = dbSess;
    }

    public String getFileSess() {
        return fileSess;
    }

    public void setFileSess(String fileSess) {
        this.fileSess = fileSess;
    }

    public Long getVendorId() {
        return vendorId;
    }

    public void setVendorId(Long vendorId) {
        this.vendorId = vendorId;
    }

    public String getVendorName() {
        return vendorName;
    }

    public void setVendorName(String vendorName) {
        this.vendorName = vendorName;
    }

    @Override
    public String toString() {
        return "ResourceAudit{" +
            "type='" + type + '\'' +
            ", clientIp='" + clientIp + '\'' +
            ", targetIp='" + targetIp + '\'' +
            '}';
    }
}
