package models

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

type DataSourceRGListModel struct {
	// request optional fields
	ById           types.Int64    `tfsdk:"by_id"`
	Name           types.String   `tfsdk:"name"`
	AccountId      types.Int64    `tfsdk:"account_id"`
	AccountName    types.String   `tfsdk:"account_name"`
	CreatedAfter   types.Int64    `tfsdk:"created_after"`
	CreatedBefore  types.Int64    `tfsdk:"created_before"`
	Status         types.String   `tfsdk:"status"`
	LockStatus     types.String   `tfsdk:"lock_status"`
	IncludeDeleted types.Bool     `tfsdk:"includedeleted"`
	SortBy         types.String   `tfsdk:"sort_by"`
	Page           types.Int64    `tfsdk:"page"`
	Size           types.Int64    `tfsdk:"size"`
	Timeouts       timeouts.Value `tfsdk:"timeouts"`

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

type ItemsRGListModel struct {
	AccountACL             types.List           `tfsdk:"account_acl"`
	AccountID              types.Int64          `tfsdk:"account_id"`
	AccountName            types.String         `tfsdk:"account_name"`
	ComputeFeatures        types.List           `tfsdk:"compute_features"`
	CPUAllocationParameter types.String         `tfsdk:"cpu_allocation_parameter"`
	CPUAllocationRatio     types.Float64        `tfsdk:"cpu_allocation_ratio"`
	CreatedBy              types.String         `tfsdk:"created_by"`
	CreatedTime            types.Int64          `tfsdk:"created_time"`
	DefNetID               types.Int64          `tfsdk:"def_net_id"`
	DefNetType             types.String         `tfsdk:"def_net_type"`
	DeletedBy              types.String         `tfsdk:"deleted_by"`
	DeletedTime            types.Int64          `tfsdk:"deleted_time"`
	Description            types.String         `tfsdk:"desc"`
	Dirty                  types.Bool           `tfsdk:"dirty"`
	GID                    types.Int64          `tfsdk:"gid"`
	GUID                   types.Int64          `tfsdk:"guid"`
	RGID                   types.Int64          `tfsdk:"rg_id"`
	LockStatus             types.String         `tfsdk:"lock_status"`
	Milestones             types.Int64          `tfsdk:"milestones"`
	Name                   types.String         `tfsdk:"name"`
	ResourceLimits         *ResourceLimitsModel `tfsdk:"resource_limits"`
	ResTypes               types.List           `tfsdk:"resource_types"`
	Secret                 types.String         `tfsdk:"secret"`
	Status                 types.String         `tfsdk:"status"`
	UniqPools              types.List           `tfsdk:"uniq_pools"`
	UpdatedBy              types.String         `tfsdk:"updated_by"`
	UpdatedTime            types.Int64          `tfsdk:"updated_time"`
	VINS                   types.List           `tfsdk:"vins"`
	VMS                    types.List           `tfsdk:"vms"`
}

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