Template Struct Collection

Struct Documentation

template<class T, class XMedkit = XMedkitCollection>
struct Collection

Generic collection wrapper used for every entity list response.

The “items” array element type T is one of the *ListItem DTOs above. The second template parameter selects the x-medkit payload type; it defaults to the generic XMedkitCollection (total_count + contributors + fan-out observability fields), but per-domain endpoints can plug in a richer typed payload (e.g. FaultListXMedkit, ConfigListXMedkit, DataListXMedkit, LogListXMedkit) without needing a separate top-level struct.

The optional “links” member carries the free-form “_links” object emitted by sub-collection handlers (subareas, contains, hosts, depends-on, etc.).

dto_name<Collection<T, XMedkit>>: the default (XMedkit = XMedkitCollection) is specialized per item type below (“AreaList”, “ComponentList”, …). Non- default XMedkit instantiations must be co-located with their domain header and registered in AllDtos.

Public Members

std::vector<T> items
std::optional<XMedkit> x_medkit
std::optional<nlohmann::json> links