package models

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

type DataSourceExtNetComputesListModel struct {
	// required fields
	AccountID types.Int64 `tfsdk:"account_id"`

	// optional fields
	RGID      types.Int64    `tfsdk:"rg_id"`
	ComputeID types.Int64    `tfsdk:"compute_id"`
	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      []ItemComputeModel `tfsdk:"items"`
	EntryCount types.Int64        `tfsdk:"entry_count"`
}

type ItemComputeModel struct {
	AccountID   types.Int64              `tfsdk:"account_id"`
	AccountName types.String             `tfsdk:"account_name"`
	ExtNets     []ItemComputeExtNetModel `tfsdk:"extnets"`
	ID          types.Int64              `tfsdk:"id"`
	Name        types.String             `tfsdk:"name"`
	RGID        types.Int64              `tfsdk:"rg_id"`
	RGName      types.String             `tfsdk:"rg_name"`
}

type ItemComputeExtNetModel struct {
	NetId  types.Int64  `tfsdk:"net_id"`
	IpAddr types.String `tfsdk:"ipaddr"`
	IPCIDR types.String `tfsdk:"ipcidr"`
	Name   types.String `tfsdk:"name"`
}
