package com.bocloud.ims.entity.resource;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.Generic;
import com.bocloud.entity.meta.PKStrategy;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * 云平台统计
 *
 * @author wangyu
 * @version 4.2.1-SNAPSHOT
 * @since 2019/11/4
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Table("cloud_vendor_statistics")
public class CloudVendorStatistics extends Generic {

	@PK(PKStrategy.AUTO)
	private Long id;
	@Column("vendor_id")
	private Long vendorId;
	@Column("instance")
	private Long instance; // 实例数量
	@Column("online")
	private Long online; // 在线
	@Column("offline")
	private Long offline; // 离线
	@Column("host_count")
	private Long hostCount;// 主机数量
	@Column("data_store_count")
	private Long dataStoreCount;// 数据存储数量
	@Column("template_count")
	private Long templateCount;// 模板数量
	@Column("cluster_count")
	private Long clusterCount;// 集群数量
	@Column("image_count")
	private Long imageCount;// 镜像数量
	@Column("cpu_count")
	private Long cpuCount;// cpu核数
	@Column("mon_count")
	private Long monCount;// 控制节点数量
	@Column("osd_count")
	private Long osdCount; // osd节点数量
	@Column("mds_count")
	private Long mdsCount;// mds节点数量
	@Column("cpu_total")
	private Long cpuTotal; // cpu总赫兹
	@Column("cpu_used")
	private Long cpuUsed;
	@Column("cpu_unused")
	private Long cpuUnused;
	@Column("mem_total")
	private BigDecimal memTotal;// 总内存
	@Column("mem_used")
	private BigDecimal memUsed;
	@Column("mem_unused")
	private BigDecimal memUnused;
	@Column("disk_total")
	private BigDecimal diskTotal;
	@Column("disk_used")
	private BigDecimal diskUsed;
	@Column("disk_unused")
	private BigDecimal diskUnused;
	@Column("tenant_count")
	private Long tenantCount;// 租户数量
	@Column("network_count")
	private Long networkCount;// 网络数量
	@Column("vs_count")
	private Long vsCount;// virtual server数量
	@Column("pool_count")
	private Long poolCount;// pool数量
	@Column("node_count")
	private Long nodeCount;// node数量
	@Column("profile_count")
	private Long profileCount;// profile数量
	@Column("monitor_count")
	private Long monitorCount;// monitor数量
	@Column("vpc_count")
	private Long vpcCount; // vpc数量
	@Column("lpar_count")
	private Long lparCount;// 逻辑分区数量
	@Column("vios_count")
	private Long viosCount; // 虚拟IO服务器数量
	@Column("mdisk_count")
	private Long mdiskCount; // mdisk数量
	@Column("flash_copy_count")
	private Long flashCopyCount;// FlashCopy数量
	@Column("fabric_count")
	private Long fabricCount;// 光纤交换机数量
	@Column("zone_count")
	private Long zoneCount; // zone的数量
	@Column("ns_count")
	private Long nsCount; // k8s namespace count
	@Column("pod_count")
	private Long podCount;
	@Column("service_count")
	private Long serviceCount;
	@Column("deployment_count")
	private Long deploymentCount;
	@Column("alias_count")
	private Long aliasCount; // 别名的数量
	@Column("access_path_count")
	private Long accessPathCount;
	@Column("edge_cluster_count")
	private Long edgeClusterCount;// edge集群
	@Column("group_count")
	private Long groupCount;// NS组
	@Column("transport_zone_count")
	private Long transportZoneCount;// 传输区域
	@Column("firewall_count")
	private Long firewallCount;// 防火墙
	@Column("router_count")
	private Long routerCount;// 路由器
	@Column("switch_count")
	private Long switchCount;// 交换机

	@Column("object_user_count")
	private Long objectUserCount;// xsky对象用户
	@Column("object_bucket_count")
	private Long objectBucketCount;// xsky存储桶
	@Column("object_router_count")
	private Long objectRouterCount;// xsky对象路由

