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;

/**
 * 存储池
 */
@Table("volume_pool")
public class VolumePool extends GenericEntity {

    /**
     * 自增id
     */
    @PK(value = PKStrategy.AUTO)
    private Long id;
    /**
     * 所属平台id
     */
    @Column(value = "vendor_id")
    private Long vendorId;
    /**
     * 所属存储服务器
     */
    @Column(value = "storage_id")
    private Long storageId;
    /**
     * 所属存储服务器
     */
    @Column(value = "storage_name")
    @IgnoreAll
    private String storageName;
    /**
     * 存储池uuid
     */
    @Column(value = "uuid")
    private String uuid;
    /**
     * 池标识
     */
    @Column("identifier")
    private String identifier;
    /**
     * 警告阈值
     */
    @Column(value = "warning")
    private Double warning;
    /**
     * 虚拟使用容量（virtualCapacity）和容量（capacity）的比率
     */
    @Column(value = "overallocation")
    private Double overallocation;
    /**
     * 最小分配单元（MB）
     */
    @Column(value = "extent_size")
    private Double extentSize;
    /**
     * 容量
     */
    @Column(value = "capacity")
    private Double capacity;
    /**
     * 真实容量
     */
    @Column(value = "real_capacity")
    private Double realCapacity;
    /**
     * 使用容量
     */
    @Column(value = "used_capacity")
    private Double usedCapacity;
    /**
     * 虚拟使用容量
     */
    @Column(value = "virtual_capacity")
    private Double virtualCapacity;
    /**
     * 可用容量
     */
    @Column(value = "free_capacity")
    private Double freeCapacity;
    /**
     * 是否有压缩卷存在
     */
    @Column(value = "compression_active")
    private Boolean compressionActive;
    /**
     * 所有压缩卷虚拟容量
     */
    @Column(value = "compression_virtual_capacity")
    private Double compressionVirtualCapacity;
    /**
     * 所有压缩卷已使用容量
     */
    @Column(value = "compression_compressed_capacity")
    private Double compressionCompressedCapacity;
    /**
     * 所有压缩卷中未压缩容量
     */
    @Column(value = "compression_uncompressed_capacity")
    private Double compressionUncompressedCapacity;
    /**
     * 自动分层存储设定状态
     */
    @Column(value = "easy_tier")
    private String easytier;
    /**
     * 自动分层存储运行状态
     */
    @Column(value = "easy_tier_status")
    private String easytierStatus;
    /**
     * mdisk数量
     */
    @Column(value = "mdisk_count")
    private Integer mdiskCount;
    /**
     * 卷数量
     */
    @Column(value = "vdisk_count")
    private Integer vdiskCount;

    /**
     * mdiskId
     */
    @Column(value = "mdisk_Id")
    private Long mdiskId;

    /**
     * raidName
     */
    @Column(value = "raid")
    private String raid;

    /**
     * 池uuid
     */
    @Column(value = "pool_uuid")
    private String poolUuid;
    /**
     * smis传参用
     */
    @Column("key_path")
    private String keyPath;

    /**
     * operationalStatus
     */
    @Column(value = "operational_status")
    private String operationalStatus; // 运行状态

    /**
     * mdiskName
     */
    @Column(value = "mdisk_name")
    @IgnoreAll
    private String mdiskName;

    /**
     * raidName
     */
    @Column(value = "raid_name")
    @IgnoreAll
    private String raidName;


    /**
     * raidTactics
     */
    @Column(value = "raid_tactics")
    @IgnoreAll
    private String raidTactics;

    @Column(value = "role")
    private String role;

    @Column(value = "device_type")
    private String deviceType;

    @Column(value = "replicate_cnt")
    private Integer replicateCnt;

    @Column(value = "min_replicate_cnt")
    private Integer minReplicateCnt; // 最小副本数量

    @Column(value = "placement_group_cnt")
    private Integer placementGroupCnt; // 放置组数量

    @Column(value = "data_status")
    private String dataStatus;

    @IgnoreAll
    private Double poolMaxCapacity; // 池可用的最大容量
    @IgnoreAll
    private Double poolMinCapacity; // 池可用的最小容量
    @IgnoreAll
    private Long ecDataBolckCnt; // ec纠删码 数据块个数
    @IgnoreAll
    private Long ecCodeBolckCnt; // ec纠删码 校验块个数
    @IgnoreAll
    private List<Long> osdIds; // 存储池包含的osd列表
    @IgnoreAll
    private List<CephOsd> osds; // 存储池包含的osd
    @IgnoreAll
    private List<Volume> volumes; // 存储池包含的卷

    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 getVendorId() {
        return vendorId;
    }

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

    public Long getStorageId() {
        return storageId;
    }

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

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Double getWarning() {
        return warning;
    }

    public void setWarning(Double warning) {
        this.warning = warning;
    }

    public Double getOverallocation() {
        return overallocation;
    }

    public void setOverallocation(Double overallocation) {
        this.overallocation = overallocation;
    }

    public Double getExtentSize() {
        return extentSize;
    }

    public void setExtentSize(Double extentSize) {
        this.extentSize = extentSize;
    }

    public Double getCapacity() {
        return capacity;
    }

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

