package schemas

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

func MakeSchemaDataSourceComputeVGPUList() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		// required attributes
		"compute_id": schema.Int64Attribute{
			Required: true,
		},
		// optional attributes
		"gpu_id": schema.Int64Attribute{
			Optional: true,
		},
		"type": schema.StringAttribute{
			Optional: true,
		},
		"status": schema.StringAttribute{
			Optional: true,
		},
		"includedeleted": schema.BoolAttribute{
			Optional: true,
		},
		"sort_by": schema.StringAttribute{
			Optional:    true,
			Description: "sort by one of supported fields, format +|-(field)",
		},
		"page": schema.Int64Attribute{
			Optional: true,
		},
		"size": schema.Int64Attribute{
			Optional: true,
		},
		// computed attributes
		"id": schema.StringAttribute{
			Computed: true,
		},
		"items": schema.ListNestedAttribute{
			Computed: true,
			NestedObject: schema.NestedAttributeObject{
				Attributes: map[string]schema.Attribute{
					"account_id": schema.Int64Attribute{
						Computed: true,
					},
					"created_time": schema.Int64Attribute{
						Computed: true,
					},
					"deleted_time": schema.Int64Attribute{
						Computed: true,
					},
					"gid": schema.Int64Attribute{
						Computed: true,
					},
					"guid": schema.Int64Attribute{
						Computed: true,
					},
					"vgpu_id": schema.Int64Attribute{
						Computed: true,
					},
					"last_claimed_by": schema.Int64Attribute{
						Computed: true,
					},
					"last_update_time": schema.Int64Attribute{
						Computed: true,
					},
					"mode": schema.StringAttribute{
						Computed: true,
					},
					"pci_slot": schema.Int64Attribute{
						Computed: true,
					},
					"pgpuid": schema.Int64Attribute{
						Computed: true,
					},
					"profile_id": schema.Int64Attribute{
						Computed: true,
					},
					"ram": schema.Int64Attribute{
						Computed: true,
					},
					"reference_id": schema.StringAttribute{
						Computed: true,
					},
					"rg_id": schema.Int64Attribute{
						Computed: true,
					},
					"status": schema.StringAttribute{
						Computed: true,
					},
					"type": schema.StringAttribute{
						Computed: true,
					},
					"vm_id": schema.Int64Attribute{
						Computed: true,
					},
				},
			},
		},
		"entry_count": schema.Int64Attribute{
			Computed: true,
		},
	}
}
