package com.bocloud.cmp.model;

import com.bocloud.cmp.model.storage.StorageGroupModel;
import com.bocloud.cmp.model.storage.StorageMdiskModel;
import lombok.Data;

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

@Data
public class VolumeModel {
    private Long id;
    private String uuid;
    private String name;
    private String volumeUuid;
    private String type;
    private String path;
    private String bus;
    private Integer size; // 大小
    private String props;
    private String remark;
    private String status;
    private Date createTime;
    private Boolean bootVolume;
    private Boolean disabled;
    private Date attachedTime;// 挂载时间
    private String category;// 型号
    private String catalog;// 卷类型
    private Boolean deleteAutoSnapshot;// 自动删除快照
    private Boolean deleteWithInstance;// 随实例删除
    private Boolean enableAutoSnapshot;//
    private Date detachedTime;// 解挂时间
    private String imageUuid; // 镜像ID
    private String instanceId;// 实例ID
    private String zone; // 区域
    private String sourceSnapshotId;// 原快照ID
    private String requestId;
    private int feeType;
    private List<ServerVolumeModel> models;
    private String diskObjectId;// 硬盘设备唯一标识符
    private String sourceVolidUuid;// 源卷UUID
    private String sourceSnapUuid;// 源快照UUID
    private Long sourceVolidId;// 源卷ID
    private Long sourceSnapId;// 源快照ID
    private Long sourceImgId;// 源镜像ID
    private Boolean multiattach; // 是否为共享盘
    private String passthrough; // 磁盘类型 true:SCSI false VBD 默认false
    private Date diskExpireTime; // 过期时间
    private String diskChargeType; // 计费类型
    private Integer period; // 购买时长
    private String usage; // 是否为系统盘
    private String regionId;
    private String deviceName;
    private Long volumeTemplateId; // 存储器模板id
    private String volumeTemplateUuid; // 存储器模板uuid
    private Long storageId; // 所属存储服务器id
    private String storageHost; // 所属存储服务器host
    private String storageUuid; // 所属存储服务器uuid
    private String storageKeyPath; // 所属存储服务器path
    private String wwn; // 存储上对应卷的wwn号
    private Boolean support; // 存储上卷的是否是受支持的
    private String reason;// 存储上卷的若是不受支持的，不受支持的原因
    private Boolean managed;// 存储上卷是否已经被管理
    private Integer bootIndex; // 启动顺序
    private String dataStoreName;// 所在数据存储名称
    private Boolean imageVolume; // 卷是否来源于镜像
    private Long poolId; // 存储池id
    private String poolUuid; // 存储池uuid
    private String poolKeyPath; // 存储池path
    private String poolName; // 存储池名称
    private Long blockCount; // 卷block的数量
    private Double blockSize; // 卷block的大小
    private String identifier; // 卷标识
    private Boolean formatBeforeUse; // 使用前是否格式化该卷
    private String nodeId; // 首选节点
    private String udid; // UDID (OpenVMS)
    private Integer realSizePercent; // 实际容量占虚拟容量的百分比，乘以100以后的数字
    private Long realSizeBytes; // 实际容量具体数值，单位byte
    private Boolean autoExpand; // 自动扩展
    private Integer warningSizePercent; // 告警容量占虚拟容量的百分比，乘以100以后的数字
    private Long warningSizeBytes; // 告警容量具体数值，单位byte
    private Integer grainSize; // 自动精简配置的颗粒度，可取值：32 64 128 256
    private Integer copyCount; // 拷贝数量，取值1或2
    private String copyPoolId; // 拷贝池id
    private String copyPoolUuid; // 拷贝池uuid
    private String copyPoolKeyPath; // 拷贝池path
    private String copyPoolName; // 拷贝池名称
    private Integer copySyncRate; // 拷贝同步速率
    private Boolean compressed; // 是否是压缩卷
    private Boolean thinlyProvisioned; // 是否是精简卷
    private String keyPath; // smis用来传参
    private List<VolumeMirrorModel> mirrors; // 数据拷贝
    private List<StorageMdiskModel> mdisks; // 使用的磁盘阵列
    private String createOption;
    private List<StorageGroupModel> volumeGroups; // 所属卷组
    private List<String> volumeNames; // 批量创建存储卷时的名称列表
    private String operationalStatus; // 运行状态
    private String volumeType;// 云硬盘类型
    private String device;
    private String tenantUuid;// OpenStack租户id
    private String osTenantName;// openstack底层租户名称
    private String actionStatus; // xsky活动状态
    private Double allocatedSize; // xsky块存储卷的已使用容量
    private Long blockSnapshotNum; // xsky块存储卷的快照数量
    private Long clientGroupNum; // xsky块存储卷挂载的客户端组数量
    private String snapshotUuid; // xsky块存储卷的关联快照uuid
    private Boolean qosEnabled; // xsky创建卷是否设置业务 QoS
    private Long performancePriority; // xsky创建卷性能优先级设置
    private Long blockVolumeId; // xsky端块存储卷的id
    private Long migrationStripes; // xsky卷迁移速率级别
    private Boolean flattened; // ?????
    private Long format; // ?????
    private Boolean hidden; // ?????
    private Boolean passive; // ????
    private Date updateTime; // 卷的更新时间
    private Date latestSnapshotTime; // 最近快照时间
    private String blockVolumeGroupUuid; // 所属一致性组uuid
    private String accessPathUuid; // 关联访问路径uuid
    private String snapshotName;
    private String accessPathName;
    private String blockVolumeGroupName;
    private List<SnapshotModel> snapshots;
    private String newName;
    private String copyDestPoolName; // 执行卷拷贝的时目标卷的所属池名称
    private String copyDestVolumeName; // 执行卷拷贝的时候目标卷名称
    private Integer iops;// 磁盘每秒读写次数
    private String backupSize; // 副本大小
    private String backupCount; // 副本数量
    private String backupUuid; // 备份ID
    private String dataDiskCategory;
    private String dataDiskSize;
    private String enterpriseProjectUuid;
    // xsky
    private List<VolumeSamplesModel> volumeSamplesModel;
    private VolumeQosSpecModel volumeQosSpecModel;// 创建卷开启业务 QoS的设置
    private String storeVal;
    private String resourceGroupUuid;
    private Boolean encrypted;// 是否加密
    private String performanceLevel;
    private String projectId;