    public Double getRealCapacity() {
        return realCapacity;
    }

    public void setRealCapacity(Double realCapacity) {
        this.realCapacity = realCapacity;
    }

    public Double getUsedCapacity() {
        return usedCapacity;
    }

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

    public Double getVirtualCapacity() {
        return virtualCapacity;
    }

    public void setVirtualCapacity(Double virtualCapacity) {
        this.virtualCapacity = virtualCapacity;
    }

    public Double getFreeCapacity() {
        return freeCapacity;
    }

    public void setFreeCapacity(Double freeCapacity) {
        this.freeCapacity = freeCapacity;
    }

    public Boolean getCompressionActive() {
        return compressionActive;
    }

    public void setCompressionActive(Boolean compressionActive) {
        this.compressionActive = compressionActive;
    }

    public Double getCompressionVirtualCapacity() {
        return compressionVirtualCapacity;
    }

    public void setCompressionVirtualCapacity(Double compressionVirtualCapacity) {
        this.compressionVirtualCapacity = compressionVirtualCapacity;
    }

    public Double getCompressionCompressedCapacity() {
        return compressionCompressedCapacity;
    }

    public void setCompressionCompressedCapacity(Double compressionCompressedCapacity) {
        this.compressionCompressedCapacity = compressionCompressedCapacity;
    }

    public Double getCompressionUncompressedCapacity() {
        return compressionUncompressedCapacity;
    }

    public void setCompressionUncompressedCapacity(Double compressionUncompressedCapacity) {
        this.compressionUncompressedCapacity = compressionUncompressedCapacity;
    }

    public String getEasytier() {
        return easytier;
    }

    public void setEasytier(String easytier) {
        this.easytier = easytier;
    }

    public String getEasytierStatus() {
        return easytierStatus;
    }

    public void setEasytierStatus(String easytierStatus) {
        this.easytierStatus = easytierStatus;
    }

    public Integer getMdiskCount() {
        return mdiskCount;
    }

    public void setMdiskCount(Integer mdiskCount) {
        this.mdiskCount = mdiskCount;
    }

    public Integer getVdiskCount() {
        return vdiskCount;
    }

    public void setVdiskCount(Integer vdiskCount) {
        this.vdiskCount = vdiskCount;
    }

    public String getStorageName() {
        return storageName;
    }

    public void setStorageName(String storageName) {
        this.storageName = storageName;
    }

    public String getIdentifier() {
        return identifier;
    }

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

    public String getPoolUuid() {
        return poolUuid;
    }

    public void setPoolUuid(String poolUuid) {
        this.poolUuid = poolUuid;
    }

    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 getRaidName() {
        return raidName;
    }

    public void setRaidName(String raidName) {
        this.raidName = raidName;
    }

    public String getRaidTactics() {
        return raidTactics;
    }

    public void setRaidTactics(String raidTactics) {
        this.raidTactics = raidTactics;
    }

    public String getOperationalStatus() {
        return operationalStatus;
    }

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

    public Double getPoolMaxCapacity() {
        return poolMaxCapacity;
    }

    public void setPoolMaxCapacity(Double poolMaxCapacity) {
        this.poolMaxCapacity = poolMaxCapacity;
    }

    public Double getPoolMinCapacity() {
        return poolMinCapacity;
    }

    public void setPoolMinCapacity(Double poolMinCapacity) {
        this.poolMinCapacity = poolMinCapacity;
    }

    public String getRaid() {
        return raid;
    }

    public void setRaid(String raid) {
        this.raid = raid;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public Integer getReplicateCnt() {
        return replicateCnt;
    }

    public void setReplicateCnt(Integer replicateCnt) {
        this.replicateCnt = replicateCnt;
    }

    public String getDataStatus() {
        return dataStatus;
    }

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

    public Long getEcDataBolckCnt() {
        return ecDataBolckCnt;
    }

    public void setEcDataBolckCnt(Long ecDataBolckCnt) {
        this.ecDataBolckCnt = ecDataBolckCnt;
    }

    public Long getEcCodeBolckCnt() {
        return ecCodeBolckCnt;
    }

    public void setEcCodeBolckCnt(Long ecCodeBolckCnt) {
        this.ecCodeBolckCnt = ecCodeBolckCnt;
    }

    public List<Long> getOsdIds() {
        return osdIds;
    }

    public void setOsdIds(List<Long> osdIds) {
        this.osdIds = osdIds;
    }

    public List<CephOsd> getOsds() {
        return osds;
    }

    public void setOsds(List<CephOsd> osds) {
        this.osds = osds;
    }

    public List<Volume> getVolumes() {
        return volumes;
    }

    public void setVolumes(List<Volume> volumes) {
        this.volumes = volumes;
    }

    public Integer getMinReplicateCnt() {
        return minReplicateCnt;
    }

    public void setMinReplicateCnt(Integer minReplicateCnt) {
        this.minReplicateCnt = minReplicateCnt;
    }

    public Integer getPlacementGroupCnt() {
        return placementGroupCnt;
    }

    public void setPlacementGroupCnt(Integer placementGroupCnt) {
        this.placementGroupCnt = placementGroupCnt;
    }
}
