package schemas

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

func MakeSchemaDataSourceBServiceGroup() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		"service_id": schema.Int64Attribute{
			Required: true,
		},
		"compgroup_id": schema.Int64Attribute{
			Required: true,
		},
		"account_id": schema.Int64Attribute{
			Computed: true,
		},
		"account_name": schema.StringAttribute{
			Computed: true,
		},
		"computes": schema.ListNestedAttribute{
			Computed: true,
			NestedObject: schema.NestedAttributeObject{
				Attributes: map[string]schema.Attribute{
					"id": schema.Int64Attribute{
						Computed: true,
					},
					"ip_addresses": schema.ListAttribute{
						Computed:    true,
						ElementType: types.StringType,
					},
					"name": schema.StringAttribute{
						Computed: true,
					},
					"chipset": schema.StringAttribute{
						Computed: true,
					},
					"os_users": schema.ListNestedAttribute{
						Computed: true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"login": schema.StringAttribute{
									Computed: true,
								},
								"password": schema.StringAttribute{
									Computed: true,
								},
							},
						},
					},
				},
			},
		},
		"consistency": schema.BoolAttribute{
			Computed: true,
		},
		"cpu": schema.Int64Attribute{
			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,
		},
		"disk": schema.Int64Attribute{
			Computed: true,
		},
		"driver": schema.StringAttribute{
			Computed: true,
		},
		"extnets": schema.ListAttribute{
			Computed:    true,
			ElementType: types.Int64Type,
		},
		"gid": schema.Int64Attribute{
			Computed: true,
		},
		"guid": schema.Int64Attribute{
			Computed: true,
		},
		"image_id": schema.Int64Attribute{
			Computed: true,
		},
		"milestones": schema.Int64Attribute{
			Computed: true,
		},
		"compgroup_name": schema.StringAttribute{
			Computed: true,
		},
		"parents": schema.ListAttribute{
			Computed:    true,
			ElementType: types.Int64Type,
		},
		"ram": schema.Int64Attribute{
			Computed: true,
		},
		"rg_id": schema.Int64Attribute{
			Computed: true,
		},
		"rg_name": schema.StringAttribute{
			Computed: true,
		},
		"role": schema.StringAttribute{
			Computed: true,
		},
		"sep_id": schema.Int64Attribute{
			Computed: true,
		},
		"seq_no": schema.Int64Attribute{
			Computed: true,
		},
		"status": schema.StringAttribute{
			Computed: true,
		},
		"tech_status": schema.StringAttribute{
			Computed: true,
		},
		"timeout_start": schema.Int64Attribute{
			Computed: true,
		},
		"updated_by": schema.StringAttribute{
			Computed: true,
		},
		"updated_time": schema.Int64Attribute{
			Computed: true,
		},
		"vinses": schema.ListAttribute{
			Computed:    true,
			ElementType: types.Int64Type,
		},
	}
}
