package models

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

type DataSourceLB struct {
	// required fields
	Timeouts timeouts.Value `tfsdk:"timeouts"`
	LBID     types.Int64    `tfsdk:"lb_id"`

	// response fields
	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"`
	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"`
	ID            types.Int64  `tfsdk:"id"`
	ImageID       types.Int64  `tfsdk:"image_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"`
}

type ItemBindingModel struct {
	Address types.String `tfsdk:"address"`
	GUID    types.String `tfsdk:"guid"`
	Name    types.String `tfsdk:"name"`
	Port    types.Int64  `tfsdk:"port"`
}

type RecordNodeModel struct {
	BackendIP  types.String `tfsdk:"backend_ip"`
	ComputeID  types.Int64  `tfsdk:"compute_id"`
	FrontendIP types.String `tfsdk:"frontend_ip"`
	GUID       types.String `tfsdk:"guid"`
	MGMTIP     types.String `tfsdk:"mgmt_ip"`
	NetworkID  types.Int64  `tfsdk:"network_id"`
}

type RecordServerSettingsModel struct {
	Inter     types.Int64  `tfsdk:"inter"`
	GUID      types.String `tfsdk:"guid"`
	DownInter types.Int64  `tfsdk:"downinter"`
	Rise      types.Int64  `tfsdk:"rise"`
	Fall      types.Int64  `tfsdk:"fall"`
	SlowStart types.Int64  `tfsdk:"slowstart"`
	MaxConn   types.Int64  `tfsdk:"maxconn"`
	MaxQueue  types.Int64  `tfsdk:"maxqueue"`
	Weight    types.Int64  `tfsdk:"weight"`
}
