package schemas

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

func MakeSchemaDataSourceAuditList() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		"timestamp_at": schema.Int64Attribute{
			Optional: true,
		},
		"timestamp_to": schema.Int64Attribute{
			Optional: true,
		},
		"user": schema.StringAttribute{
			Optional: true,
		},
		"call": schema.StringAttribute{
			Optional: true,
		},
		"min_status_code": schema.Int64Attribute{
			Optional: true,
		},
		"max_status_code": schema.Int64Attribute{
			Optional: true,
		},
		"sort_by": schema.StringAttribute{
			Optional: true,
		},
		"page": schema.Int64Attribute{
			Optional: true,
		},
		"size": schema.Int64Attribute{
			Optional: true,
		},
		"items": schema.ListNestedAttribute{
			Computed: true,
			NestedObject: schema.NestedAttributeObject{
				Attributes: map[string]schema.Attribute{
					"call": schema.StringAttribute{
						Computed: true,
					},
					"guid": schema.StringAttribute{
						Computed: true,
					},
					"responsetime": schema.Float64Attribute{
						Computed: true,
					},
					"status_code": schema.Int64Attribute{
						Computed: true,
					},
					"timestamp": schema.Float64Attribute{
						Computed: true,
					},
					"user": schema.StringAttribute{
						Computed: true,
					},
				},
			},
		},
		"entry_count": schema.Int64Attribute{
			Computed: true,
		},
	}
}
