package models

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

type AccountGetResourceConsumptionModel struct {
	// request fields
	AccountID types.Int64    `tfsdk:"account_id"`
	Timeouts  timeouts.Value `tfsdk:"timeouts"`

	// response fields
	Consumed *ResourceConsumptionModel       `tfsdk:"consumed"`
	Reserved *ResourceConsumptionModel       `tfsdk:"reserved"`
	Limits   *ResourceConsumptionLimitsModel `tfsdk:"resource_limits"`
}

type ResourceConsumptionModel struct {
	CPU         types.Int64                   `tfsdk:"cpu"`
	DiskSize    types.Float64                 `tfsdk:"disksize"`
	DiskSizeMax types.Float64                 `tfsdk:"disksizemax"`
	ExtIPs      types.Int64                   `tfsdk:"extips"`
	ExtTraffic  types.Int64                   `tfsdk:"exttraffic"`
	GPU         types.Int64                   `tfsdk:"gpu"`
	RAM         types.Int64                   `tfsdk:"ram"`
	SEPs        []ResourceConsumptionSepModel `tfsdk:"seps"`
}

type ResourceConsumptionSepModel struct {
	SepID       types.String  `tfsdk:"sep_id"`
	PoolName    types.String  `tfsdk:"data_name"`
	DiskSize    types.Float64 `tfsdk:"disk_size"`
	DiskSizeMax types.Float64 `tfsdk:"disk_size_max"`
}

type ResourceConsumptionLimitsModel struct {
	CUC      types.Float64 `tfsdk:"cu_c"`
	CUD      types.Float64 `tfsdk:"cu_d"`
	CUI      types.Float64 `tfsdk:"cu_i"`
	CUM      types.Float64 `tfsdk:"cu_m"`
	CUDM     types.Float64 `tfsdk:"cu_dm"`
	CUNP     types.Float64 `tfsdk:"cu_np"`
	GPUUnits types.Float64 `tfsdk:"gpu_units"`
}
