package models

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

type DataSourceAccountListDeletedModel struct {
	// optional fields
	ByID     types.Int64    `tfsdk:"by_id"`
	Name     types.String   `tfsdk:"name"`
	ACL      types.String   `tfsdk:"acl"`
	Page     types.Int64    `tfsdk:"page"`
	Size     types.Int64    `tfsdk:"size"`
	Timeouts timeouts.Value `tfsdk:"timeouts"`
	SortBy   types.String   `tfsdk:"sort_by"`

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

type ItemAccountListDeletedModel struct {
	DCLocation             types.String        `tfsdk:"dc_location"`
	Ckey                   types.String        `tfsdk:"ckey"`
	Meta                   types.List          `tfsdk:"meta"`
	ACL                    []RecordACLModel    `tfsdk:"acl"`
	ComputeFeatures        types.List          `tfsdk:"compute_features"`
	Company                types.String        `tfsdk:"company"`
	Companyurl             types.String        `tfsdk:"companyurl"`
	CpuAllocationParameter types.String        `tfsdk:"cpu_allocation_parameter"`
	CpuAllocationRatio     types.Float64       `tfsdk:"cpu_allocation_ratio"`
	CreatedTime            types.Int64         `tfsdk:"created_time"`
	CreatedBy              types.String        `tfsdk:"created_by"`
	DeletedTime            types.Int64         `tfsdk:"deleted_time"`
	DeletedBy              types.String        `tfsdk:"deleted_by"`
	AccountID              types.Int64         `tfsdk:"account_id"`
	GUID                   types.Int64         `tfsdk:"guid"`
	AccountName            types.String        `tfsdk:"account_name"`
	Status                 types.String        `tfsdk:"status"`
	UpdatedTime            types.Int64         `tfsdk:"updated_time"`
	ResourceLimits         *AccountLimitsModel `tfsdk:"resource_limits"`
	ResourceTypes          types.List          `tfsdk:"resource_types"`
	SendAccessEmails       types.Bool          `tfsdk:"send_access_emails"`
	UniqPools              types.List          `tfsdk:"uniq_pools"`
	Version                types.Int64         `tfsdk:"version"`
	Vins                   types.List          `tfsdk:"vins"`
}

type RecordACLModel struct {
	Explicit    types.Bool   `tfsdk:"explicit"`
	GUID        types.String `tfsdk:"guid"`
	Right       types.String `tfsdk:"right"`
	Status      types.String `tfsdk:"status"`
	Type        types.String `tfsdk:"type"`
	UserGroupID types.String `tfsdk:"user_group_id"`
}

type AccountLimitsModel 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"`
}
