package compute

// IDs gets array of ComputeIDs from ListComputes struct
func (lc ListComputes) IDs() []uint64 {
	res := make([]uint64, 0, len(lc.Data))
	for _, c := range lc.Data {
		res = append(res, c.ID)
	}
	return res
}

// IDs gets array of DiskIDs from ListInfoDisks struct
func (lid ListInfoDisks) IDs() []uint64 {
	res := make([]uint64, 0, len(lid))
	for _, d := range lid {
		res = append(res, d.ID)
	}
	return res
}

// IDs gets array of PFWsIDs from ListPFW struct
func (lp ListPFW) IDs() []uint64 {
	res := make([]uint64, 0, len(lp.Data))
	for _, p := range lp.Data {
		res = append(res, p.ID)
	}
	return res
}

// IDs gets array of DiskIDs from ListDisks struct
func (ld ListDisks) IDs() []uint64 {
	res := make([]uint64, 0, len(ld))
	for _, d := range ld {
		res = append(res, d.ID)
	}
	return res
}

// IDs gets array of PCIDeviceIDs from ListPCIDevices struct
func (lpd ListPCIDevices) IDs() []uint64 {
	res := make([]uint64, 0, len(lpd.Data))
	for _, pd := range lpd.Data {
		res = append(res, pd.ID)
	}
	return res
}
