package com.bocloud.cmp.vm.model;

import com.alibaba.fastjson.JSONObject;
import com.bocloud.cmp.model.NetcardOperation;
import com.bocloud.cmp.model.NetworkBean;
import com.bocloud.cmp.model.NicAdapterModel;
import com.bocloud.cmp.model.VolumeModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 虚拟机创建参数通用类
 *
 * @author wangyu
 * @version 5.0.0-SNAPSHOT
 * @since 2021/3/26
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class VmGenericParam implements Serializable {

    // 虚拟机ID
    private Long id;
    private Long serverId;
    // 唯一标识
    private String uuid;
    // 虚拟机名称
    private String name;
    // 系统类别
    private String osCategory;
    // 系统名称
    private String osName;
    // 系统版本
    private String osVersion;
    // cpu
    private Integer cpu;
    // 内存
    private BigDecimal memory;
    // 磁盘
    private Integer disk;
    // 描述
    private String remark;
    // 虚拟机密码
    private String password;
    // 云平台Id
    private Long vendorId;
    // 申请数量
    private Integer count;
    // 镜像ID
    private Long imageId;
    // 镜像uuid
    private String imageUuid;
    // 规格ID
    private Long flavorId;
    // 命名规则ID
    private Long nameRuleId;
    // 虚拟机hostname
    private String vmHostName;
    // op租户name
    private String osTenantName;
    // 管理IP
    private String managerIp;
    // 子网ID
    private Long subnetId;
    // 是否设置IPv6
    private Boolean hasIpv6;
    // 地域ID
    private String regionId;
    // 地域
    private String region;
    // 可用域ID
    private String zoneId;
    // 系统盘名称
    private String systemDiskName;
    // 是否设置EIP
    private Boolean hasEip;
    // EIP ID
    private Long eipId;
    // 数据中心Id(VC)
    private Long vdcId;
    // 宿主机ID
    private Long hostId;
    // 数据存储ID
    private Long storeId;
    // 资源池ID(VC)
    private Long resPoolId;
    // 数据存储ID(VC)
    private Long dsId;
    // 磁盘单位(VC)
    private String diskUnit;
    // 数据存储中的镜像路径(VC)
    private String isoPath;
    // 网卡(VC)
    private List<NicAdapterModel> nicAdapters;
    // 资源池所属类别(VC)
    private String poolOwner;
    //
    private String diskLocators;
    // 虚拟机标签
    private List<Long> labelIds;
    // 模板ID(VC)
    private Long templateId;
    // 模板名称(VC)
    private String templateName;
    // 业务ID
    private Long businessId;
    // 项目ID
    private Long projectId;
    // 租户ID
    private Long tenantId;
    // 创建人ID
    private Long creatorId;
    // 所属人ID
    private Long ownerId;
    // 维护人ID
    private Long menderId;
    // 资源池ID
    private Long poolGroupId;
    // 安全组uuid
    private String groupId;
    // 磁盘类型
    private String diskCategory;
    // 物理机标签
    private List<Long> labels;
    // 数据盘
    private String dataDisks;
    // 数据盘(VC)
    private List<Integer> disks;
    // 数据盘存储名称(VC)
    private List<String> dataStoreNames;
    // 是否从卷启动
    private Boolean bootFromVolume;
    // 根磁盘(OP)
    private Integer rootSize;
    // vpcId
    private Long vpcId;
    // 网卡设备(VC)
    private List<NetcardOperation> operations;
    // 阿里云安全组
    private List<String> groups;
    // IP池ID
    private Long ipPoolId;
    // 阿里云系统盘
    private Integer systemDiskSize;
    // 阿里云系统盘类型
    private String systemDiskCategory;
    // 规格UUID
    private String instanceType;
    // 子网UUID
    private String subnetUuid;
    // 数据盘集合
    private List<JSONObject> dataDisk;
    // vcenter新加磁盘
    private List<JSONObject> addDiskList;
    // vcenter新加磁盘
    private List<JSONObject> dataDiskList;
    // vcenter编辑磁盘
    private List<JSONObject> editDiskList;
    // 网络ID
    private Long networkId;
    // 是否开启删除保护
    private Boolean terminationProtected;
    // 可用区
    private String zone;
    // 密钥名称
    private String keypairName;
    // 带宽
    private Integer internetMaxBandwidthOut;
    // 密钥ID
    private String keypairId;
    private Long sourceValidId; // 卷ID
    private Long sourceSnapId; // 源快照ID
    // 是否活着
    private Boolean live;
    // 阿里云包年包月需要用到
    private Boolean autoRenew;
    private Integer autoRenewPeriod;
    private Integer period;
    private String periodUnit;

    private String instanceChargeType;
    private String vpcUuid;
    private List<JSONObject> networkInterfaces;
    private String publicIps;
    private Boolean automaticRenewal;
    private Boolean ipv6Address;
    // 操作类
    private String action;
    // openstack网络
    private List<NetworkBean> networks;

    private List<VolumeModel> diskDevices;
    // vapp名称
    private String vappName;
    // vappid
    private Long vappId;

    // azure
    private Long resourceGroupId;
    private String popularLinuxImage;
    private String popularWindowsImage;
    private String account;
    private String systemDiskCaching;
    private Boolean isUsePublicIp;
    private Long availabilitySetId;
    private Long keyPairId;
    private Long publicIpAddressId;
    private String licenseType;
    private String availabilityZoneIds;
    // azure
    private Date expiredTime;// 过期时间
    // 是否设置添加到堡垒机
    private Boolean isAddShterm;
    // 存储路径(多级英文","拼接)
    private String folderName;
    // 系统盘类型
    private String rootVolumeType;
    // 资源标签
    private String resourceLabel;

}