	@Column("file_user_count")
	private Long fileUserCount; // xsky 文件用户
	@Column("file_client_count")
	private Long fileClientCount; // xsky 文件客户端
	@Column("snapshot_count")
	private Long snapshotCount; // 快照
	@Column("file_system_count")
	private Long fileSystemCount; // 文件系统数量
	@Column("logic_port_count")
	private Long logicPortCount; // agile 逻辑端口
	@Column("vas_count")
	private Long vasCount; // agile 逻辑vas
	/********** vmware horizon桌面池统计 **************/
	@Column("desktop_pools")
	private Long desktopPools;
	@Column("farms")
	private Long farms;
	@Column("sessions")
	private Long sessions;
	@Column("users")
	private Long users;
	@Column("vcenters")
	private Long vcenters;
    @Column("db_count")
    private Long dbCount;
    @Column("app_count")
    private Long appCount;
    @Column("session_count")
    private Long sessionCount;

	/**
	 * @param vendorId
	 * @param instance
	 * @param online
	 * @param offline
	 * @param hostCount
	 * @param dataStoreCount
	 * @param templateCount
	 * @param clusterCount
	 * @param imageCount
	 * @param cpuCount
	 * @param monCount
	 * @param osdCount
	 * @param mdsCount
	 * @param cpuTotal
	 * @param cpuUsed
	 * @param cpuUnused
	 * @param memTotal
	 * @param memUsed
	 * @param memUnused
	 * @param diskTotal
	 * @param diskUsed
	 * @param diskUnused
	 * @param tenantCount
	 * @param networkCount
	 * @param vsCount
	 * @param poolCount
	 * @param nodeCount
	 * @param profileCount
	 * @param monitorCount
	 * @param vpcCount
	 * @param lparCount
	 * @param viosCount
	 * @param mdiskCount
	 * @param flashCopyCount
	 * @param fabricCount
	 * @param zoneCount
	 * @param nsCount
	 * @param podCount
	 * @param serviceCount
	 * @param deploymentCount
	 * @param aliasCount
	 */
	public CloudVendorStatistics(Long vendorId, Long instance, Long online, Long offline, Long hostCount,
			Long dataStoreCount, Long templateCount, Long clusterCount, Long imageCount, Long cpuCount, Long monCount,
			Long osdCount, Long mdsCount, Long cpuTotal, Long cpuUsed, Long cpuUnused, BigDecimal memTotal,
			BigDecimal memUsed, BigDecimal memUnused, BigDecimal diskTotal, BigDecimal diskUsed, BigDecimal diskUnused,
			Long tenantCount, Long networkCount, Long vsCount, Long poolCount, Long nodeCount, Long profileCount,
			Long monitorCount, Long vpcCount, Long lparCount, Long viosCount, Long mdiskCount, Long flashCopyCount,
			Long fabricCount, Long zoneCount, Long nsCount, Long podCount, Long serviceCount, Long deploymentCount,
			Long aliasCount) {
		this.vendorId = vendorId;
		this.instance = instance;
		this.online = online;
		this.offline = offline;
		this.hostCount = hostCount;
		this.dataStoreCount = dataStoreCount;
		this.templateCount = templateCount;
		this.clusterCount = clusterCount;
		this.imageCount = imageCount;
		this.cpuCount = cpuCount;
		this.monCount = monCount;
		this.osdCount = osdCount;
		this.mdsCount = mdsCount;
		this.cpuTotal = cpuTotal;
		this.cpuUsed = cpuUsed;
		this.cpuUnused = cpuUnused;
		this.memTotal = memTotal;
		this.memUsed = memUsed;
		this.memUnused = memUnused;
		this.diskTotal = diskTotal;
		this.diskUsed = diskUsed;
		this.diskUnused = diskUnused;
		this.tenantCount = tenantCount;
		this.networkCount = networkCount;
		this.vsCount = vsCount;
		this.poolCount = poolCount;
		this.nodeCount = nodeCount;
		this.profileCount = profileCount;
		this.monitorCount = monitorCount;
		this.vpcCount = vpcCount;
		this.lparCount = lparCount;
		this.viosCount = viosCount;
		this.mdiskCount = mdiskCount;
		this.flashCopyCount = flashCopyCount;
		this.fabricCount = fabricCount;
		this.zoneCount = zoneCount;
		this.nsCount = nsCount;
		this.podCount = podCount;
		this.serviceCount = serviceCount;
		this.deploymentCount = deploymentCount;
		this.aliasCount = aliasCount;
	}
}
