package schemas

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

func MakeSchemaDataSourceBServiceList() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		"by_id": schema.Int64Attribute{
			Optional: true,
		},
		"name": schema.StringAttribute{
			Optional: true,
		},
		"rg_name": schema.StringAttribute{
			Optional: true,
		},
		"status": schema.StringAttribute{
			Optional: true,
		},
		"tech_status": schema.StringAttribute{
			Optional: true,
		},
		"account_name": schema.StringAttribute{
			Optional: true,
		},
		"account_id": schema.Int64Attribute{
			Optional: true,
		},
		"rg_id": 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{
					"account_id": schema.Int64Attribute{
						Computed: true,
					},
					"account_name": schema.StringAttribute{
						Computed: true,
					},
					"base_domain": schema.StringAttribute{
						Computed: true,
					},
					"created_by": schema.StringAttribute{
						Computed: true,
					},
					"created_time": schema.Int64Attribute{
						Computed: true,
					},
					"deleted_by": schema.StringAttribute{
						Computed: true,
					},
					"deleted_time": schema.Int64Attribute{
						Computed: true,
					},
					"gid": schema.Int64Attribute{
						Computed: true,
					},
					"groups": schema.ListAttribute{
						Computed:    true,
						ElementType: types.Int64Type,
					},
					"guid": schema.Int64Attribute{
						Computed: true,
					},
					"service_id": schema.Int64Attribute{
						Computed: true,
					},
					"service_name": schema.StringAttribute{
						Computed: true,
					},
					"parent_srv_id": schema.Int64Attribute{
						Computed: true,
					},
					"parent_srv_type": schema.StringAttribute{
						Computed: true,
					},
					"rg_id": schema.Int64Attribute{
						Computed: true,
					},
					"rg_name": schema.StringAttribute{
						Computed: true,
					},
					"ssh_user": schema.StringAttribute{
						Computed: true,
					},
					"status": schema.StringAttribute{
						Computed: true,
					},
					"tech_status": schema.StringAttribute{
						Computed: true,
					},
					"updated_by": schema.StringAttribute{
						Computed: true,
					},
					"updated_time": schema.Int64Attribute{
						Computed: true,
					},
					"user_managed": schema.BoolAttribute{
						Computed: true,
					},
				},
			},
		},
		"entry_count": schema.Int64Attribute{
			Computed: true,
		},
	}
}
