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 (li ListInfoDisks) IDs() []uint64 {
	res := make([]uint64, 0, len(li))
	for _, i := range li {
		res = append(res, i.ID)
	}
	return res
}

// IDs gets array of PFWsIDs from ListPFWs struct
func (lp ListPFWs) 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 ListComputeDisks struct
func (lcd ListComputeDisks) IDs() []uint64 {
	res := make([]uint64, 0, len(lcd))
	for _, cd := range lcd {
		res = append(res, cd.ID)
	}
	return res
}
