20#ifndef ORES_DQ_MESSAGING_CODING_SCHEME_PROTOCOL_HPP
21#define ORES_DQ_MESSAGING_CODING_SCHEME_PROTOCOL_HPP
27#include "ores.comms/messaging/message_types.hpp"
28#include "ores.comms/messaging/message_traits.hpp"
29#include "ores.dq/domain/coding_scheme.hpp"
30#include "ores.dq/domain/coding_scheme_authority_type.hpp"
32namespace ores::dq::messaging {
42 std::vector<std::byte> serialize()
const;
44 ores::utility::serialization::error_code>
45 deserialize(std::span<const std::byte> data);
54 std::vector<domain::coding_scheme> schemes;
56 std::vector<std::byte> serialize()
const;
58 ores::utility::serialization::error_code>
59 deserialize(std::span<const std::byte> data);
68 std::string authority_type;
70 std::vector<std::byte> serialize()
const;
72 ores::utility::serialization::error_code>
73 deserialize(std::span<const std::byte> data);
82 std::vector<domain::coding_scheme> schemes;
84 std::vector<std::byte> serialize()
const;
86 ores::utility::serialization::error_code>
87 deserialize(std::span<const std::byte> data);
98 std::vector<std::byte> serialize()
const;
100 ores::utility::serialization::error_code>
101 deserialize(std::span<const std::byte> data);
113 std::vector<std::byte> serialize()
const;
115 ores::utility::serialization::error_code>
116 deserialize(std::span<const std::byte> data);
136 std::vector<std::string> codes;
138 std::vector<std::byte> serialize()
const;
140 ores::utility::serialization::error_code>
141 deserialize(std::span<const std::byte> data);
150 std::vector<delete_coding_scheme_result> results;
152 std::vector<std::byte> serialize()
const;
154 ores::utility::serialization::error_code>
155 deserialize(std::span<const std::byte> data);
166 std::vector<std::byte> serialize()
const;
168 ores::utility::serialization::error_code>
169 deserialize(std::span<const std::byte> data);
180 std::vector<domain::coding_scheme> versions;
182 std::vector<std::byte> serialize()
const;
184 ores::utility::serialization::error_code>
185 deserialize(std::span<const std::byte> data);
198 std::vector<std::byte> serialize()
const;
200 ores::utility::serialization::error_code>
201 deserialize(std::span<const std::byte> data);
210 std::vector<domain::coding_scheme_authority_type> authority_types;
212 std::vector<std::byte> serialize()
const;
214 ores::utility::serialization::error_code>
215 deserialize(std::span<const std::byte> data);
226 std::vector<std::byte> serialize()
const;
228 ores::utility::serialization::error_code>
229 deserialize(std::span<const std::byte> data);
241 std::vector<std::byte> serialize()
const;
243 ores::utility::serialization::error_code>
244 deserialize(std::span<const std::byte> data);
264 std::vector<std::string> codes;
266 std::vector<std::byte> serialize()
const;
268 ores::utility::serialization::error_code>
269 deserialize(std::span<const std::byte> data);
278 std::vector<delete_coding_scheme_authority_type_result> results;
280 std::vector<std::byte> serialize()
const;
282 ores::utility::serialization::error_code>
283 deserialize(std::span<const std::byte> data);
294 std::vector<std::byte> serialize()
const;
296 ores::utility::serialization::error_code>
297 deserialize(std::span<const std::byte> data);
308 std::vector<domain::coding_scheme_authority_type> versions;
310 std::vector<std::byte> serialize()
const;
312 ores::utility::serialization::error_code>
313 deserialize(std::span<const std::byte> data);
327 static constexpr message_type request_message_type =
328 message_type::get_coding_schemes_request;
332struct message_traits<dq::messaging::get_coding_schemes_by_authority_type_request> {
335 static constexpr message_type request_message_type =
336 message_type::get_coding_schemes_by_authority_type_request;
340struct message_traits<dq::messaging::save_coding_scheme_request> {
341 using request_type = dq::messaging::save_coding_scheme_request;
342 using response_type = dq::messaging::save_coding_scheme_response;
343 static constexpr message_type request_message_type =
344 message_type::save_coding_scheme_request;
348struct message_traits<dq::messaging::delete_coding_scheme_request> {
349 using request_type = dq::messaging::delete_coding_scheme_request;
350 using response_type = dq::messaging::delete_coding_scheme_response;
351 static constexpr message_type request_message_type =
352 message_type::delete_coding_scheme_request;
356struct message_traits<dq::messaging::get_coding_scheme_history_request> {
357 using request_type = dq::messaging::get_coding_scheme_history_request;
358 using response_type = dq::messaging::get_coding_scheme_history_response;
359 static constexpr message_type request_message_type =
360 message_type::get_coding_scheme_history_request;
365struct message_traits<dq::messaging::get_coding_scheme_authority_types_request> {
366 using request_type = dq::messaging::get_coding_scheme_authority_types_request;
367 using response_type = dq::messaging::get_coding_scheme_authority_types_response;
368 static constexpr message_type request_message_type =
369 message_type::get_coding_scheme_authority_types_request;
373struct message_traits<dq::messaging::save_coding_scheme_authority_type_request> {
374 using request_type = dq::messaging::save_coding_scheme_authority_type_request;
375 using response_type = dq::messaging::save_coding_scheme_authority_type_response;
376 static constexpr message_type request_message_type =
377 message_type::save_coding_scheme_authority_type_request;
381struct message_traits<dq::messaging::delete_coding_scheme_authority_type_request> {
382 using request_type = dq::messaging::delete_coding_scheme_authority_type_request;
383 using response_type = dq::messaging::delete_coding_scheme_authority_type_response;
384 static constexpr message_type request_message_type =
385 message_type::delete_coding_scheme_authority_type_request;
389struct message_traits<dq::messaging::get_coding_scheme_authority_type_history_request> {
390 using request_type = dq::messaging::get_coding_scheme_authority_type_history_request;
391 using response_type = dq::messaging::get_coding_scheme_authority_type_history_response;
392 static constexpr message_type request_message_type =
393 message_type::get_coding_scheme_authority_type_history_request;
Contains messaging related infrastructure in the comms library.
Definition assets_protocol.hpp:122
Defines a coding or identification standard used to identify entities.
Definition coding_scheme.hpp:36
Classifies coding schemes by the type of authority that defines them.
Definition coding_scheme_authority_type.hpp:40
Request to retrieve all coding schemes.
Definition coding_scheme_protocol.hpp:41
Response containing all coding schemes.
Definition coding_scheme_protocol.hpp:53
Request to retrieve coding schemes for a specific authority type.
Definition coding_scheme_protocol.hpp:67
Response containing coding schemes for an authority type.
Definition coding_scheme_protocol.hpp:81
Request to save a coding scheme (create or update).
Definition coding_scheme_protocol.hpp:95
Response confirming coding scheme save operation.
Definition coding_scheme_protocol.hpp:109
Result for a single coding scheme deletion.
Definition coding_scheme_protocol.hpp:124
Request to delete one or more coding schemes.
Definition coding_scheme_protocol.hpp:135
Response confirming coding scheme deletion(s).
Definition coding_scheme_protocol.hpp:149
Request to retrieve version history for a coding scheme.
Definition coding_scheme_protocol.hpp:163
Response containing coding scheme version history.
Definition coding_scheme_protocol.hpp:177
Request to retrieve all coding scheme authority types.
Definition coding_scheme_protocol.hpp:197
Response containing all coding scheme authority types.
Definition coding_scheme_protocol.hpp:209
Request to save a coding scheme authority type (create or update).
Definition coding_scheme_protocol.hpp:223
Response confirming coding scheme authority type save operation.
Definition coding_scheme_protocol.hpp:237
Result for a single coding scheme authority type deletion.
Definition coding_scheme_protocol.hpp:252
Request to delete one or more coding scheme authority types.
Definition coding_scheme_protocol.hpp:263
Response confirming coding scheme authority type deletion(s).
Definition coding_scheme_protocol.hpp:277
Request to retrieve version history for a coding scheme authority type.
Definition coding_scheme_protocol.hpp:291
Response containing coding scheme authority type version history.
Definition coding_scheme_protocol.hpp:305