Hi, I am following these examples and docs:
It said:
Objects can be automatically converted to any Go struct type with that follows these constraints: …
But I couldn’t find a way to do a such conversion. Here is an example I am working on:
type DeviceModel struct {
DiskID types.Int64 `tfsdk:"disk_id"`
VolumeID types.Int64 `tfsdk:"volume_id"`
}
type DevicesModel struct {
SDA DeviceModel `tfsdk:"sda"`
SDB DeviceModel `tfsdk:"sdb"`
// With DeviceModel type, I couldn't check null/unknown for them
// SDB types.Object `tfsdk:"sdb"`
// Can/Should I put types.Object as the type here for these fields above?
// How can it be converted to be an instance of DeviceModel?
// What would be the best practices to handle them?
}