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;

import java.util.List;

/**
 * 存储磁盘
 * @author luyanchao
 */
@Table("disk")
public class Disk extends GenericEntity {

    @PK(value = PKStrategy.AUTO)
    private Long id; //
    @Column("vendor_id")
    private Long vendorId; // 所属平台
    @Column("server_id")
    private Long serverId; // 所属主机
    @Column("storage_id")
    private Long storageId; // 所属存储
    @Column("controller_id")
    private Long controllerId; // 所属Raid卡的id
    @Column("mdisk_id")
    private Long mdiskId; // 所属MdiskId
    @Column("mdisk_name")
    @IgnoreAll
    private String mdiskName; // 所属MdiskName
    @Column("disk_uuid")
    private String diskUuid; // 唯一标识
    @Column("identifier")
    private String identifier; // 驱动器标识
    @Column("type")
    private String type; // 磁盘类型
    @Column("path")
    private String path; // 路径
    @Column("block_size")
    private Double blockSize; // 数据块大小
    @Column("for_use")
    private String forUse; // 用途
    @Column("is_root")
    private Boolean isBoot; // 是否root盘
    @Column("is_cache")
    private Boolean isCache; // 是否缓存盘
    @Column("port1_status")
    private String port1Status; // 端口1状态
    @Column("port2_status")
    private String port2Status; // 端口2状态
    @Column("data_status")
    private String dataStatus; // 数据状态
    @Column("size")
    private Double size; // 容量GB
    @Column("capacity")
    private Long capacity; // 容量Byte
    @Column("used_capacity")
    private Long usedCapacity; // 已用容量Byte
    @Column("mode")
    private String mode; // 型号
    @Column("rpm")
    private Integer rpm; // 转速
    @Column("firmware_level")
    private String firmwareLevel; // 固件级别
    @Column("uid")
    private String uid; // 唯一标识
    @Column("slot_id")
    private String slotId; // 插槽标识
    @Column("enclosure_id")
    private String enclosureId; // 机柜标识
    @Column("drive_id")
    private String driveId; // 磁盘标识
    @Column("fru_id")
    private String fruId; // 部件标识
    @Column("fru_part_num")
    private String fruPartNum; // 部件号
    @Column("tech_type")
    private String techType; // 技术类型
    @Column("node_id")
    private String nodeId; // 节点标识
    @Column("node_name")
    private String nodeName; // 节点名称
    @Column("provider_id")
    private String providerId; // 供应商标识
    @Column("product_id")
    private String productId; // 产品编号
    @Column("fpga_level")
    private String fpgaLevel; // fpga级别
    @Column("member_id")
    private String memberId; // 成员标识
    @Column("quorum_id")
    private String quorumId; // 定额标识
    @Column("key_path")
    private String keyPath; // smis传参用
    @Column("operational_status")
    private String operationalStatus; // 运行状态
    @Column("caption_type")
    private String captionType; // 硬盘类型
    @Column("encryption")
    private String encryption; // 硬盘加密类型
    /**
     * 监控相关
     */
    @IgnoreAll
    private Long ruleRelationId;// 资源告警规则关联关系id
    @IgnoreAll
    private String thresholdGroupName;// 阈值组名称
    @IgnoreAll
    private String policyName;// 分发策略名称
    @IgnoreAll
    private Long thresholdGroupId;  //阈值组ID
    @IgnoreAll
    private Long policyId; //分发策略ID
    @IgnoreAll
    private List<DiskPartition> partitions;
    @IgnoreAll
    private Server server; // 所属主机
    @IgnoreAll
    private Double usedSize; // 已用容量GB

    public Long getVendorId() {
        return vendorId;
    }

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

    public Long getServerId() {
        return serverId;
    }

    public void setServerId(Long serverId) {
        this.serverId = serverId;
    }

    public String getKeyPath() {
        return keyPath;
    }

    public void setKeyPath(String keyPath) {
        this.keyPath = keyPath;
    }

    public Long getId() {
        return id;
    }

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

    public Long getStorageId() {
        return storageId;
    }

    public void setStorageId(Long storageId) {
        this.storageId = storageId;
    }

    public Long getMdiskId() {
        return mdiskId;
    }

    public void setMdiskId(Long mdiskId) {
        this.mdiskId = mdiskId;
    }

    public String getMdiskName() {
        return mdiskName;
    }

    public void setMdiskName(String mdiskName) {
        this.mdiskName = mdiskName;
    }

    public String getDiskUuid() {
        return diskUuid;
    }

    public void setDiskUuid(String diskUuid) {
        this.diskUuid = diskUuid;
    }

    public Double getBlockSize() {
        return blockSize;
    }

    public void setBlockSize(Double blockSize) {
        this.blockSize = blockSize;
    }

    public String getForUse() {
        return forUse;
    }

    public void setForUse(String forUse) {
        this.forUse = forUse;
    }

