package schemas

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

func MakeSchemaDataSourceAccountFlipgroupsList() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		// required attributes
		"account_id": schema.Int64Attribute{
			Required:    true,
			Description: "ID of the account",
		},

		// optional attributes
		"name": schema.StringAttribute{
			Optional:    true,
			Description: "find by name",
		},
		"vins_id": schema.Int64Attribute{
			Optional:    true,
			Description: "find by vins ID",
		},
		"vins_name": schema.StringAttribute{
			Optional:    true,
			Description: "find by vins name",
		},
		"extnet_id": schema.Int64Attribute{
			Optional:    true,
			Description: "find by extnet ID",
		},
		"by_ip": schema.StringAttribute{
			Optional:    true,
			Description: "find by ip address",
		},
		"flipgroup_id": schema.Int64Attribute{
			Optional:    true,
			Description: "find by flipgroup id",
		},
		"sort_by": schema.StringAttribute{
			Optional:    true,
			Description: "sort by one of supported fields, format +|-(field)",
		},
		"page": schema.Int64Attribute{
			Optional:    true,
			Description: "page number",
		},
		"size": schema.Int64Attribute{
			Optional:    true,
			Description: "page size",
		},

		// 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,
					},
					"client_type": schema.StringAttribute{
						Computed: true,
					},
					"conn_type": schema.StringAttribute{
						Computed: true,
					},
					"created_by": schema.StringAttribute{
						Computed: true,
					},
					"created_time": schema.Int64Attribute{
						Computed: true,
					},
					"default_gw": schema.StringAttribute{
						Computed: true,
					},
					"deleted_by": schema.StringAttribute{
						Computed: true,
					},
					"deleted_time": schema.Int64Attribute{
						Computed: true,
					},
					"desc": schema.StringAttribute{
						Computed: true,
					},
					"gid": schema.Int64Attribute{
						Computed: true,
					},
					"guid": schema.Int64Attribute{
						Computed: true,
					},
					"fg_id": schema.Int64Attribute{
						Computed: true,
					},
					"ip": schema.StringAttribute{
						Computed: true,
					},
					"milestones": schema.Int64Attribute{
						Computed: true,
					},
					"fg_name": schema.StringAttribute{
						Computed: true,
					},
					"net_id": schema.Int64Attribute{
						Computed: true,
					},
					"net_type": schema.StringAttribute{
						Computed: true,
					},
					"netmask": schema.Int64Attribute{
						Computed: true,
					},
					"status": schema.StringAttribute{
						Computed: true,
					},
					"updated_by": schema.StringAttribute{
						Computed: true,
					},
					"updated_time": schema.Int64Attribute{
						Computed: true,
					},
				},
			},
		},
		"entry_count": schema.Int64Attribute{
			Computed: true,
		},
	}
}
