package schemas

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

func MakeSchemaDataSourceDiskReplication() map[string]schema.Attribute {
	return map[string]schema.Attribute{
		"disk_id": schema.Int64Attribute{
			Required:    true,
			Description: "Id of primary disk",
		},
		"status_replication": schema.StringAttribute{
			Computed:    true,
			Description: "Status of replication",
		},
		"account_id": schema.Int64Attribute{
			Computed:    true,
			Description: "The unique ID of the subscriber-owner of the disk",
		},
		"account_name": schema.StringAttribute{
			Computed:    true,
			Description: "The name of the subscriber '(account') to whom this disk belongs",
		},
		"acl": schema.StringAttribute{
			Computed: true,
		},
		"boot_partition": schema.Int64Attribute{
			Computed: true,
		},
		"computes": schema.ListNestedAttribute{
			Computed: true,
			NestedObject: schema.NestedAttributeObject{
				Attributes: map[string]schema.Attribute{
					"compute_id": schema.StringAttribute{
						Computed: true,
					},
					"compute_name": schema.StringAttribute{
						Computed: true,
					},
				},
			},
		},
		"created_time": schema.Int64Attribute{
			Computed: true,
		},
		"deleted_time": schema.Int64Attribute{
			Computed: true,
		},
		"desc": schema.StringAttribute{
			Computed: true,
		},
		"destruction_time": schema.Int64Attribute{
			Computed: true,
		},
		"devicename": schema.StringAttribute{
			Computed: true,
		},
		"disk_path": schema.StringAttribute{
			Computed: true,
		},
		"gid": schema.Int64Attribute{
			Computed: true,
		},
		"guid": schema.Int64Attribute{
			Computed: true,
		},
		"image_id": schema.Int64Attribute{
			Computed: true,
		},
		"images": schema.ListAttribute{
			Computed:    true,
			ElementType: types.Int64Type,
		},
		"iotune": schema.SingleNestedAttribute{
			Computed: true,
			Attributes: map[string]schema.Attribute{
				"read_bytes_sec": schema.Int64Attribute{
					Computed: true,
				},
				"read_bytes_sec_max": schema.Int64Attribute{
					Computed: true,
				},
				"read_iops_sec": schema.Int64Attribute{
					Computed: true,
				},
				"read_iops_sec_max": schema.Int64Attribute{
					Computed: true,
				},
				"size_iops_sec": schema.Int64Attribute{
					Computed: true,
				},
				"total_bytes_sec": schema.Int64Attribute{
					Computed: true,
				},
				"total_bytes_sec_max": schema.Int64Attribute{
					Computed: true,
				},
				"total_iops_sec": schema.Int64Attribute{
					Computed: true,
				},
				"total_iops_sec_max": schema.Int64Attribute{
					Computed: true,
				},
				"write_bytes_sec": schema.Int64Attribute{
					Computed: true,
				},
				"write_bytes_sec_max": schema.Int64Attribute{
					Computed: true,
				},
				"write_iops_sec": schema.Int64Attribute{
					Computed: true,
				},
				"write_iops_sec_max": schema.Int64Attribute{
					Computed: true,
				},
			},
		},
		"iqn": schema.StringAttribute{
			Computed: true,
		},
		"login": schema.StringAttribute{
			Computed: true,
		},
		"milestones": schema.Int64Attribute{
			Computed: true,
		},
		"disk_name": schema.StringAttribute{
			Computed: true,
		},
		"order": schema.Int64Attribute{
			Computed: true,
		},
		"params": schema.StringAttribute{
			Computed: true,
		},
		"parent_id": schema.Int64Attribute{
			Computed: true,
		},
		"passwd": schema.StringAttribute{
			Computed: true,
		},
		"pci_slot": schema.Int64Attribute{
			Computed: true,
		},
		"pool": schema.StringAttribute{
			Computed: true,
		},
		"present_to": schema.ListAttribute{
			Computed:    true,
			ElementType: types.Int64Type,
		},
		"purge_attempts": schema.Int64Attribute{
			Computed: true,
		},
		"purge_time": schema.Int64Attribute{
			Computed: true,
		},
		"replication": schema.SingleNestedAttribute{
			Computed: true,
			Attributes: map[string]schema.Attribute{
				"disk_id": schema.Int64Attribute{
					Computed: true,
				},
				"pool_id": schema.StringAttribute{
					Computed: true,
				},
				"role": schema.StringAttribute{
					Computed: true,
				},
				"self_volume_id": schema.StringAttribute{
					Computed: true,
				},
				"storage_id": schema.StringAttribute{
					Computed: true,
				},
				"volume_id": schema.StringAttribute{
					Computed: true,
				},
			},
		},
		"reality_device_number": schema.Int64Attribute{
			Computed: true,
		},
		"reference_id": schema.StringAttribute{
			Computed: true,
		},
		"res_id": schema.StringAttribute{
			Computed: true,
		},
		"res_name": schema.StringAttribute{
			Computed: true,
		},
		"role": schema.StringAttribute{
			Computed: true,
		},
		"sep_id": schema.Int64Attribute{
			Computed: true,
		},
		"sep_type": schema.StringAttribute{
			Computed: true,
		},
		"shareable": schema.BoolAttribute{
			Computed: true,
		},
		"size_max": schema.Int64Attribute{
			Computed: true,
		},
		"size_used": schema.Float64Attribute{
			Computed: true,
		},
		"snapshots": schema.ListNestedAttribute{
			Computed: true,
			NestedObject: schema.NestedAttributeObject{
				Attributes: map[string]schema.Attribute{
					"guid": schema.StringAttribute{
						Computed: true,
					},
					"label": schema.StringAttribute{
						Computed: true,
					},
					"res_id": schema.StringAttribute{
						Computed: true,
					},
					"snap_set_guid": schema.StringAttribute{
						Computed: true,
					},
					"snap_set_time": schema.Int64Attribute{
						Computed: true,
					},
					"timestamp": schema.Int64Attribute{
						Computed: true,
					},
				},
			},
		},
		"status": schema.StringAttribute{
			Computed: true,
		},
		"tech_status": schema.StringAttribute{
			Computed: true,
		},
		"type": schema.StringAttribute{
			Computed: true,
		},
		"vmid": schema.Int64Attribute{
			Computed: true,
		},
	}
}