    private List<TagModel> tagModels;
    //azure
    private String diskEncryptionUuid;
    private String resourceGroupName;
    private String tags;

    private String resourceLabel; //标签
    // SMARTX
    private List<String> serverUuids;
    private Long key;
    private Long diffKey;
    private String templateUuid;

    //fc新增字段
    private String uri;  // 站点uri
    private String dataStoreUuid;// 数据存储标示
    private Boolean  persistentDisk;//是否持久化磁盘。
    private Boolean indepDisk;//是否为独立磁盘
    private String vdcUri;
    private String pciType;//磁盘挂载的总线类型，当前版本为：“IDE”，“SCSI”和“VIRTIO”
    private Integer sequenceNum;//磁盘对应的总线槽位编号。
    private String ioMode;//磁盘IO模式，
    private Integer accessMode;//磁盘访问权限，可选，取值范围为0 ,  1。默认值为0。
    private Long vdcId;
    private Long dataStoreId;// 数据存储
    //fc新增字段

    private String policyName;

    public VolumeModel() {
        super();
    }

    public VolumeModel(String volumeUuid, String name, String category, String remark, String status, Date createTime,
                       int size, String requestId) {
        super();
        this.volumeUuid = volumeUuid;
        this.name = name;
        this.category = category;
        this.remark = remark;
        this.status = status;
        this.createTime = createTime;
        this.size = size;
        this.requestId = requestId;
    }

}
