package models

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

type RecordBasicServiceModel struct {
	ServiceId     types.Int64         `tfsdk:"service_id"`
	AccountID     types.Int64         `tfsdk:"account_id"`
	Timeouts      timeouts.Value      `tfsdk:"timeouts"`
	AccountName   types.String        `tfsdk:"account_name"`
	BaseDomain    types.String        `tfsdk:"base_domain"`
	Computes      []ItemComputeModel  `tfsdk:"computes"`
	CPUTotal      types.Int64         `tfsdk:"cpu_total"`
	CreatedBy     types.String        `tfsdk:"created_by"`
	CreatedTime   types.Int64         `tfsdk:"created_time"`
	DeletedBy     types.String        `tfsdk:"deleted_by"`
	DeletedTime   types.Int64         `tfsdk:"deleted_time"`
	DiskTotal     types.Int64         `tfsdk:"disk_total"`
	GID           types.Int64         `tfsdk:"gid"`
	Groups        []ItemGroupModel    `tfsdk:"groups"`
	GUID          types.Int64         `tfsdk:"guid"`
	Milestones    types.Int64         `tfsdk:"milestones"`
	Name          types.String        `tfsdk:"service_name"`
	ParentSrvID   types.Int64         `tfsdk:"parent_srv_id"`
	ParentSrvType types.String        `tfsdk:"parent_srv_type"`
	RAMTotal      types.Int64         `tfsdk:"ram_total"`
	RGID          types.Int64         `tfsdk:"rg_id"`
	RGName        types.String        `tfsdk:"rg_name"`
	Snapshots     []ItemSnapshotModel `tfsdk:"snapshots"`
	SSHKey        types.String        `tfsdk:"ssh_key"`
	SSHUser       types.String        `tfsdk:"ssh_user"`
	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"`
}

type ItemComputeModel struct {
	AccountID     types.Int64  `tfsdk:"account_id"`
	Architecture  types.String `tfsdk:"architecture"`
	CompGroupID   types.Int64  `tfsdk:"compgroup_id"`
	CompGroupName types.String `tfsdk:"compgroup_name"`
	CompGroupRole types.String `tfsdk:"compgroup_role"`
	ID            types.Int64  `tfsdk:"id"`
	Name          types.String `tfsdk:"name"`
	RGID          types.Int64  `tfsdk:"rg_id"`
	StackID       types.Int64  `tfsdk:"stack_id"`
	Status        types.String `tfsdk:"status"`
	TechStatus    types.String `tfsdk:"tech_status"`
}

type ItemGroupModel struct {
	Computes    types.Int64  `tfsdk:"computes"`
	Consistency types.Bool   `tfsdk:"consistency"`
	ID          types.Int64  `tfsdk:"id"`
	Name        types.String `tfsdk:"name"`
	Status      types.String `tfsdk:"status"`
	TechStatus  types.String `tfsdk:"tech_status"`
}

type ItemSnapshotModel struct {
	GUID      types.String `tfsdk:"guid"`
	Label     types.String `tfsdk:"label"`
	Timestamp types.Int64  `tfsdk:"timestamp"`
	Valid     types.Bool   `tfsdk:"valid"`
}
