package models

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

type DataSourceAuditList struct {
	//request field
	TimestampAt   types.Int64    `tfsdk:"timestamp_at"`
	TimestampTo   types.Int64    `tfsdk:"timestamp_to"`
	User          types.String   `tfsdk:"user"`
	Call          types.String   `tfsdk:"call"`
	MinStatusCode types.Int64    `tfsdk:"min_status_code"`
	MaxStatusCode types.Int64    `tfsdk:"max_status_code"`
	SortBy        types.String   `tfsdk:"sort_by"`
	Page          types.Int64    `tfsdk:"page"`
	Size          types.Int64    `tfsdk:"size"`
	Timeouts      timeouts.Value `tfsdk:"timeouts"`

	//response field
	EntryCount types.Int64 `tfsdk:"entry_count"`
	Items      []ItemAudit `tfsdk:"items"`
}

type ItemAudit struct {
	Call         types.String  `tfsdk:"call"`
	GUID         types.String  `tfsdk:"guid"`
	ResponseTime types.Float64 `tfsdk:"responsetime"`
	StatusCode   types.Int64   `tfsdk:"status_code"`
	Timestamp    types.Float64 `tfsdk:"timestamp"`
	User         types.String  `tfsdk:"user"`
}