    public String getPort1Status() {
        return port1Status;
    }

    public void setPort1Status(String port1Status) {
        this.port1Status = port1Status;
    }

    public String getPort2Status() {
        return port2Status;
    }

    public void setPort2Status(String port2Status) {
        this.port2Status = port2Status;
    }

    public Double getSize() {
        return size;
    }

    public void setSize(Double size) {
        this.size = size;
    }

    public Long getCapacity() {
        return capacity;
    }

    public void setCapacity(Long capacity) {
        this.capacity = capacity;
    }

    public Integer getRpm() {
        return rpm;
    }

    public void setRpm(Integer rpm) {
        this.rpm = rpm;
    }

    public String getFirmwareLevel() {
        return firmwareLevel;
    }

    public void setFirmwareLevel(String firmwareLevel) {
        this.firmwareLevel = firmwareLevel;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getSlotId() {
        return slotId;
    }

    public void setSlotId(String slotId) {
        this.slotId = slotId;
    }

    public String getEnclosureId() {
        return enclosureId;
    }

    public void setEnclosureId(String enclosureId) {
        this.enclosureId = enclosureId;
    }

    public String getFruId() {
        return fruId;
    }

    public void setFruId(String fruId) {
        this.fruId = fruId;
    }

    public String getFruPartNum() {
        return fruPartNum;
    }

    public void setFruPartNum(String fruPartNum) {
        this.fruPartNum = fruPartNum;
    }

    public String getTechType() {
        return techType;
    }

    public void setTechType(String techType) {
        this.techType = techType;
    }

    public String getNodeId() {
        return nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    public String getNodeName() {
        return nodeName;
    }

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

    public String getProviderId() {
        return providerId;
    }

    public void setProviderId(String providerId) {
        this.providerId = providerId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getFpgaLevel() {
        return fpgaLevel;
    }

    public void setFpgaLevel(String fpgaLevel) {
        this.fpgaLevel = fpgaLevel;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getQuorumId() {
        return quorumId;
    }

    public void setQuorumId(String quorumId) {
        this.quorumId = quorumId;
    }

    public String getIdentifier() {
        return identifier;
    }

    public void setIdentifier(String identifier) {
        this.identifier = identifier;
    }

    public Long getControllerId() {
        return controllerId;
    }

    public void setControllerId(Long controllerId) {
        this.controllerId = controllerId;
    }

    public String getDriveId() {
        return driveId;
    }

    public void setDriveId(String driveId) {
        this.driveId = driveId;
    }

    public String getOperationalStatus() {
        return operationalStatus;
    }

    public void setOperationalStatus(String operationalStatus) {
        this.operationalStatus = operationalStatus;
    }

    public String getCaptionType() {
        return captionType;
    }

    public void setCaptionType(String captionType) {
        this.captionType = captionType;
    }

    public String getEncryption() {
        return encryption;
    }

    public void setEncryption(String encryption) {
        this.encryption = encryption;
    }

    public Long getRuleRelationId() {
        return ruleRelationId;
    }

    public void setRuleRelationId(Long ruleRelationId) {
        this.ruleRelationId = ruleRelationId;
    }

    public String getThresholdGroupName() {
        return thresholdGroupName;
    }

    public void setThresholdGroupName(String thresholdGroupName) {
        this.thresholdGroupName = thresholdGroupName;
    }

    public String getPolicyName() {
        return policyName;
    }

    public void setPolicyName(String policyName) {
        this.policyName = policyName;
    }

    public Long getThresholdGroupId() {
        return thresholdGroupId;
    }

    public void setThresholdGroupId(Long thresholdGroupId) {
        this.thresholdGroupId = thresholdGroupId;
    }

    public Long getPolicyId() {
        return policyId;
    }

    public void setPolicyId(Long policyId) {
        this.policyId = policyId;
    }

    public Boolean getIsBoot() {
        return isBoot;
    }

    public void setIsBoot(Boolean isBoot) {
        this.isBoot = isBoot;
    }

    public Boolean getIsCache() {
        return isCache;
    }

    public void setIsCache(Boolean isCache) {
        this.isCache = isCache;
    }

    public String getDataStatus() {
        return dataStatus;
    }

    public void setDataStatus(String dataStatus) {
        this.dataStatus = dataStatus;
    }

    public Long getUsedCapacity() {
        return usedCapacity;
    }

    public void setUsedCapacity(Long usedCapacity) {
        this.usedCapacity = usedCapacity;
    }

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public List<DiskPartition> getPartitions() {
        return partitions;
    }

    public void setPartitions(List<DiskPartition> partitions) {
        this.partitions = partitions;
    }

    public Server getServer() {
        return server;
    }

    public void setServer(Server server) {
        this.server = server;
    }

    public Double getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(Double usedSize) {
        this.usedSize = usedSize;
    }

    public String getType() {
        return type;
    }

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

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }
}
