package models

import (
	"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
	"github.com/hashicorp/terraform-plugin-framework/types"
)

type ListDeletedComputesModel struct {
	// request fields
	ByID       types.Int64    `tfsdk:"by_id"`
	Name       types.String   `tfsdk:"name"`
	AccountID  types.Int64    `tfsdk:"account_id"`
	RGName     types.String   `tfsdk:"rg_name"`
	RGID       types.Int64    `tfsdk:"rg_id"`
	TechStatus types.String   `tfsdk:"tech_status"`
	IPAddress  types.String   `tfsdk:"ip_address"`
	ExtNetName types.String   `tfsdk:"extnet_name"`
	ExtNetID   types.Int64    `tfsdk:"extnet_id"`
	SortBy     types.String   `tfsdk:"sort_by"`
	Page       types.Int64    `tfsdk:"page"`
	Size       types.Int64    `tfsdk:"size"`
	IgnoreK8s  types.Bool     `tfsdk:"ignore_k8s"`
	Timeouts   timeouts.Value `tfsdk:"timeouts"`
	// response fields
	Id         types.String                  `tfsdk:"id"`
	Items      []ItemListDeletedComputeModel `tfsdk:"items"`
	EntryCount types.Int64                   `tfsdk:"entry_count"`
}

type ItemListDeletedComputeModel struct {
	ACL                    []ItemACLInListDeletedModel          `tfsdk:"acl"`
	AccountID              types.Int64                          `tfsdk:"account_id"`
	AccountName            types.String                         `tfsdk:"account_name"`
	AffinityLabel          types.String                         `tfsdk:"affinity_label"`
	AffinityRules          []ItemRuleInListDeletedModel         `tfsdk:"affinity_rules"`
	AffinityWeight         types.Int64                          `tfsdk:"affinity_weight"`
	AntiAffinityRules      []ItemRuleInListDeletedModel         `tfsdk:"anti_affinity_rules"`
	Architecture           types.String                         `tfsdk:"arch"`
	AutoStartWithNode      types.Bool                           `tfsdk:"auto_start_w_node"`
	BootOrder              types.List                           `tfsdk:"boot_order"`
	BootDiskSize           types.Int64                          `tfsdk:"bootdisk_size"`
	CdImageId              types.Int64                          `tfsdk:"cd_image_id"`
	Chipset                types.String                         `tfsdk:"chipset"`
	CloneReference         types.Int64                          `tfsdk:"clone_reference"`
	Clones                 types.List                           `tfsdk:"clones"`
	ComputeCIID            types.Int64                          `tfsdk:"computeci_id"`
	CPU                    types.Int64                          `tfsdk:"cpus"`
	CPUPin                 types.Bool                           `tfsdk:"cpu_pin"`
	CreatedBy              types.String                         `tfsdk:"created_by"`
	CreatedTime            types.Int64                          `tfsdk:"created_time"`
	CustomFields           types.String                         `tfsdk:"custom_fields"`
	DeletedBy              types.String                         `tfsdk:"deleted_by"`
	DeletedTime            types.Int64                          `tfsdk:"deleted_time"`
	Description            types.String                         `tfsdk:"desc"`
	Devices                types.String                         `tfsdk:"devices"`
	Disks                  []DiskInListDeletedModel             `tfsdk:"disks"`
	Driver                 types.String                         `tfsdk:"driver"`
	GID                    types.Int64                          `tfsdk:"gid"`
	GUID                   types.Int64                          `tfsdk:"guid"`
	HPBacked               types.Bool                           `tfsdk:"hp_backed"`
	ComputeId              types.Int64                          `tfsdk:"compute_id"`
	ImageID                types.Int64                          `tfsdk:"image_id"`
	Interfaces             []ItemVNFInterfaceInListDeletedModel `tfsdk:"interfaces"`
	LockStatus             types.String                         `tfsdk:"lock_status"`
	ManagerID              types.Int64                          `tfsdk:"manager_id"`
	ManagerType            types.String                         `tfsdk:"manager_type"`
	MigrationJob           types.Int64                          `tfsdk:"migrationjob"`
	Milestones             types.Int64                          `tfsdk:"milestones"`
	Name                   types.String                         `tfsdk:"name"`
	NeedReboot             types.Bool                           `tfsdk:"need_reboot"`
	NumaAffinity           types.String                         `tfsdk:"numa_affinity"`
	NumaNodeId             types.Int64                          `tfsdk:"numa_node_id"`
	Pinned                 types.Bool                           `tfsdk:"pinned"`
	PreferredCPU           types.List                           `tfsdk:"preferred_cpu"`
	RAM                    types.Int64                          `tfsdk:"ram"`
	ReferenceID            types.String                         `tfsdk:"reference_id"`
	Registered             types.Bool                           `tfsdk:"registered"`
	ResName                types.String                         `tfsdk:"res_name"`
	ReservedNodeCpus       types.List                           `tfsdk:"reserved_node_cpus"`
	RGID                   types.Int64                          `tfsdk:"rg_id"`
	RGName                 types.String                         `tfsdk:"rg_name"`
	SnapSets               []ItemSnapSetInListDeletedModel      `tfsdk:"snap_sets"`
	StatelessSepID         types.Int64                          `tfsdk:"stateless_sep_id"`
	StatelessSepType       types.String                         `tfsdk:"stateless_sep_type"`
	Status                 types.String                         `tfsdk:"status"`
	Tags                   types.Map                            `tfsdk:"tags"`
	TechStatus             types.String                         `tfsdk:"tech_status"`
	TotalDiskSize          types.Int64                          `tfsdk:"total_disks_size"`
	UpdatedBy              types.String                         `tfsdk:"updated_by"`
	UpdatedTime            types.Int64                          `tfsdk:"updated_time"`
	UserManaged            types.Bool                           `tfsdk:"user_managed"`
	VGPUs                  types.List                           `tfsdk:"vgpus"`
	VINSConnected          types.Int64                          `tfsdk:"vins_connected"`
	VirtualImageID         types.Int64                          `tfsdk:"virtual_image_id"`
	LoaderType             types.String                         `tfsdk:"loader_type"`
	BootType               types.String                         `tfsdk:"boot_type"`
	HotResize              types.Bool                           `tfsdk:"hot_resize"`
	NetworkInterfaceNaming types.String                         `tfsdk:"network_interface_naming"`
}

