20#ifndef ORES_DQ_MESSAGING_DATA_ORGANIZATION_PROTOCOL_HPP
21#define ORES_DQ_MESSAGING_DATA_ORGANIZATION_PROTOCOL_HPP
27#include "ores.comms/messaging/message_types.hpp"
28#include "ores.comms/messaging/message_traits.hpp"
29#include "ores.dq/domain/catalog.hpp"
30#include "ores.dq/domain/data_domain.hpp"
31#include "ores.dq/domain/subject_area.hpp"
33namespace ores::dq::messaging {
43 std::vector<std::byte> serialize()
const;
45 ores::utility::serialization::error_code>
46 deserialize(std::span<const std::byte> data);
55 std::vector<domain::catalog> catalogs;
57 std::vector<std::byte> serialize()
const;
59 ores::utility::serialization::error_code>
60 deserialize(std::span<const std::byte> data);
71 std::vector<std::byte> serialize()
const;
73 ores::utility::serialization::error_code>
74 deserialize(std::span<const std::byte> data);
86 std::vector<std::byte> serialize()
const;
88 ores::utility::serialization::error_code>
89 deserialize(std::span<const std::byte> data);
109 std::vector<std::string> names;
111 std::vector<std::byte> serialize()
const;
113 ores::utility::serialization::error_code>
114 deserialize(std::span<const std::byte> data);
123 std::vector<delete_catalog_result> results;
125 std::vector<std::byte> serialize()
const;
127 ores::utility::serialization::error_code>
128 deserialize(std::span<const std::byte> data);
139 std::vector<std::byte> serialize()
const;
141 ores::utility::serialization::error_code>
142 deserialize(std::span<const std::byte> data);
153 std::vector<domain::catalog> versions;
155 std::vector<std::byte> serialize()
const;
157 ores::utility::serialization::error_code>
158 deserialize(std::span<const std::byte> data);
171 std::vector<std::byte> serialize()
const;
173 ores::utility::serialization::error_code>
174 deserialize(std::span<const std::byte> data);
183 std::vector<domain::data_domain> domains;
185 std::vector<std::byte> serialize()
const;
187 ores::utility::serialization::error_code>
188 deserialize(std::span<const std::byte> data);
199 std::vector<std::byte> serialize()
const;
201 ores::utility::serialization::error_code>
202 deserialize(std::span<const std::byte> data);
214 std::vector<std::byte> serialize()
const;
216 ores::utility::serialization::error_code>
217 deserialize(std::span<const std::byte> data);
237 std::vector<std::string> names;
239 std::vector<std::byte> serialize()
const;
241 ores::utility::serialization::error_code>
242 deserialize(std::span<const std::byte> data);
251 std::vector<delete_data_domain_result> results;
253 std::vector<std::byte> serialize()
const;
255 ores::utility::serialization::error_code>
256 deserialize(std::span<const std::byte> data);
267 std::vector<std::byte> serialize()
const;
269 ores::utility::serialization::error_code>
270 deserialize(std::span<const std::byte> data);
281 std::vector<domain::data_domain> versions;
283 std::vector<std::byte> serialize()
const;
285 ores::utility::serialization::error_code>
286 deserialize(std::span<const std::byte> data);
299 std::vector<std::byte> serialize()
const;
301 ores::utility::serialization::error_code>
302 deserialize(std::span<const std::byte> data);
311 std::vector<domain::subject_area> subject_areas;
313 std::vector<std::byte> serialize()
const;
315 ores::utility::serialization::error_code>
316 deserialize(std::span<const std::byte> data);
325 std::string domain_name;
327 std::vector<std::byte> serialize()
const;
329 ores::utility::serialization::error_code>
330 deserialize(std::span<const std::byte> data);
339 std::vector<domain::subject_area> subject_areas;
341 std::vector<std::byte> serialize()
const;
343 ores::utility::serialization::error_code>
344 deserialize(std::span<const std::byte> data);
355 std::vector<std::byte> serialize()
const;
357 ores::utility::serialization::error_code>
358 deserialize(std::span<const std::byte> data);
370 std::vector<std::byte> serialize()
const;
372 ores::utility::serialization::error_code>
373 deserialize(std::span<const std::byte> data);
383 std::string domain_name;
403 std::vector<subject_area_key> keys;
405 std::vector<std::byte> serialize()
const;
407 ores::utility::serialization::error_code>
408 deserialize(std::span<const std::byte> data);
417 std::vector<delete_subject_area_result> results;
419 std::vector<std::byte> serialize()
const;
421 ores::utility::serialization::error_code>
422 deserialize(std::span<const std::byte> data);
433 std::vector<std::byte> serialize()
const;
435 ores::utility::serialization::error_code>
436 deserialize(std::span<const std::byte> data);
447 std::vector<domain::subject_area> versions;
449 std::vector<std::byte> serialize()
const;
451 ores::utility::serialization::error_code>
452 deserialize(std::span<const std::byte> data);
466 static constexpr message_type request_message_type =
467 message_type::get_catalogs_request;
471struct message_traits<dq::messaging::save_catalog_request> {
474 static constexpr message_type request_message_type =
475 message_type::save_catalog_request;
479struct message_traits<dq::messaging::delete_catalog_request> {
480 using request_type = dq::messaging::delete_catalog_request;
481 using response_type = dq::messaging::delete_catalog_response;
482 static constexpr message_type request_message_type =
483 message_type::delete_catalog_request;
487struct message_traits<dq::messaging::get_catalog_history_request> {
488 using request_type = dq::messaging::get_catalog_history_request;
489 using response_type = dq::messaging::get_catalog_history_response;
490 static constexpr message_type request_message_type =
491 message_type::get_catalog_history_request;
496struct message_traits<dq::messaging::get_data_domains_request> {
497 using request_type = dq::messaging::get_data_domains_request;
498 using response_type = dq::messaging::get_data_domains_response;
499 static constexpr message_type request_message_type =
500 message_type::get_data_domains_request;
504struct message_traits<dq::messaging::save_data_domain_request> {
505 using request_type = dq::messaging::save_data_domain_request;
506 using response_type = dq::messaging::save_data_domain_response;
507 static constexpr message_type request_message_type =
508 message_type::save_data_domain_request;
512struct message_traits<dq::messaging::delete_data_domain_request> {
513 using request_type = dq::messaging::delete_data_domain_request;
514 using response_type = dq::messaging::delete_data_domain_response;
515 static constexpr message_type request_message_type =
516 message_type::delete_data_domain_request;
520struct message_traits<dq::messaging::get_data_domain_history_request> {
521 using request_type = dq::messaging::get_data_domain_history_request;
522 using response_type = dq::messaging::get_data_domain_history_response;
523 static constexpr message_type request_message_type =
524 message_type::get_data_domain_history_request;
529struct message_traits<dq::messaging::get_subject_areas_request> {
530 using request_type = dq::messaging::get_subject_areas_request;
531 using response_type = dq::messaging::get_subject_areas_response;
532 static constexpr message_type request_message_type =
533 message_type::get_subject_areas_request;
537struct message_traits<dq::messaging::get_subject_areas_by_domain_request> {
538 using request_type = dq::messaging::get_subject_areas_by_domain_request;
539 using response_type = dq::messaging::get_subject_areas_by_domain_response;
540 static constexpr message_type request_message_type =
541 message_type::get_subject_areas_by_domain_request;
545struct message_traits<dq::messaging::save_subject_area_request> {
546 using request_type = dq::messaging::save_subject_area_request;
547 using response_type = dq::messaging::save_subject_area_response;
548 static constexpr message_type request_message_type =
549 message_type::save_subject_area_request;
553struct message_traits<dq::messaging::delete_subject_area_request> {
554 using request_type = dq::messaging::delete_subject_area_request;
555 using response_type = dq::messaging::delete_subject_area_response;
556 static constexpr message_type request_message_type =
557 message_type::delete_subject_area_request;
561struct message_traits<dq::messaging::get_subject_area_history_request> {
562 using request_type = dq::messaging::get_subject_area_history_request;
563 using response_type = dq::messaging::get_subject_area_history_response;
564 static constexpr message_type request_message_type =
565 message_type::get_subject_area_history_request;
Contains messaging related infrastructure in the comms library.
Definition assets_protocol.hpp:122
Represents a logical grouping of related datasets.
Definition catalog.hpp:39
Represents a high-level classification of data within the system.
Definition data_domain.hpp:40
Represents a subdivision within a data domain.
Definition subject_area.hpp:38
Request to retrieve all catalogs.
Definition data_organization_protocol.hpp:42
Response containing all catalogs.
Definition data_organization_protocol.hpp:54
Request to save a catalog (create or update).
Definition data_organization_protocol.hpp:68
Response confirming catalog save operation.
Definition data_organization_protocol.hpp:82
Result for a single catalog deletion.
Definition data_organization_protocol.hpp:97
Request to delete one or more catalogs.
Definition data_organization_protocol.hpp:108
Response confirming catalog deletion(s).
Definition data_organization_protocol.hpp:122
Request to retrieve version history for a catalog.
Definition data_organization_protocol.hpp:136
Response containing catalog version history.
Definition data_organization_protocol.hpp:150
Request to retrieve all data domains.
Definition data_organization_protocol.hpp:170
Response containing all data domains.
Definition data_organization_protocol.hpp:182
Request to save a data domain (create or update).
Definition data_organization_protocol.hpp:196
Response confirming data domain save operation.
Definition data_organization_protocol.hpp:210
Result for a single data domain deletion.
Definition data_organization_protocol.hpp:225
Request to delete one or more data domains.
Definition data_organization_protocol.hpp:236
Response confirming data domain deletion(s).
Definition data_organization_protocol.hpp:250
Request to retrieve version history for a data domain.
Definition data_organization_protocol.hpp:264
Response containing data domain version history.
Definition data_organization_protocol.hpp:278
Request to retrieve all subject areas.
Definition data_organization_protocol.hpp:298
Response containing all subject areas.
Definition data_organization_protocol.hpp:310
Request to retrieve subject areas for a specific domain.
Definition data_organization_protocol.hpp:324
Response containing subject areas for a domain.
Definition data_organization_protocol.hpp:338
Request to save a subject area (create or update).
Definition data_organization_protocol.hpp:352
Response confirming subject area save operation.
Definition data_organization_protocol.hpp:366
Key for a subject area (composite key: name + domain_name).
Definition data_organization_protocol.hpp:381
Result for a single subject area deletion.
Definition data_organization_protocol.hpp:391
Request to delete one or more subject areas.
Definition data_organization_protocol.hpp:402
Response confirming subject area deletion(s).
Definition data_organization_protocol.hpp:416
Request to retrieve version history for a subject area.
Definition data_organization_protocol.hpp:430
Response containing subject area version history.
Definition data_organization_protocol.hpp:444