package com.bocloud.ims.entity.resource.hmc;

import com.bocloud.common.utils.DateDeserializer;
import com.bocloud.common.utils.DateSerializer;
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 com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * HMC分区概要文件
 * 
 * @author ShaolongTan
 */
@Deprecated
@Table("hmc_profile")
public class HmcProfile extends GenericEntity {
    @PK(value = PKStrategy.AUTO)
    private Long id; // ID
    @Column("partition_id")
    private Long partitionId;
    @Column("uuid")
    private String uuid;
    @Column("type")
    private String type;
    @Column("assign_all_resources")
    private Boolean assignAllResources;
    @Column("shared_processor")
    private Boolean sharedProcessor;
    @Column("min_pro_units")
    private Double minProUnits;
    @Column("des_pro_units")
    private Double desProUnits;
    @Column("max_pro_units")
    private Double maxProUnits;
    @Column("min_pro_virt")
    private Integer minProVirt;
    @Column("des_pro_virt")
    private Integer desProVirt;
    @Column("max_pro_virt")
    private Integer maxProVirt;
    @Column("min_pro")
    private Integer minPro;
    @Column("des_pro")
    private Integer desPro;
    @Column("max_pro")
    private Integer maxPro;
    @Column("shared_pro_pool_id")
    private Long sharedProPoolId;
    @Column("dedicated_pro")
    private Boolean dedicatedPro;
    @Column("uncapped_weight")
    private Integer uncappedWeight;
    @Column("pro_sharing_mode")
    private String proSharingMode;
    @Column("max_memory")
    private Integer maxMemory;
    @Column("min_memory")
    private Integer minMemory;
    @Column("des_memory")
    private Integer desMemory;
    @Column("memory_bsr_count")
    private Integer memoryBsrCount;
    @Column("memory_page_ratio")
    private Integer memoryPageRatio;
    @Column("memory_min_page_count")
    private Integer memoryMinPageCount;
    @Column("memory_des_page_count")
    private Integer memoryDesPageCount;
    @Column("memory_max_page_count")
    private Integer memoryMaxPageCount;
    @Column("boot_mode")
    // 引导方式
    //   Normal正常
    //   System_Management_Services系统管理服务
    //   Diagnostic_With_Default_Boot_List使用缺省引导列表（DIAG_DEFAULT）进行诊断
    //   Diagnostic_With_Stored_Boot_List使用存储的列表（DIAG_STORED）进行诊断
    //   Open_Firmware开放式固件正常提示
    private String bootMode;
    @Column("auto_start")
    private Boolean autoStart; // 随受管系统一起自动启动
    @Column("conn_monitor")
    private Boolean connMonitor; // 启用连接监视
    @Column("redundant_error_path_report")
    private Boolean redundantErrorPathReport; // 启用冗余错误路径报告
    @Column("processor_compatibility_mode")
    private String processorCompatibilityMode;
    @Column("max_virtual_ioslots")
    private Integer maxVirtualIoslots;
    @Column("is_default_profile")
    private Boolean isDefaultProfile;
    @Column("is_active_profile")
    private Boolean isActiveProfile;
    @Column("is_last_activated")
    private Boolean isLastActivated;
    @Column("last_activated")
    @JsonSerialize(using = DateSerializer.class)
    @JsonDeserialize(using = DateDeserializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastActivated;

    @IgnoreAll
    private String createUserName;

    @IgnoreAll
    private Integer hmcPartitionId;

    @IgnoreAll
    private List<HmcProfileIoslot> hmcProfileIoslot;

    @IgnoreAll
    private List<HmcProfileNetworkAdapter> hmcProfileNetworkAdapters;

    @IgnoreAll
    private List<HmcProfileFibreAdapter> hmcProfileFibreAdapters;

    @IgnoreAll
    private List<HmcProfileScsiAdapter> hmcProfileScsiAdapters;

    @IgnoreAll
    private List<HmcProfileLhea> hmcProfileLheas;
    @IgnoreAll
    private HmcSystemSharedProcessorPool hmcSystemSharedProcessorPool;

    @IgnoreAll
    private String currentProfileSync;
    @IgnoreAll
    private Long serverId;

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the partitionId
     */
    public Long getPartitionId() {
        return partitionId;
    }

    /**
     * @param partitionId
     *            the partitionId to set
     */
    public void setPartitionId(Long partitionId) {
        this.partitionId = partitionId;
    }

    /**
     * @return the uuid
     */
    public String getUuid() {
        return uuid;
    }

    /**
     * @param uuid
     *            the uuid to set
     */
    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    /**
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * @param type
     *            the type to set
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * @return the assignAllResources
     */
    public Boolean getAssignAllResources() {
        return assignAllResources;
    }

    /**
     * @param assignAllResources
     *            the assignAllResources to set
     */
    public void setAssignAllResources(Boolean assignAllResources) {
        this.assignAllResources = assignAllResources;
    }

    /**
     * @return the maxMemory
     */
    public Integer getMaxMemory() {
        return maxMemory;
    }

    /**
     * @param maxMemory
     *            the maxMemory to set
     */
    public void setMaxMemory(Integer maxMemory) {
        this.maxMemory = maxMemory;
    }

    /**
     * @return the minMemory
     */
    public Integer getMinMemory() {
        return minMemory;
    }

    /**
     * @param minMemory
     *            the minMemory to set
     */
    public void setMinMemory(Integer minMemory) {
        this.minMemory = minMemory;
    }

    /**
     * @return the desMemory
     */
    public Integer getDesMemory() {
        return desMemory;
    }

    /**
     * @param desMemory
     *            the desMemory to set
     */
    public void setDesMemory(Integer desMemory) {
        this.desMemory = desMemory;
    }

    /**
     * @return the bootMode
     */
    public String getBootMode() {
        return bootMode;
    }

    /**
     * @param bootMode
     *            the bootMode to set
     */
    public void setBootMode(String bootMode) {
        this.bootMode = bootMode;
    }

    /**
     * @return the autoStart
     */
    public Boolean getAutoStart() {
        return autoStart;
    }

    /**
     * @param autoStart
     *            the autoStart to set
     */
    public void setAutoStart(Boolean autoStart) {
        this.autoStart = autoStart;
    }

    /**
     * @return the sharedProcessor
     */
    public Boolean getSharedProcessor() {
        return sharedProcessor;
    }

    /**
     * @param sharedProcessor
     *            the sharedProcessor to set
     */
    public void setSharedProcessor(Boolean sharedProcessor) {
        this.sharedProcessor = sharedProcessor;
    }

    /**
     * @return the minProUnits
     */
    public Double getMinProUnits() {
        return minProUnits;
    }

    /**
     * @param minProUnits
     *            the minProUnits to set
     */
    public void setMinProUnits(Double minProUnits) {
        this.minProUnits = minProUnits;
    }

    /**
     * @return the desProUnits
     */
    public Double getDesProUnits() {
        return desProUnits;
    }

    /**
     * @param desProUnits
     *            the desProUnits to set
     */
    public void setDesProUnits(Double desProUnits) {
        this.desProUnits = desProUnits;
    }

    /**
     * @return the maxProUnits
     */
    public Double getMaxProUnits() {
        return maxProUnits;
    }

    /**
     * @param maxProUnits
     *            the maxProUnits to set
     */
    public void setMaxProUnits(Double maxProUnits) {
        this.maxProUnits = maxProUnits;
    }

    /**
     * @return the minProVirt
     */
    public Integer getMinProVirt() {
        return minProVirt;
    }

    /**
     * @param minProVirt
     *            the minProVirt to set
     */
    public void setMinProVirt(Integer minProVirt) {
        this.minProVirt = minProVirt;
    }

    /**
     * @return the desProVirt
     */
    public Integer getDesProVirt() {
        return desProVirt;
    }

    /**
     * @param desProVirt
     *            the desProVirt to set
     */
    public void setDesProVirt(Integer desProVirt) {
        this.desProVirt = desProVirt;
    }

    /**
     * @return the maxProVirt
     */
    public Integer getMaxProVirt() {
        return maxProVirt;
    }

    /**
     * @param maxProVirt
     *            the maxProVirt to set
     */
    public void setMaxProVirt(Integer maxProVirt) {
        this.maxProVirt = maxProVirt;
    }

    /**
     * @return the sharedProPoolId
     */
    public Long getSharedProPoolId() {
        return sharedProPoolId;
    }

    /**
     * @param sharedProPoolId
     *            the sharedProPoolId to set
     */
    public void setSharedProPoolId(Long sharedProPoolId) {
        this.sharedProPoolId = sharedProPoolId;
    }

    /**
     * @return the minPro
     */
    public Integer getMinPro() {
        return minPro;
    }

    /**
     * @param minPro
     *            the minPro to set
     */
    public void setMinPro(Integer minPro) {
        this.minPro = minPro;
    }

    /**
     * @return the desPro
     */
    public Integer getDesPro() {
        return desPro;
    }

    /**
     * @param desPro
     *            the desPro to set
     */
    public void setDesPro(Integer desPro) {
        this.desPro = desPro;
    }

    /**
     * @return the maxPro
     */
    public Integer getMaxPro() {
        return maxPro;
    }

    /**
     * @param maxPro
     *            the maxPro to set
     */
    public void setMaxPro(Integer maxPro) {
        this.maxPro = maxPro;
    }

    /**
     * @return the dedicatedPro
     */
    public Boolean getDedicatedPro() {
        return dedicatedPro;
    }

    /**
     * @param dedicatedPro
     *            the dedicatedPro to set
     */
    public void setDedicatedPro(Boolean dedicatedPro) {
        this.dedicatedPro = dedicatedPro;
    }

    /**
     * @return the uncappedWeight
     */
    public Integer getUncappedWeight() {
        return uncappedWeight;
    }

    /**
     * @param uncappedWeight
     *            the uncappedWeight to set
     */
    public void setUncappedWeight(Integer uncappedWeight) {
        this.uncappedWeight = uncappedWeight;
    }

    /**
     * @return the proSharingMode
     */
    public String getProSharingMode() {
        return proSharingMode;
    }

    /**
     * @param proSharingMode
     *            the proSharingMode to set
     */
    public void setProSharingMode(String proSharingMode) {
        this.proSharingMode = proSharingMode;
    }

    /**
     * @return the memoryBsrCount
     */
    public Integer getMemoryBsrCount() {
        return memoryBsrCount;
    }

    /**
     * @param memoryBsrCount
     *            the memoryBsrCount to set
     */
    public void setMemoryBsrCount(Integer memoryBsrCount) {
        this.memoryBsrCount = memoryBsrCount;
    }

    /**
     * @return the memoryPageRatio
     */
    public Integer getMemoryPageRatio() {
        return memoryPageRatio;
    }

    /**
     * @param memoryPageRatio
     *            the memoryPageRatio to set
     */
    public void setMemoryPageRatio(Integer memoryPageRatio) {
        this.memoryPageRatio = memoryPageRatio;
    }

    /**
     * @return the memoryMinPageCount
     */
    public Integer getMemoryMinPageCount() {
        return memoryMinPageCount;
    }

    /**
     * @param memoryMinPageCount
     *            the memoryMinPageCount to set
     */
    public void setMemoryMinPageCount(Integer memoryMinPageCount) {
        this.memoryMinPageCount = memoryMinPageCount;
    }

    /**
     * @return the memoryDesPageCount
     */
    public Integer getMemoryDesPageCount() {
        return memoryDesPageCount;
    }

    /**
     * @param memoryDesPageCount
     *            the memoryDesPageCount to set
     */
    public void setMemoryDesPageCount(Integer memoryDesPageCount) {
        this.memoryDesPageCount = memoryDesPageCount;
    }

    /**
     * @return the memoryMaxPageCount
     */
    public Integer getMemoryMaxPageCount() {
        return memoryMaxPageCount;
    }

    /**
     * @param memoryMaxPageCount
     *            the memoryMaxPageCount to set
     */
    public void setMemoryMaxPageCount(Integer memoryMaxPageCount) {
        this.memoryMaxPageCount = memoryMaxPageCount;
    }

    /**
     * @return the connMonitor
     */
    public Boolean getConnMonitor() {
        return connMonitor;
    }

    /**
     * @param connMonitor
     *            the connMonitor to set
     */
    public void setConnMonitor(Boolean connMonitor) {
        this.connMonitor = connMonitor;
    }

    /**
     * @return the redundantErrorPathReport
     */
    public Boolean getRedundantErrorPathReport() {
        return redundantErrorPathReport;
    }

    /**
     * @param redundantErrorPathReport
     *            the redundantErrorPathReport to set
     */
    public void setRedundantErrorPathReport(Boolean redundantErrorPathReport) {
        this.redundantErrorPathReport = redundantErrorPathReport;
    }

    /**
     * @return the processorCompatibilityMode
     */
    public String getProcessorCompatibilityMode() {
        return processorCompatibilityMode;
    }

    /**
     * @param processorCompatibilityMode
     *            the processorCompatibilityMode to set
     */
    public void setProcessorCompatibilityMode(String processorCompatibilityMode) {
        this.processorCompatibilityMode = processorCompatibilityMode;
    }

    /**
     * @return the maxVirtualIoslots
     */
    public Integer getMaxVirtualIoslots() {
        return maxVirtualIoslots;
    }

    /**
     * @param maxVirtualIoslots
     *            the maxVirtualIoslots to set
     */
    public void setMaxVirtualIoslots(Integer maxVirtualIoslots) {
        this.maxVirtualIoslots = maxVirtualIoslots;
    }

    public Integer getHmcPartitionId() {
        return hmcPartitionId;
    }

    public void setHmcPartitionId(Integer hmcPartitionId) {
        this.hmcPartitionId = hmcPartitionId;
    }

    /**
     * @return the hmcProfileIoslot
     */
    public List<HmcProfileIoslot> getHmcProfileIoslot() {
        return hmcProfileIoslot;
    }

    /**
     * @param hmcProfileIoslot
     *            the hmcProfileIoslot to set
     */
    public void setHmcProfileIoslot(List<HmcProfileIoslot> hmcProfileIoslot) {
        this.hmcProfileIoslot = hmcProfileIoslot;
    }

    public List<HmcProfileNetworkAdapter> getHmcProfileNetworkAdapters() {
        return hmcProfileNetworkAdapters;
    }

    public void setHmcProfileNetworkAdapters(List<HmcProfileNetworkAdapter> hmcProfileNetworkAdapters) {
        this.hmcProfileNetworkAdapters = hmcProfileNetworkAdapters;
    }

    public List<HmcProfileFibreAdapter> getHmcProfileFibreAdapters() {
        return hmcProfileFibreAdapters;
    }

    public void setHmcProfileFibreAdapters(List<HmcProfileFibreAdapter> hmcProfileFibreAdapters) {
        this.hmcProfileFibreAdapters = hmcProfileFibreAdapters;
    }

    public List<HmcProfileScsiAdapter> getHmcProfileScsiAdapters() {
        return hmcProfileScsiAdapters;
    }

    public void setHmcProfileScsiAdapters(List<HmcProfileScsiAdapter> hmcProfileScsiAdapters) {
        this.hmcProfileScsiAdapters = hmcProfileScsiAdapters;
    }

    public List<HmcProfileLhea> getHmcProfileLheas() {
        return hmcProfileLheas;
    }

    public void setHmcProfileLheas(List<HmcProfileLhea> hmcProfileLheas) {
        this.hmcProfileLheas = hmcProfileLheas;
    }

    public Boolean getIsDefaultProfile() {
        return isDefaultProfile;
    }

    public void setIsDefaultProfile(Boolean isDefaultProfile) {
        this.isDefaultProfile = isDefaultProfile;
    }

    public Boolean getIsActiveProfile() {
        return isActiveProfile;
    }

    public void setIsActiveProfile(Boolean isActiveProfile) {
        this.isActiveProfile = isActiveProfile;
    }

    public Boolean getIsLastActivated() {
        return isLastActivated;
    }

    public void setIsLastActivated(Boolean isLastActivated) {
        this.isLastActivated = isLastActivated;
    }

    public Date getLastActivated() {
        return lastActivated;
    }

    public void setLastActivated(Date lastActivated) {
        this.lastActivated = lastActivated;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public String getCurrentProfileSync() {
        return currentProfileSync;
    }

    public void setCurrentProfileSync(String currentProfileSync) {
        this.currentProfileSync = currentProfileSync;
    }

    public HmcSystemSharedProcessorPool getHmcSystemSharedProcessorPool() {
        return hmcSystemSharedProcessorPool;
    }

    public void setHmcSystemSharedProcessorPool(HmcSystemSharedProcessorPool hmcSystemSharedProcessorPool) {
        this.hmcSystemSharedProcessorPool = hmcSystemSharedProcessorPool;
    }

    public Long getServerId() {
        return serverId;
    }

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

    public void preSave(Long creatorId, Long menderId, Long partitionId) {
        this.setCreatorId(creatorId);
        this.setMenderId(menderId);
        this.setPartitionId(partitionId);
    }
}
