package schemas

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

func MakeSchemaDataSourceFlipgroupList() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		"by_id": schema.Int64Attribute{
			Optional:    true,
			Description: "Filter by ID",
		},
		"name": schema.StringAttribute{
			Optional:    true,
			Description: "Filter by Name",
		},
		"vins_id": schema.Int64Attribute{
			Optional:    true,
			Description: "Filter by ViNS ID",
		},
		"vins_name": schema.StringAttribute{
			Optional:    true,
			Description: "Filter by ViNS name",
		},
		"extnet_id": schema.Int64Attribute{
			Optional:    true,
			Description: "Filter by ExtNetID",
		},
		"by_ip": schema.StringAttribute{
			Optional:    true,
			Description: "Filter by IP-address",
		},
		"rg_id": schema.Int64Attribute{
			Optional:    true,
			Description: "Filter by RG 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",
		},
		"account_id": schema.Int64Attribute{
			Optional:    true,
			Description: "Account id",
		},
		"conn_id": schema.Int64Attribute{
			Optional:    true,
			Description: "Conn id",
		},
		"client_ids": schema.ListAttribute{
			Optional:    true,
			ElementType: types.Int64Type,
			Description: "client_ids",
		},
		"status": schema.StringAttribute{
			Optional:    true,
			Description: "Status",
		},
		"id": schema.StringAttribute{
			Computed: true,
		},
		"items": schema.ListNestedAttribute{
			Computed: true,
			NestedObject: schema.NestedAttributeObject{
				Attributes: map[string]schema.Attribute{
					"flipgroup_id": schema.Int64Attribute{
						Computed: true,
					},
					"account_id": schema.Int64Attribute{
						Computed: true,
					},
					"client_ids": schema.ListAttribute{
						Computed:    true,
						ElementType: types.Int64Type,
					},
					"client_type": schema.StringAttribute{
						Computed: true,
					},
					"conn_id": schema.Int64Attribute{
						Computed: true,
					},
					"conn_type": schema.StringAttribute{
						Computed: true,
					},
					"default_gw": schema.StringAttribute{
						Computed: true,
					},
					"desc": schema.StringAttribute{
						Computed: true,
					},
					"gid": schema.Int64Attribute{
						Computed: true,
					},
					"guid": schema.Int64Attribute{
						Computed: true,
					},
					"milestones": schema.Int64Attribute{
						Computed: true,
					},
					"name": schema.StringAttribute{
						Computed: true,
					},
					"net_id": schema.Int64Attribute{
						Computed: true,
					},
					"net_type": schema.StringAttribute{
						Computed: true,
					},
					"ip": schema.StringAttribute{
						Computed: true,
					},
					"status": schema.StringAttribute{
						Computed: true,
					},
					"net_mask": schema.Int64Attribute{
						Computed: true,
					},
					"ckey": schema.StringAttribute{
						Computed: true,
					},
					"meta": schema.ListAttribute{
						Computed:    true,
						ElementType: types.StringType,
					},
				},
			},
		},
		"entry_count": schema.Int64Attribute{
			Computed: true,
		},
	}
}
