package com.bocloud.cmp.model.sangfor;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class SangforServerModel {
    // 虚拟机列表字段 start
    private Boolean acenter;
    private String alert;
    private String alert_msg;
    private Boolean urgent;
    private String backup_type;
    private String cdp_status;
    private String cfgstorage;
    private String cfgstorageshared;
    private String cpu_ratio;
    private Integer cpus;
    private Double disk_total;
    private Integer diskread;
    private Integer diskread_operations;
    private Integer diskwrite;
    private Integer diskwrite_operations;
    private String domain_id;
    private String domain_name;
    private String domain_type;
    private Integer graphics;
    private String graphics_mem_ratio;
    private Integer graphics_mem_total;
    private Integer graphics_mem_used;
    private String graphics_ratio;
    private String groupname;
    private Boolean ha;
    private String host;
    private String host_config;
    private String host_protect;
    private String hostname;
    private String hstatus;
    private String io_ratio;
    private List iolog_size;
    private String label;
    private String lifespan;
    private Integer logo;
    private String mem_ratio;
    private Long mem_total;
    private Long mem_used;
    private Double mhz;
    private String name;
    private Integer netin;
    private Integer netin_packet;
    private Integer netout;
    private Integer netout_packet;
    private List nets;
    private String node;
    private Boolean os_installed;
    private String osname;
    private String ostype;
    private Integer pid;
    private String policy;
    private Boolean running;
    private Boolean schedopt;
    private Integer shutdown_duration;
    private String status;
    private Integer storage_used;
    private String storagename;
    private String vmgroup;
    private String vmid;
    private Boolean vmpexp;
    private String vmtype;
    private String vnetdev;
    private String volume_id;
    private Integer vtool_installed;
    private String managerIp;
    private String privateIps;
    private BigDecimal memoryTotal;// （GB）
    // 虚拟机列表字段 end

    // 虚拟机详情信息
    private String detail;
    private List<SangforServerLogModel> logModels;
    private List<SangforSnapshotModel> snapshotModels;
    private List<SangforNetWorkConfig> netWorkConfigs;
    private String diskStorageUuid;

    /**
     * 创建虚拟机参数
     */
    private Boolean isCluster;
    private Integer memory;// （MB）
    private Boolean abnormal_recovery;
    private Boolean autostart;
    private Boolean balloon_memory;
    private String boot;
    private String bootdisk;
    private Integer cores;
    private String cpu;
    private String dir;
    private Boolean disable_ple;
    private Boolean file_filter;
    private String graphic_type;
    private Boolean ha_enable;
    private String always_try_host;
    private String high_performance_disks;
    private Integer hotplug;    // 0 为所有设备均不启用热拔 插，1 为允许虚拟机 cpu 热 拔插，2 为允许虚拟机热拔 插内存，3 为全部允许（有系 统限制，默认关闭）
    private Boolean hugepage;
    private String ide0;    // 磁盘1
    private String ide2;    // 磁盘相关
    private String net0;    // 网卡1
    private String ip_net0; // 网卡1 ipv4相关配置
    private String ip6_net0;// 网卡1 ipv6相关配置
    private Boolean if_numa_on;
    private String mousetype;
    private Boolean no_kvm_clock;
    private Boolean numa;
    private Boolean onboot;
    private Integer sockets;
    private Integer splash_time;
    private Boolean uefi_bios;
    private Boolean use_uuid;
    private String use_vblk;    // yes | not
    private String set_net;    // 是否为新虚拟机指定了ip信息
    private Boolean encrypted;

    //SCP6.8云主机列表详情信息
    @JSONField(name = "id")
    private String vmIdV68;      //云主机id
    private String instanceId;
    private String type;        //云主机所在私有云平台类型
    private String host_id;     //物理主机id，虚拟机的运行位置
    private String host_name;     //物理主机名称
    private String image_id;        //镜像id
    private String image_name;        //镜像名称
    private String az_id;       //资源池id
    private String az_name;       //资源池名称
    private String pool_tag;       //资源池用途标签
    private String os_type;     //操作系统类型
    private String os_name;     //操作系统名称
    private List<String> ips;       //云主机IP信息
    private String dh_id;       //集群内调度域(专属服务器组)ID
    private String dh_tag;       //专属服务器组用途标签
    private String dh_name;       //集群内调度域名称
    private String description;     //云主机描述 len<100
    private Integer count;       //云主机数量
    private Integer snap;       //是否有快照
    private Integer backup;       //是否有备份
    private Integer derived;       //是否是派生云主机
    private List<String> uuids;
    private String storage_tag_id;     //存储标签id
    private String storage_tag_name;     //存储标签名称
    private String storage_id;      //云主机系统盘所在存储id
    private String storage_name;    //云主机系统盘所在存储名称
    private String group_name;      //云主机分组名称
    private JSONObject cpu_status;  //cpu状态信息
    private JSONObject memory_status;       //内存状态信息
    private JSONObject storage_status;      //存储状态信息
    private JSONObject io_status;      //IO状态信息
    private JSONObject network_status;      //网络状态信息
    private JSONArray tags;     //虚拟机标签信息
    private JSONObject alarm;       //虚拟机告警信息
    private JSONObject warning;       //告警概述信息
    private Integer in_projection;  //是否加入容灾计划（1：已加入容灾计划， 0：未加入）
    private String projection_id;   //容灾计划ID
    private String projection_name;   //容灾计划名称
    private String projection_type;   //容灾计划类型
    private Integer projection_enable;   //云主机备份文件个数
    private Integer backup_file_count;   //云主机备份文件个数
    private String vm_type;   //云主机类型
    private String group_id;    //云主机分组ID
    private JSONArray iolog;    //IOlog信息
    private String power_state;     //电源状态
    private Integer is_stopped;     //虚拟机状态：1已关机，0其他
    private JSONArray schedule_policies;    //虚拟机调度策略信息
    private Integer instant_vm;     //云主机是否正在快速恢复
    private Integer storage_mb;     //磁盘总大小
    private String expire_time;     //到期时间
    private String network_type;     //虚拟机网络类型
    private String cipher;     //加密算法
    private String template_id;     //模板ID
    private String storage_policy_id;     //存储策略ID
    private Integer power_on;        //是否创建完之后开机，不传则云主机创建完成后默认处于关机状态
    private String password;        //云主机密码 Len < 1024，此参数在镜像类型为ISO时不生效，密码需要先加密再传入，加密方法见 密码（Token）认证
    private Integer hostname_index;     //云主机hostname后缀起始值，最大9999
    private String project_id;
    private String project_name;
    private String user_id;     //云主机所属租户子账户ID
    private String memory_mb;     //内存大小(MB)
    private String user_name;       //云主机所属租户子账户名称
    private List<SangforDiskModel> disks;
    private List<SangforNetwork> networks;
    private Object location;      //云主机运行位置是否固定不变 [0, 1]
    private List<SangforCdroms> cdroms;
    private List<SangforUSB> usbs;
    private SangforAdvanceParam advance_param;
    private SangforFloatingIp floatingip;
    private SangforEncryption encryption;
    private JSONObject gpu;
    private JSONObject keypair;
    private String storage_location;    //存储位置
    private String machine_type;    //主板类型
    private String arch_type;    //集群架构类型
    private List<JSONObject> hard_delete_disks;     //彻底删除的磁盘列表
    private List<JSONObject> data_erase_disks;      //进行数据擦除的磁盘列表

    /**
     * 克隆虚拟机 参数
     */
    // 新建虚拟机名字
    private String cloneName;
    // 存储
    private String storage;
    // 存储策略
    private String storagePolicy;
    //  目标节点
    private String targetNode;
    // 可以指定新克隆出来的虚拟机的vmid。需要确保新虚拟机的vmid不会重复，批量克隆时不要传递该参数
    private String idnew;
    // 是否跳过虚拟机锁检查
    private Boolean skiplock;
    // 从快照克隆时指定的快照id
    private String snapid;
    //  新虚拟机所在的分组id
    private String group;
    // 克隆完成后，自动启动克隆出来的虚拟机
    private Boolean start;
    // 标记该请求是由其他主机代理过来的
    private Boolean vmProxy;
    // 虚拟机备注信息
    private String remark;
    // 是否同时克隆共享磁盘配置
    private Boolean cloneShareDisk;
    // 克隆数量
    private Integer cloneAmount;
    private String cloneDiskBlacklist;
    // 是否为新虚拟机连接网络
    private Boolean disconnectNet;
    // 指定故障域。延伸集群使用
    private String runarea;

    // 克隆方式
    private String cloneType;
    private String interfaceType;
    private String interfaceId;
    private String mac;
    private String ip;
    private String mask;
    private String gateway;
    private String primaryDns;
    private String secondaryDns;
    private Boolean disableNet;
    private String alwaysTryHost;
    private String sourceVmId;
    private String bvsId;


    // 虚拟机创建 磁盘、网络、光驱相关数据
    private String preallocate; // 分配方式。动态分配：metadata 精简分配:off 预分配：full
    private String networkcardType;   // 网卡类型
    private String bridge;  // 物理设备id
    private String bridgename;  // 物理设备名称
    private String dns1;    // dns1
    private String dns2;    // dns2

    private String ipv6;    // ipv6
    private String ipv6Gateway; // ipv6 网关
    private String ipv6Dns1;    // ipv6 dns1
    private String ipv6Dns2;    // ipv6 dns2
    private String prefixlen;// 前缀长度

    private String iso;// 选择的光驱(镜像)
    private String portUuid; // 设备的端口组id

    /**
     * 额外属性
     */
    private JSONObject extraPropJson;


}
