package schemas

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

func MakeSchemaDataSourceComputeUserList() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		// required attributes
		"compute_id": schema.Int64Attribute{
			Required: true,
		},
		// computed attributes
		"id": schema.StringAttribute{
			Computed: true,
		},
		"items": schema.SingleNestedAttribute{
			Computed: true,
			Attributes: map[string]schema.Attribute{
				"account_acl": schema.ListNestedAttribute{
					Computed: true,
					NestedObject: schema.NestedAttributeObject{
						Attributes: map[string]schema.Attribute{
							"explicit": schema.BoolAttribute{
								Computed: true,
							},
							"guid": schema.StringAttribute{
								Computed: true,
							},
							"right": schema.StringAttribute{
								Computed: true,
							},
							"status": schema.StringAttribute{
								Computed: true,
							},
							"type": schema.StringAttribute{
								Computed: true,
							},
							"user_group_id": schema.StringAttribute{
								Computed: true,
							},
						},
					},
				},
				"compute_acl": schema.ListNestedAttribute{
					Computed: true,
					NestedObject: schema.NestedAttributeObject{
						Attributes: map[string]schema.Attribute{
							"explicit": schema.BoolAttribute{
								Computed: true,
							},
							"guid": schema.StringAttribute{
								Computed: true,
							},
							"right": schema.StringAttribute{
								Computed: true,
							},
							"status": schema.StringAttribute{
								Computed: true,
							},
							"type": schema.StringAttribute{
								Computed: true,
							},
							"user_group_id": schema.StringAttribute{
								Computed: true,
							},
						},
					},
				},
				"rg_acl": schema.ListNestedAttribute{
					Computed: true,
					NestedObject: schema.NestedAttributeObject{
						Attributes: map[string]schema.Attribute{
							"explicit": schema.BoolAttribute{
								Computed: true,
							},
							"guid": schema.StringAttribute{
								Computed: true,
							},
							"right": schema.StringAttribute{
								Computed: true,
							},
							"status": schema.StringAttribute{
								Computed: true,
							},
							"type": schema.StringAttribute{
								Computed: true,
							},
							"user_group_id": schema.StringAttribute{
								Computed: true,
							},
						},
					},
				},
			},
		},
		"entry_count": schema.Int64Attribute{
			Computed: true,
		},
	}
}
