package models

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

type DataSourceLBList struct {

	// optional fields
	ByID           types.Int64    `tfsdk:"by_id"`
	Name           types.String   `tfsdk:"name"`
	AccountID      types.Int64    `tfsdk:"account_id"`
	RgID           types.Int64    `tfsdk:"rg_id"`
	TechStatus     types.String   `tfsdk:"tech_status"`
	Status         types.String   `tfsdk:"status"`
	FrontIP        types.String   `tfsdk:"front_ip"`
	BackIP         types.String   `tfsdk:"back_ip"`
	IncludeDeleted types.Bool     `tfsdk:"include_deleted"`
	SortBy         types.String   `tfsdk:"sort_by"`
	Page           types.Int64    `tfsdk:"page"`
	Size           types.Int64    `tfsdk:"size"`
	Timeouts       timeouts.Value `tfsdk:"timeouts"`

	// response fields
	Id         types.String       `tfsdk:"id"`
	Items      []ItemsLBListModel `tfsdk:"items"`
	EntryCount types.Int64        `tfsdk:"entry_count"`
}

type ItemsLBListModel struct {
	HAMode        types.Bool   `tfsdk:"ha_mode"`
	ACL           types.String `tfsdk:"acl"`
	BackendHAIP   types.String `tfsdk:"backend_haip"`
	Backends      types.List   `tfsdk:"backends"`
	CreatedBy     types.String `tfsdk:"created_by"`
	CreatedTime   types.Int64  `tfsdk:"created_time"`
	DeletedBy     types.String `tfsdk:"deleted_by"`
	DeletedTime   types.Int64  `tfsdk:"deleted_time"`
	Description   types.String `tfsdk:"desc"`
	DPAPIUser     types.String `tfsdk:"dp_api_user"`
	DPAPIPassword types.String `tfsdk:"dp_api_password"`
	ExtNetID      types.Int64  `tfsdk:"extnet_id"`
	FrontendHAIP  types.String `tfsdk:"frontend_haip"`
	Frontends     types.List   `tfsdk:"frontends"`
	GID           types.Int64  `tfsdk:"gid"`
	GUID          types.Int64  `tfsdk:"guid"`
	LBID          types.Int64  `tfsdk:"lb_id"`
	ManagerId     types.Int64  `tfsdk:"manager_id"`
	ManagerType   types.String `tfsdk:"manager_type"`
	Milestones    types.Int64  `tfsdk:"milestones"`
	Name          types.String `tfsdk:"name"`
	PartK8s       types.Bool   `tfsdk:"part_k8s"`
	PrimaryNode   types.Object `tfsdk:"primary_node"`
	RGName        types.String `tfsdk:"rg_name"`
	RGID          types.Int64  `tfsdk:"rg_id"`
	SecondaryNode types.Object `tfsdk:"secondary_node"`
	Status        types.String `tfsdk:"status"`
	TechStatus    types.String `tfsdk:"tech_status"`
	UpdatedBy     types.String `tfsdk:"updated_by"`
	UpdatedTime   types.Int64  `tfsdk:"updated_time"`
	UserManaged   types.Bool   `tfsdk:"user_managed"`
	VINSID        types.Int64  `tfsdk:"vins_id"`
}