type ItemACLInListDeletedModel struct {
	Explicit    types.Bool   `tfsdk:"explicit"`
	GUID        types.String `tfsdk:"guid"`
	Right       types.String `tfsdk:"right"`
	Status      types.String `tfsdk:"status"`
	Type        types.String `tfsdk:"type"`
	UserGroupID types.String `tfsdk:"user_group_id"`
}

type ItemRuleInListDeletedModel struct {
	GUID     types.String `tfsdk:"guid"`
	Key      types.String `tfsdk:"key"`
	Mode     types.String `tfsdk:"mode"`
	Policy   types.String `tfsdk:"policy"`
	Topology types.String `tfsdk:"topology"`
	Value    types.String `tfsdk:"value"`
}

type DiskInListDeletedModel struct {
	BusNumber types.Int64 `tfsdk:"bus_number"`
	DiskId    types.Int64 `tfsdk:"disk_id"`
	PCISlot   types.Int64 `tfsdk:"pci_slot"`
}

type ItemVNFInterfaceInListDeletedModel struct {
	BusNumber       types.Int64     `tfsdk:"bus_number"`
	ConnID          types.Int64     `tfsdk:"conn_id"`
	ConnType        types.String    `tfsdk:"conn_type"`
	DefGW           types.String    `tfsdk:"def_gw"`
	Enabled         types.Bool      `tfsdk:"enabled"`
	FLIPGroupID     types.Int64     `tfsdk:"flip_group_id"`
	GUID            types.String    `tfsdk:"guid"`
	IPAddress       types.String    `tfsdk:"ip_address"`
	LibvirtSettings *LibvirtModel   `tfsdk:"libvirt_settings"`
	ListenSSH       types.Bool      `tfsdk:"listen_ssh"`
	MAC             types.String    `tfsdk:"mac"`
	Name            types.String    `tfsdk:"name"`
	NetID           types.Int64     `tfsdk:"net_id"`
	NetMask         types.Int64     `tfsdk:"netmask"`
	NetType         types.String    `tfsdk:"net_type"`
	NodeID          types.Int64     `tfsdk:"node_id"`
	PCISlot         types.Int64     `tfsdk:"pci_slot"`
	QOS             *QOSInListModel `tfsdk:"qos"`
	Target          types.String    `tfsdk:"target"`
	Type            types.String    `tfsdk:"type"`
	VNFs            types.List      `tfsdk:"vnfs"`
}

type QOSInListDeletedModel struct {
	ERate   types.Int64  `tfsdk:"e_rate"`
	GUID    types.String `tfsdk:"guid"`
	InBurst types.Int64  `tfsdk:"in_burst"`
	InRate  types.Int64  `tfsdk:"in_rate"`
}

type ItemSnapSetInListDeletedModel struct {
	Disks     types.List   `tfsdk:"disks"`
	GUID      types.String `tfsdk:"guid"`
	Label     types.String `tfsdk:"label"`
	Timestamp types.Int64  `tfsdk:"timestamp"`
}
