package models

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

type RecordGroupModel struct {
	//required and optional fields
	ServiceID types.Int64    `tfsdk:"service_id"`
	ID        types.Int64    `tfsdk:"compgroup_id"`
	Timeouts  timeouts.Value `tfsdk:"timeouts"`

	//compute fields
	AccountID    types.Int64             `tfsdk:"account_id"`
	AccountName  types.String            `tfsdk:"account_name"`
	Computes     []ItemGroupComputeModel `tfsdk:"computes"`
	Consistency  types.Bool              `tfsdk:"consistency"`
	CPU          types.Int64             `tfsdk:"cpu"`
	CreatedBy    types.String            `tfsdk:"created_by"`
	CreatedTime  types.Int64             `tfsdk:"created_time"`
	DeletedBy    types.String            `tfsdk:"deleted_by"`
	DeletedTime  types.Int64             `tfsdk:"deleted_time"`
	Disk         types.Int64             `tfsdk:"disk"`
	Driver       types.String            `tfsdk:"driver"`
	ExtNets      types.List              `tfsdk:"extnets"`
	GID          types.Int64             `tfsdk:"gid"`
	GUID         types.Int64             `tfsdk:"guid"`
	ImageID      types.Int64             `tfsdk:"image_id"`
	Milestones   types.Int64             `tfsdk:"milestones"`
	Name         types.String            `tfsdk:"compgroup_name"`
	Parents      types.List              `tfsdk:"parents"`
	RAM          types.Int64             `tfsdk:"ram"`
	RGID         types.Int64             `tfsdk:"rg_id"`
	RGName       types.String            `tfsdk:"rg_name"`
	Role         types.String            `tfsdk:"role"`
	SEPID        types.Int64             `tfsdk:"sep_id"`
	SeqNo        types.Int64             `tfsdk:"seq_no"`
	Status       types.String            `tfsdk:"status"`
	TechStatus   types.String            `tfsdk:"tech_status"`
	TimeoutStart types.Int64             `tfsdk:"timeout_start"`
	UpdatedBy    types.String            `tfsdk:"updated_by"`
	UpdatedTime  types.Int64             `tfsdk:"updated_time"`
	VINSes       types.List              `tfsdk:"vinses"`
}

type ItemGroupComputeModel struct {
	ID          types.Int64       `tfsdk:"id"`
	IPAddresses types.List        `tfsdk:"ip_addresses"`
	Name        types.String      `tfsdk:"name"`
	Chipset     types.String      `tfsdk:"chipset"`
	OSUsers     []ItemOSUserModel `tfsdk:"os_users"`
}

type ItemOSUserModel struct {
	Login    types.String `tfsdk:"login"`
	Password types.String `tfsdk:"password"`
}
