package com.bocloud.cmp.model;

import lombok.Data;

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

@Data
public class SnapshotModel {
    private String name;
    private String snapshotUuid; // 快照ID
    private String snapshotVal;
    private String remark;
    private String volumeUuid;
    private Integer size;
    private Long sizeByte;
    private String status;
    private String rollbackStatus;// 回滚状态
    private String progress;
    private Date createTime;// 快照创建时间
    private String instanceId; // 云主机instanceId
    private String vmName; // 云主机名称
    private String vmValue; // 打快照时云主机的详细信息(SMARTX)
    private String hostName; // 宿主机名称
    private String regionId;
    private String resourceGroupName;
    private String volumeType;
    private String poolUuid; // 卷快照所在池的xsky端id
    private Double allocatedSize; // 快照已使用的容量
    private Long clonedBlockVolumeNum; // 克隆卷的个数
    private Boolean isProtected;
    private Boolean hidden;
    private Boolean passive;
    private Boolean reserved;
    private String snapName;
    private Long volumeId;
    private Date updateTime; // 快照更新时间
    private String blockVolumeGroupSnapshotUuid; // 所属组快照uuid
    private String blockVolumeGroupSnapshotName;
    private String poolName;
    private String volumeName;
    private String props;
    private String newName;
    private Integer newSize;
    private String blockDeviceMapping; // 快照下的volume数据
    private String snapshotType;
    private String resourceGroupUuid;
    private String keyPath; // 该快照的path，smis传参用
    private String storageKeyPath; // 该快照所属的存储设备的path，smis传参用
    private String settintKeyPath; // 该快照的setting的path，smis传参用
    private String sourceKeyPath; // 该快照的来源（卷或快照组）的path，smis传参用
    private List<TagModel> tagModels;
    private String parentSnapshotUuid;
    private String category;// 型号
    private String snapshotSource; // 京东云快照来源，可以有self，others两种来源
    private Boolean encrypted; // 京东云,快照是否为加密盘的快照
    private String tags;
    private ServerModel rebuildServer; // SMARTX 云主机快照重建云主机
    private VolumeModel rebuildVolume; // SMARTX 虚拟卷快照重建虚拟卷

    //-----FusionSphere新增字段--------//
    private String uri;//访问该cluster对应的uri地址
    private List<SnapshotModel> childSnapshots;//子快照
    private String serverUri;
    private Boolean needMemoryShot;//是否制作内存快照
    private Boolean isConsistent;//是否一致性快照
    //-----FusionSphere新增字段--------//


    private Boolean needCreateSnap; // 恢复前自动创建快照
    private Boolean autoStartvm;    // 回复完成后自动开启虚拟机
    private Date snapShotCreateTime;
    public SnapshotModel() {
    }

    public SnapshotModel(String name, String remark, String volumeUuid, String instanceId) {
        super();
        this.name = name;
        this.remark = remark;
        this.volumeUuid = volumeUuid;
        this.instanceId = instanceId;
    }

}
