package models

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

type ListVFPoolModel struct {
	// optional fields
	ByID          types.Int64    `tfsdk:"by_id"`
	GID           types.Int64    `tfsdk:"gid"`
	Name          types.String   `tfsdk:"name"`
	Description   types.String   `tfsdk:"description"`
	Status        types.String   `tfsdk:"status"`
	AccountAccess types.Int64    `tfsdk:"account_access"`
	RgAccess      types.Int64    `tfsdk:"rg_access"`
	SortBy        types.String   `tfsdk:"sort_by"`
	Page          types.Int64    `tfsdk:"page"`
	Size          types.Int64    `tfsdk:"size"`
	Timeouts      timeouts.Value `tfsdk:"timeouts"`

	// compute fields
	Items      []ItemVFPoolListModel `tfsdk:"items"`
	EntryCount types.Int64           `tfsdk:"entry_count"`
}

type ItemVFPoolListModel struct {
	VFPoolID      types.Int64    `tfsdk:"vfpool_id"`
	AccountAccess types.List     `tfsdk:"account_access"`
	CreatedTime   types.Int64    `tfsdk:"created_time"`
	Description   types.String   `tfsdk:"description"`
	GID           types.Int64    `tfsdk:"gid"`
	GUID          types.Int64    `tfsdk:"guid"`
	Name          types.String   `tfsdk:"name"`
	RGAccess      types.List     `tfsdk:"rg_access"`
	Status        types.String   `tfsdk:"status"`
	UpdatedTime   types.Int64    `tfsdk:"updated_time"`
	VFS           []VFSListModel `tfsdk:"vfs"`
}

type VFSListModel struct {
	NodeID types.Int64       `tfsdk:"node_id"`
	VFList []VFItemListModel `tfsdk:"vf_list"`
}

type VFItemListModel struct {
	NicName types.String           `tfsdk:"nic_name"`
	VFSInfo []VFSInfoItemListModel `tfsdk:"vfs_info"`
}

type VFSInfoItemListModel struct {
	ID      types.Int64 `tfsdk:"id"`
	Claimed types.Bool  `tfsdk:"claimed"`
	VMID    types.Int64 `tfsdk:"vm_id"`
}
