package com.bocloud.cmp.model.hmc;

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

import com.bocloud.common.utils.DateDeserializer;
import com.bocloud.common.utils.DateSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * HMC分区概要文件
 *
 * @author ShaolongTan
 */
@Deprecated
@Data
@NoArgsConstructor
@AllArgsConstructor
public class HmcProfileModel {
	private Long id; // ID
	private Long partitionId;
	private String uuid;
	private String type;
	private Boolean assignAllResources;
	private Boolean sharedProcessor;
	private Double minProUnits;
	private Double desProUnits;
	private Double maxProUnits;
	private Integer minProVirt;
	private Integer desProVirt;
	private Integer maxProVirt;
	private Integer minPro;
	private Integer desPro;
	private Integer maxPro;
	private Long sharedProPoolId;
	private Boolean dedicatedPro;
	private Integer uncappedWeight;
	private String proSharingMode;
	private Integer maxMemory;
	private Integer minMemory;
	private Integer desMemory;
	private Integer memoryBsrCount;
	private Integer memoryPageRatio;
	private Integer memoryMinPageCount;
	private Integer memoryDesPageCount;
	private Integer memoryMaxPageCount;
	// 引导方式
	// Normal正常
	// System_Management_Services系统管理服务
	// Diagnostic_With_Default_Boot_List使用缺省引导列表（DIAG_DEFAULT）进行诊断
	// Diagnostic_With_Stored_Boot_List使用存储的列表（DIAG_STORED）进行诊断
	// Open_Firmware开放式固件正常提示
	private String bootMode;
	private Boolean autoStart; // 随受管系统一起自动启动
	private Boolean connMonitor; // 启用连接监视
	private Boolean redundantErrorPathReport; // 启用冗余错误路径报告
	private String processorCompatibilityMode;
	private Integer maxVirtualIoslots;
	private Boolean isDefaultProfile;
	private Boolean isActiveProfile;
	private Boolean isLastActivated;
	@JsonSerialize(using = DateSerializer.class)
	@JsonDeserialize(using = DateDeserializer.class)
	private Date lastActivated;
	private String createUserName;
	private Integer hmcPartitionId;
	private List<HmcProfileIoslotModel> hmcProfileIoslot;
	private List<HmcProfileNetworkAdapterModel> hmcProfileNetworkAdapters;
	private List<HmcProfileFibreAdapterModel> hmcProfileFibreAdapters;
	private List<HmcProfileScsiAdapterModel> hmcProfileScsiAdapters;
	private List<HmcProfileLheaModel> hmcProfileLheas;
	private HmcSystemSharedProcessorPoolModel hmcSystemSharedProcessorPool;
	private String currentProfileSync;
	private Long serverId;
	private Date gmtCreate;
	private Date gmtModify;
	private Long creatorId;
	private Long ownerId;
	private Long menderId;
	private String name;
	private String status;
	private Boolean deleted;
	private String props;
	private String remark;

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