20#ifndef ORES_DQ_MESSAGING_CHANGE_MANAGEMENT_PROTOCOL_HPP
21#define ORES_DQ_MESSAGING_CHANGE_MANAGEMENT_PROTOCOL_HPP
27#include "ores.comms/messaging/message_types.hpp"
28#include "ores.comms/messaging/message_traits.hpp"
29#include "ores.dq/domain/change_reason_category.hpp"
30#include "ores.dq/domain/change_reason.hpp"
32namespace ores::dq::messaging {
38 std::vector<std::byte> serialize()
const;
40 ores::utility::serialization::error_code>
41 deserialize(std::span<const std::byte> data);
44std::ostream& operator<<(std::ostream& s,
51 std::vector<domain::change_reason_category> categories;
53 std::vector<std::byte> serialize()
const;
55 ores::utility::serialization::error_code>
56 deserialize(std::span<const std::byte> data);
59std::ostream& operator<<(std::ostream& s,
66 std::vector<std::byte> serialize()
const;
68 ores::utility::serialization::error_code>
69 deserialize(std::span<const std::byte> data);
72std::ostream& operator<<(std::ostream& s,
79 std::vector<domain::change_reason> reasons;
81 std::vector<std::byte> serialize()
const;
83 ores::utility::serialization::error_code>
84 deserialize(std::span<const std::byte> data);
87std::ostream& operator<<(std::ostream& s,
94 std::string category_code;
96 std::vector<std::byte> serialize()
const;
98 ores::utility::serialization::error_code>
99 deserialize(std::span<const std::byte> data);
102std::ostream& operator<<(std::ostream& s,
109 std::vector<domain::change_reason> reasons;
111 std::vector<std::byte> serialize()
const;
113 ores::utility::serialization::error_code>
114 deserialize(std::span<const std::byte> data);
117std::ostream& operator<<(std::ostream& s,
134 std::vector<std::byte> serialize()
const;
136 ores::utility::serialization::error_code>
137 deserialize(std::span<const std::byte> data);
149 std::vector<std::byte> serialize()
const;
151 ores::utility::serialization::error_code>
152 deserialize(std::span<const std::byte> data);
175 std::vector<std::string> codes;
177 std::vector<std::byte> serialize()
const;
179 ores::utility::serialization::error_code>
180 deserialize(std::span<const std::byte> data);
192 std::vector<delete_change_reason_result> results;
194 std::vector<std::byte> serialize()
const;
196 ores::utility::serialization::error_code>
197 deserialize(std::span<const std::byte> data);
208 std::vector<std::byte> serialize()
const;
210 ores::utility::serialization::error_code>
211 deserialize(std::span<const std::byte> data);
214std::ostream& operator<<(std::ostream& s,
223 std::vector<domain::change_reason> versions;
225 std::vector<std::byte> serialize()
const;
227 ores::utility::serialization::error_code>
228 deserialize(std::span<const std::byte> data);
231std::ostream& operator<<(std::ostream& s,
248 std::vector<std::byte> serialize()
const;
250 ores::utility::serialization::error_code>
251 deserialize(std::span<const std::byte> data);
254std::ostream& operator<<(std::ostream& s,
264 std::vector<std::byte> serialize()
const;
266 ores::utility::serialization::error_code>
267 deserialize(std::span<const std::byte> data);
270std::ostream& operator<<(std::ostream& s,
282std::ostream& operator<<(std::ostream& s,
292 std::vector<std::string> codes;
294 std::vector<std::byte> serialize()
const;
296 ores::utility::serialization::error_code>
297 deserialize(std::span<const std::byte> data);
300std::ostream& operator<<(std::ostream& s,
310 std::vector<delete_change_reason_category_result> results;
312 std::vector<std::byte> serialize()
const;
314 ores::utility::serialization::error_code>
315 deserialize(std::span<const std::byte> data);
318std::ostream& operator<<(std::ostream& s,
327 std::vector<std::byte> serialize()
const;
329 ores::utility::serialization::error_code>
330 deserialize(std::span<const std::byte> data);
333std::ostream& operator<<(std::ostream& s,
342 std::vector<domain::change_reason_category> versions;
344 std::vector<std::byte> serialize()
const;
346 ores::utility::serialization::error_code>
347 deserialize(std::span<const std::byte> data);
350std::ostream& operator<<(std::ostream& s,
364 static constexpr message_type request_message_type =
365 message_type::get_change_reason_categories_request;
375 static constexpr message_type request_message_type =
376 message_type::get_change_reasons_request;
386 static constexpr message_type request_message_type =
387 message_type::get_change_reasons_by_category_request;
397 static constexpr message_type request_message_type =
398 message_type::save_change_reason_request;
408 static constexpr message_type request_message_type =
409 message_type::delete_change_reason_request;
419 static constexpr message_type request_message_type =
420 message_type::get_change_reason_history_request;
430 static constexpr message_type request_message_type =
431 message_type::save_change_reason_category_request;
441 static constexpr message_type request_message_type =
442 message_type::delete_change_reason_category_request;
449struct message_traits<dq::messaging::get_change_reason_category_history_request> {
452 static constexpr message_type request_message_type =
453 message_type::get_change_reason_category_history_request;
Contains messaging related infrastructure in the comms library.
Definition assets_protocol.hpp:122
Traits template for mapping request types to their response types and message type enum values.
Definition message_traits.hpp:66
Defines a specific reason for record changes.
Definition change_reason.hpp:47
Groups change reasons into logical categories.
Definition change_reason_category.hpp:45
Request to retrieve all change reason categories.
Definition change_management_protocol.hpp:37
Response containing all change reason categories.
Definition change_management_protocol.hpp:50
Request to retrieve all change reasons.
Definition change_management_protocol.hpp:65
Response containing all change reasons.
Definition change_management_protocol.hpp:78
Request to retrieve change reasons for a specific category.
Definition change_management_protocol.hpp:93
Response containing change reasons for a category.
Definition change_management_protocol.hpp:108
Request to save a change reason (create or update).
Definition change_management_protocol.hpp:131
Response confirming change reason save operation.
Definition change_management_protocol.hpp:145
Result for a single change reason deletion.
Definition change_management_protocol.hpp:160
Request to delete one or more change reasons.
Definition change_management_protocol.hpp:174
Response confirming change reason deletion(s).
Definition change_management_protocol.hpp:191
Request to retrieve version history for a change reason.
Definition change_management_protocol.hpp:205
Response containing change reason version history.
Definition change_management_protocol.hpp:220
Request to save a change reason category (create or update).
Definition change_management_protocol.hpp:245
Response confirming change reason category save operation.
Definition change_management_protocol.hpp:260
Result for a single change reason category deletion.
Definition change_management_protocol.hpp:276
Request to delete one or more change reason categories.
Definition change_management_protocol.hpp:291
Response confirming change reason category deletion(s).
Definition change_management_protocol.hpp:309
Request to retrieve version history for a change reason category.
Definition change_management_protocol.hpp:324
Response containing change reason category version history.
Definition change_management_protocol.hpp:339