Value ServicesTable::DowntimesAccessor(const Value& row) { Service::Ptr service = static_cast<Service::Ptr>(row); if (!service) return Empty; ArrayData result; for (const Downtime::Ptr& downtime : service->GetDowntimes()) { if (downtime->IsExpired()) continue; result.push_back(downtime->GetLegacyId()); } return new Array(std::move(result)); }