package models

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

type DataSourceAccountListModel struct {
	// optional fields
	ByID     types.Int64    `tfsdk:"by_id"`
	Name     types.String   `tfsdk:"name"`
	ACL      types.String   `tfsdk:"acl"`
	Status   types.String   `tfsdk:"status"`
	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      []ItemAccountListModel `tfsdk:"items"`
	EntryCount types.Int64            `tfsdk:"entry_count"`
}

type ItemAccountListModel struct {
	ACL             []RecordACLModel `tfsdk:"acl"`
	CreatedTime     types.Int64      `tfsdk:"created_time"`
	DeletedTime     types.Int64      `tfsdk:"deleted_time"`
	AccountID       types.Int64      `tfsdk:"account_id"`
	AccountName     types.String     `tfsdk:"account_name"`
	Status          types.String     `tfsdk:"status"`
	UpdatedTime     types.Int64      `tfsdk:"updated_time"`
	ComputeFeatures types.List       `tfsdk:"compute_features"`
	Desc            types.String     `tfsdk:"desc"`
}

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