FETPAPI 0.6.0.0
This project provides C++ classes which facilitate the developement of ETP1.2 clients and servers.
Loading...
Searching...
No Matches
EtpMessages.h
1#ifndef ETP_MESSAGES__
2#define ETP_MESSAGES__
3
4#include <array>
5#include <chrono>
6#include <iostream>
7#include <map>
8#include <optional>
9#include <sstream>
10#include <string>
11#include <variant>
12#include <vector>
13
14#include <avro/Exception.hh>
15
16#include "EtpMessage.h"
17
18namespace Energistics {
19 namespace Etp {
20 namespace v12 {
21 namespace Datatypes {
22 enum class Protocol : int32_t {
23 Core = 0,
24 ChannelStreaming = 1,
25 ChannelDataFrame = 2,
26 Discovery = 3,
27 Store = 4,
28 StoreNotification = 5,
29 GrowingObject = 6,
30 GrowingObjectNotification = 7,
31 DEPRECATED_8 = 8,
32 DataArray = 9,
33 RESERVED_10 = 10,
34 RESERVED_11 = 11,
35 RESERVED_12 = 12,
36 DiscoveryQuery = 13,
37 StoreQuery = 14,
38 RESERVED_15 = 15,
39 GrowingObjectQuery = 16,
40 RESERVED_17 = 17,
41 Transaction = 18,
42 RESERVED_19 = 19,
43 RESERVED_20 = 20,
44 ChannelSubscribe = 21,
45 ChannelDataLoad = 22,
46 RESERVED_23 = 23,
47 Dataspace = 24,
48 SupportedTypes = 25,
49 CoreOSDU = 2400,
50 StoreOSDU = 2404,
51 DataspaceOSDU = 2424
52 };
53 }
54 }
55 }
56}
57namespace avro {
58 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Protocol> {
59 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Protocol& v) {
60 e.encodeEnum(static_cast<std::size_t>(v));
61 }
62 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Protocol& v) {
63 v = static_cast<Energistics::Etp::v12::Datatypes::Protocol>(d.decodeEnum());
64 }
65 };
66}
67
68namespace Energistics {
69 namespace Etp {
70 namespace v12 {
71 namespace Protocol {
72 namespace Core {
73 struct Acknowledge : public ETP_NS::EtpMessage {
74 static constexpr int32_t messageTypeId = 1001;
75
76 Acknowledge() {
77 this->messageHeader.messageType = messageTypeId;
78 }
79
80 void encode(avro::Encoder&) const final {}
81 void decode(avro::Decoder&) final {}
82 };
83 }
84 }
85 }
86 }
87}
88namespace Energistics {
89 namespace Etp {
90 namespace v12 {
91 namespace Protocol {
92 namespace Core {
93 struct Authorize : public ETP_NS::EtpMessage {
94 static constexpr int32_t messageTypeId = 6;
95
96 Authorize() {
97 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Core);
98 this->messageHeader.messageType = messageTypeId;
99 }
100 std::string authorization;
101 std::map<std::string, std::string> supplementalAuthorization;
102
103 void encode(avro::Encoder& e) const final {
104 avro::encode(e, authorization);
105 avro::encode(e, supplementalAuthorization);
106 }
107 void decode(avro::Decoder& d) final {
108 avro::decode(d, authorization);
109 avro::decode(d, supplementalAuthorization);
110 }
111 };
112 }
113 }
114 }
115 }
116}
117namespace Energistics {
118 namespace Etp {
119 namespace v12 {
120 namespace Protocol {
121 namespace Core {
122 struct AuthorizeResponse : public ETP_NS::EtpMessage {
123 static constexpr int32_t messageTypeId = 7;
124
125 AuthorizeResponse() {
126 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Core);
127 this->messageHeader.messageType = messageTypeId;
128 }
129 bool success = false;
130 std::vector<std::string> challenges;
131
132 void encode(avro::Encoder& e) const final {
133 avro::encode(e, success);
134 avro::encode(e, challenges);
135 }
136 void decode(avro::Decoder& d) final {
137 avro::decode(d, success);
138 avro::decode(d, challenges);
139 }
140 };
141 }
142 }
143 }
144 }
145}
146namespace Energistics {
147 namespace Etp {
148 namespace v12 {
149 namespace Protocol {
150 namespace Core {
151 struct CloseSession : public ETP_NS::EtpMessage {
152 static constexpr int32_t messageTypeId = 5;
153
154 CloseSession() {
155 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Core);
156 this->messageHeader.messageType = messageTypeId;
157 }
158 std::string reason;
159
160 void encode(avro::Encoder& e) const final {
161 avro::encode(e, reason);
162 }
163 void decode(avro::Decoder& d) final {
164 avro::decode(d, reason);
165 }
166 };
167 }
168 }
169 }
170 }
171}
172namespace Energistics {
173 namespace Etp {
174 namespace v12 {
175 namespace Protocol {
176 namespace Core {
177 struct Pong : public ETP_NS::EtpMessage {
178 static constexpr int32_t messageTypeId = 9;
179
180 Pong() {
181 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Core);
182 this->messageHeader.messageType = messageTypeId;
183 }
184 int64_t currentDateTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
185
186 void encode(avro::Encoder& e) const final {
187 avro::encode(e, currentDateTime);
188 }
189 void decode(avro::Decoder& d) final {
190 avro::decode(d, currentDateTime);
191 }
192 };
193 }
194 }
195 }
196 }
197}
198namespace Energistics {
199 namespace Etp {
200 namespace v12 {
201 namespace Protocol {
202 namespace Core {
203 struct Ping : public ETP_NS::EtpMessage {
204 static constexpr int32_t messageTypeId = 8;
205
206 Ping() {
207 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Core);
208 this->messageHeader.messageType = messageTypeId;
209 }
210 int64_t currentDateTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
211
212 void encode(avro::Encoder& e) const final {
213 avro::encode(e, currentDateTime);
214 }
215 void decode(avro::Decoder& d) final {
216 avro::decode(d, currentDateTime);
217 }
218 };
219 }
220 }
221 }
222 }
223}
224namespace Energistics {
225 namespace Etp {
226 namespace v12 {
227 namespace Protocol {
228 namespace DataArray {
229 struct PutDataArraysResponse : public ETP_NS::EtpMessage {
230 static constexpr int32_t messageTypeId = 10;
231
232 PutDataArraysResponse() {
233 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
234 this->messageHeader.messageType = messageTypeId;
235 }
236 std::map<std::string, std::string> success;
237
238 void encode(avro::Encoder& e) const final {
239 avro::encode(e, success);
240 }
241 void decode(avro::Decoder& d) final {
242 avro::decode(d, success);
243 }
244 };
245 }
246 }
247 }
248 }
249}
250namespace Energistics {
251 namespace Etp {
252 namespace v12 {
253 namespace Protocol {
254 namespace DataArray {
255 struct PutDataSubarraysResponse : public ETP_NS::EtpMessage {
256 static constexpr int32_t messageTypeId = 11;
257
258 PutDataSubarraysResponse() {
259 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
260 this->messageHeader.messageType = messageTypeId;
261 }
262 std::map<std::string, std::string> success;
263
264 void encode(avro::Encoder& e) const final {
265 avro::encode(e, success);
266 }
267 void decode(avro::Decoder& d) final {
268 avro::decode(d, success);
269 }
270 };
271 }
272 }
273 }
274 }
275}
276namespace Energistics {
277 namespace Etp {
278 namespace v12 {
279 namespace Protocol {
280 namespace DataArray {
281 struct PutUninitializedDataArraysResponse : public ETP_NS::EtpMessage {
282 static constexpr int32_t messageTypeId = 12;
283
284 PutUninitializedDataArraysResponse() {
285 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
286 this->messageHeader.messageType = messageTypeId;
287 }
288 std::map<std::string, std::string> success;
289
290 void encode(avro::Encoder& e) const final {
291 avro::encode(e, success);
292 }
293 void decode(avro::Decoder& d) final {
294 avro::decode(d, success);
295 }
296 };
297 }
298 }
299 }
300 }
301}
302namespace Energistics {
303 namespace Etp {
304 namespace v12 {
305 namespace Protocol {
306 namespace Dataspace {
307 struct DeleteDataspaces : public ETP_NS::EtpMessage {
308 static constexpr int32_t messageTypeId = 4;
309
310 DeleteDataspaces() {
311 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Dataspace);
312 this->messageHeader.messageType = messageTypeId;
313 }
314 std::map<std::string, std::string> uris;
315
316 void encode(avro::Encoder& e) const final {
317 avro::encode(e, uris);
318 }
319 void decode(avro::Decoder& d) final {
320 avro::decode(d, uris);
321 }
322 };
323 }
324 }
325 }
326 }
327}
328namespace Energistics {
329 namespace Etp {
330 namespace v12 {
331 namespace Protocol {
332 namespace Dataspace {
333 struct DeleteDataspacesResponse : public ETP_NS::EtpMessage {
334 static constexpr int32_t messageTypeId = 5;
335
336 DeleteDataspacesResponse() {
337 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Dataspace);
338 this->messageHeader.messageType = messageTypeId;
339 }
340 std::map<std::string, std::string> success;
341
342 void encode(avro::Encoder& e) const final {
343 avro::encode(e, success);
344 }
345 void decode(avro::Decoder& d) final {
346 avro::decode(d, success);
347 }
348 };
349 }
350 }
351 }
352 }
353}
354namespace Energistics {
355 namespace Etp {
356 namespace v12 {
357 namespace Protocol {
358 namespace Dataspace {
359 struct GetDataspaces : public ETP_NS::EtpMessage {
360 static constexpr int32_t messageTypeId = 1;
361
362 GetDataspaces() {
363 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Dataspace);
364 this->messageHeader.messageType = messageTypeId;
365 }
366 std::optional<int64_t> storeLastWriteFilter;
367 bool has_storeLastWriteFilter() const { return storeLastWriteFilter.has_value(); }
368 int64_t get_storeLastWriteFilter() const { return storeLastWriteFilter.value(); }
369
370 void encode(avro::Encoder& e) const final {
371 avro::encode(e, storeLastWriteFilter);
372 }
373 void decode(avro::Decoder& d) final {
374 avro::decode(d, storeLastWriteFilter);
375 }
376 };
377 }
378 }
379 }
380 }
381}
382namespace Energistics {
383 namespace Etp {
384 namespace v12 {
385 namespace Protocol {
386 namespace Dataspace {
387 struct PutDataspacesResponse : public ETP_NS::EtpMessage {
388 static constexpr int32_t messageTypeId = 6;
389
390 PutDataspacesResponse() {
391 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Dataspace);
392 this->messageHeader.messageType = messageTypeId;
393 }
394 std::map<std::string, std::string> success;
395
396 void encode(avro::Encoder& e) const final {
397 avro::encode(e, success);
398 }
399 void decode(avro::Decoder& d) final {
400 avro::decode(d, success);
401 }
402 };
403 }
404 }
405 }
406 }
407}
408namespace Energistics {
409 namespace Etp {
410 namespace v12 {
411 namespace Protocol {
412 namespace Discovery {
413 struct GetDeletedResources : public ETP_NS::EtpMessage {
414 static constexpr int32_t messageTypeId = 5;
415
416 GetDeletedResources() {
417 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Discovery);
418 this->messageHeader.messageType = messageTypeId;
419 }
420 std::string dataspaceUri;
421 std::optional<int64_t> deleteTimeFilter;
422 bool has_deleteTimeFilter() const { return deleteTimeFilter.has_value(); }
423 int64_t get_deleteTimeFilter() const { return deleteTimeFilter.value(); }
424 std::vector<std::string> dataObjectTypes;
425
426 void encode(avro::Encoder& e) const final {
427 avro::encode(e, dataspaceUri);
428 avro::encode(e, deleteTimeFilter);
429 avro::encode(e, dataObjectTypes);
430 }
431 void decode(avro::Decoder& d) final {
432 avro::decode(d, dataspaceUri);
433 avro::decode(d, deleteTimeFilter);
434 avro::decode(d, dataObjectTypes);
435 }
436 };
437 }
438 }
439 }
440 }
441}
442namespace Energistics {
443 namespace Etp {
444 namespace v12 {
445 namespace Protocol {
446 namespace StoreNotification {
447 struct SubscribeNotificationsResponse : public ETP_NS::EtpMessage {
448 static constexpr int32_t messageTypeId = 10;
449
450 SubscribeNotificationsResponse() {
451 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
452 this->messageHeader.messageType = messageTypeId;
453 }
454 std::map<std::string, std::string> success;
455
456 void encode(avro::Encoder& e) const final {
457 avro::encode(e, success);
458 }
459 void decode(avro::Decoder& d) final {
460 avro::decode(d, success);
461 }
462 };
463 }
464 }
465 }
466 }
467}
468namespace Energistics {
469 namespace Etp {
470 namespace v12 {
471 namespace Protocol {
472 namespace Store {
473 struct DeleteDataObjects : public ETP_NS::EtpMessage {
474 static constexpr int32_t messageTypeId = 3;
475
476 DeleteDataObjects() {
477 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Store);
478 this->messageHeader.messageType = messageTypeId;
479 }
480 std::map<std::string, std::string> uris;
481 bool pruneContainedObjects = false;
482
483 void encode(avro::Encoder& e) const final {
484 avro::encode(e, uris);
485 avro::encode(e, pruneContainedObjects);
486 }
487 void decode(avro::Decoder& d) final {
488 avro::decode(d, uris);
489 avro::decode(d, pruneContainedObjects);
490 }
491 };
492 }
493 }
494 }
495 }
496}
497namespace Energistics {
498 namespace Etp {
499 namespace v12 {
500 namespace Protocol {
501 namespace Store {
502 struct GetDataObjects : public ETP_NS::EtpMessage {
503 static constexpr int32_t messageTypeId = 1;
504
505 GetDataObjects() {
506 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Store);
507 this->messageHeader.messageType = messageTypeId;
508 }
509 std::map<std::string, std::string> uris;
510 std::string format = "xml";
511
512 void encode(avro::Encoder& e) const final {
513 avro::encode(e, uris);
514 avro::encode(e, format);
515 }
516 void decode(avro::Decoder& d) final {
517 avro::decode(d, uris);
518 avro::decode(d, format);
519 }
520 };
521 }
522 }
523 }
524 }
525}
526namespace Energistics {
527 namespace Etp {
528 namespace v12 {
529 namespace Protocol {
530 namespace Transaction {
531 struct StartTransaction : public ETP_NS::EtpMessage {
532 static constexpr int32_t messageTypeId = 1;
533
534 StartTransaction() {
535 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Transaction);
536 this->messageHeader.messageType = messageTypeId;
537 }
538 bool readOnly = false;
539 std::string message;
540 std::vector<std::string> dataspaceUris;
541
542 void encode(avro::Encoder& e) const final {
543 avro::encode(e, readOnly);
544 avro::encode(e, message);
545 avro::encode(e, dataspaceUris);
546 }
547 void decode(avro::Decoder& d) final {
548 avro::decode(d, readOnly);
549 avro::decode(d, message);
550 avro::decode(d, dataspaceUris);
551 }
552 };
553 }
554 }
555 }
556 }
557}
558namespace Energistics {
559 namespace Etp {
560 namespace v12 {
561 namespace Datatypes {
562 enum class AnyArrayType {
563 arrayOfBoolean = 0,
564 arrayOfInt = 1,
565 arrayOfLong = 2,
566 arrayOfFloat = 3,
567 arrayOfDouble = 4,
568 arrayOfString = 5,
569 bytes = 6
570 };
571 }
572 }
573 }
574}
575namespace avro {
576 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::AnyArrayType> {
577 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::AnyArrayType& v) {
578 e.encodeEnum(static_cast<std::size_t>(v));
579 }
580 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::AnyArrayType& v) {
581 v = static_cast<Energistics::Etp::v12::Datatypes::AnyArrayType>(d.decodeEnum());
582 }
583 };
584}
585namespace Energistics {
586 namespace Etp {
587 namespace v12 {
588 namespace Datatypes {
589 enum class AnyLogicalArrayType {
590 arrayOfBoolean = 0,
591 arrayOfInt8 = 1,
592 arrayOfUInt8 = 2,
593 arrayOfInt16LE = 3,
594 arrayOfInt32LE = 4,
595 arrayOfInt64LE = 5,
596 arrayOfUInt16LE = 6,
597 arrayOfUInt32LE = 7,
598 arrayOfUInt64LE = 8,
599 arrayOfFloat32LE = 9,
600 arrayOfDouble64LE = 10,
601 arrayOfInt16BE = 11,
602 arrayOfInt32BE = 12,
603 arrayOfInt64BE = 13,
604 arrayOfUInt16BE = 14,
605 arrayOfUInt32BE = 15,
606 arrayOfUInt64BE = 16,
607 arrayOfFloat32BE = 17,
608 arrayOfDouble64BE = 18,
609 arrayOfString = 19,
610 arrayOfCustom = 20
611 };
612 }
613 }
614 }
615}
616namespace avro {
617 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::AnyLogicalArrayType> {
618 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::AnyLogicalArrayType& v) {
619 e.encodeEnum(static_cast<std::size_t>(v));
620 }
621 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::AnyLogicalArrayType& v) {
622 v = static_cast<Energistics::Etp::v12::Datatypes::AnyLogicalArrayType>(d.decodeEnum());
623 }
624 };
625}
626namespace Energistics {
627 namespace Etp {
628 namespace v12 {
629 namespace Datatypes {
631 std::vector<bool> values;
632 };
633 }
634 }
635 }
636}
637namespace avro {
638 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfBoolean> {
639 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfBoolean& v) {
640 avro::encode(e, v.values);
641 }
642 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfBoolean& v) {
643 avro::decode(d, v.values);
644 }
645 };
646}
647namespace Energistics {
648 namespace Etp {
649 namespace v12 {
650 namespace Datatypes {
652 std::vector<std::string> values;
653 };
654 }
655 }
656 }
657}
658namespace avro {
659 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfBytes> {
660 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfBytes& v) {
661 avro::encode(e, v.values);
662 }
663 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfBytes& v) {
664 avro::decode(d, v.values);
665 }
666 };
667}
668namespace Energistics {
669 namespace Etp {
670 namespace v12 {
671 namespace Datatypes {
673 std::vector<double> values;
674 };
675 }
676 }
677 }
678}
679namespace avro {
680 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfDouble> {
681 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfDouble& v) {
682 avro::encode(e, v.values);
683 }
684 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfDouble& v) {
685 avro::decode(d, v.values);
686 }
687 };
688}
689namespace Energistics {
690 namespace Etp {
691 namespace v12 {
692 namespace Datatypes {
694 std::vector<float> values;
695 };
696 }
697 }
698 }
699}
700namespace avro {
701 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfFloat> {
702 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfFloat& v) {
703 avro::encode(e, v.values);
704 }
705 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfFloat& v) {
706 avro::decode(d, v.values);
707 }
708 };
709}
710namespace Energistics {
711 namespace Etp {
712 namespace v12 {
713 namespace Datatypes {
714 struct ArrayOfInt {
715 std::vector<int32_t> values;
716 };
717 }
718 }
719 }
720}
721namespace avro {
722 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfInt> {
723 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfInt& v) {
724 avro::encode(e, v.values);
725 }
726 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfInt& v) {
727 avro::decode(d, v.values);
728 }
729 };
730}
731namespace Energistics {
732 namespace Etp {
733 namespace v12 {
734 namespace Datatypes {
735 struct ArrayOfLong {
736 std::vector<int64_t> values;
737 };
738 }
739 }
740 }
741}
742namespace avro {
743 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfLong> {
744 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfLong& v) {
745 avro::encode(e, v.values);
746 }
747 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfLong& v) {
748 avro::decode(d, v.values);
749 }
750 };
751}
752namespace Energistics {
753 namespace Etp {
754 namespace v12 {
755 namespace Datatypes {
757 std::vector<std::optional<bool>> values;
758 };
759 }
760 }
761 }
762}
763namespace avro {
764 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfNullableBoolean> {
765 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfNullableBoolean& v) {
766 avro::encode(e, v.values);
767 }
768 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfNullableBoolean& v) {
769 avro::decode(d, v.values);
770 }
771 };
772}
773namespace Energistics {
774 namespace Etp {
775 namespace v12 {
776 namespace Datatypes {
778 std::vector<std::optional<int32_t>> values;
779 };
780 }
781 }
782 }
783}
784namespace avro {
785 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfNullableInt> {
786 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfNullableInt& v) {
787 avro::encode(e, v.values);
788 }
789 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfNullableInt& v) {
790 avro::decode(d, v.values);
791 }
792 };
793}
794namespace Energistics {
795 namespace Etp {
796 namespace v12 {
797 namespace Datatypes {
799 std::vector<std::optional<int64_t>> values;
800 };
801 }
802 }
803 }
804}
805namespace avro {
806 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfNullableLong> {
807 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfNullableLong& v) {
808 avro::encode(e, v.values);
809 }
810 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfNullableLong& v) {
811 avro::decode(d, v.values);
812 }
813 };
814}
815namespace Energistics {
816 namespace Etp {
817 namespace v12 {
818 namespace Datatypes {
820 std::vector<std::string> values;
821 };
822 }
823 }
824 }
825}
826namespace avro {
827 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ArrayOfString> {
828 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ArrayOfString& v) {
829 avro::encode(e, v.values);
830 }
831 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ArrayOfString& v) {
832 avro::decode(d, v.values);
833 }
834 };
835}
836namespace Energistics {
837 namespace Etp {
838 namespace v12 {
839 namespace Protocol {
840 namespace Store {
841 struct DeleteDataObjectsResponse : public ETP_NS::EtpMessage {
842 static constexpr int32_t messageTypeId = 10;
843
844 DeleteDataObjectsResponse() {
845 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Store);
846 this->messageHeader.messageType = messageTypeId;
847 }
848 std::map<std::string, Energistics::Etp::v12::Datatypes::ArrayOfString> deletedUris;
849
850 void encode(avro::Encoder& e) const final {
851 avro::encode(e, deletedUris);
852 }
853 void decode(avro::Decoder& d) final {
854 avro::decode(d, deletedUris);
855 }
856 };
857 }
858 }
859 }
860 }
861}
862namespace Energistics {
863 namespace Etp {
864 namespace v12 {
865 namespace Datatypes {
867 private:
868 std::variant<
875 std::string
876 > value_;
877
878 public:
879 size_t idx() const { return value_.index(); }
880 Energistics::Etp::v12::Datatypes::ArrayOfBoolean const& get_ArrayOfBoolean() const {
881 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfBoolean>(value_);
882 }
883 void set_ArrayOfBoolean(const Energistics::Etp::v12::Datatypes::ArrayOfBoolean& v) {
885 }
886 void set_ArrayOfBoolean(const Energistics::Etp::v12::Datatypes::ArrayOfBoolean&& v) {
887 value_.emplace<Energistics::Etp::v12::Datatypes::ArrayOfBoolean>(std::move(v));
888 }
889 Energistics::Etp::v12::Datatypes::ArrayOfInt const& get_ArrayOfInt() const {
890 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfInt>(value_);
891 }
892 void set_ArrayOfInt(const Energistics::Etp::v12::Datatypes::ArrayOfInt& v) {
894 }
895 void set_ArrayOfInt(const Energistics::Etp::v12::Datatypes::ArrayOfInt&& v) {
896 value_.emplace<Energistics::Etp::v12::Datatypes::ArrayOfInt>(std::move(v));
897 }
898 Energistics::Etp::v12::Datatypes::ArrayOfLong const& get_ArrayOfLong() const {
899 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfLong>(value_);
900 }
901 void set_ArrayOfLong(const Energistics::Etp::v12::Datatypes::ArrayOfLong& v) {
903 }
904 void set_ArrayOfLong(const Energistics::Etp::v12::Datatypes::ArrayOfLong&& v) {
905 value_.emplace<Energistics::Etp::v12::Datatypes::ArrayOfLong>(std::move(v));
906 }
907 Energistics::Etp::v12::Datatypes::ArrayOfFloat const& get_ArrayOfFloat() const {
908 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfFloat>(value_);
909 }
910 void set_ArrayOfFloat(const Energistics::Etp::v12::Datatypes::ArrayOfFloat& v) {
912 }
913 void set_ArrayOfFloat(const Energistics::Etp::v12::Datatypes::ArrayOfFloat&& v) {
914 value_.emplace<Energistics::Etp::v12::Datatypes::ArrayOfFloat>(std::move(v));
915 }
916 Energistics::Etp::v12::Datatypes::ArrayOfDouble const& get_ArrayOfDouble() const {
917 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfDouble>(value_);
918 }
919 void set_ArrayOfDouble(const Energistics::Etp::v12::Datatypes::ArrayOfDouble& v) {
921 }
922 void set_ArrayOfDouble(const Energistics::Etp::v12::Datatypes::ArrayOfDouble&& v) {
923 value_.emplace<Energistics::Etp::v12::Datatypes::ArrayOfDouble>(std::move(v));
924 }
925 Energistics::Etp::v12::Datatypes::ArrayOfString const& get_ArrayOfString() const {
926 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfString>(value_);
927 }
928 void set_ArrayOfString(const Energistics::Etp::v12::Datatypes::ArrayOfString& v) {
930 }
931 void set_ArrayOfString(const Energistics::Etp::v12::Datatypes::ArrayOfString&& v) {
932 value_.emplace<Energistics::Etp::v12::Datatypes::ArrayOfString>(std::move(v));
933 }
934 std::string const& get_bytes() const {
935 return std::get<std::string>(value_);
936 }
937 void set_bytes(const std::string& v) {
938 value_.emplace<std::string>(v);
939 }
940 void set_bytes(const std::string&& v) {
941 value_.emplace<std::string>(std::move(v));
942 }
943 };
944 }
945 }
946 }
947}
948namespace avro {
949 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::AnyArrayitem_t> {
950
951 static void encode(Encoder& e, Energistics::Etp::v12::Datatypes::AnyArrayitem_t v) {
952
953 e.encodeUnionIndex(v.idx());
954 switch (v.idx()) {
955 case 0:
956 avro::encode(e, v.get_ArrayOfBoolean());
957 break;
958 case 1:
959 avro::encode(e, v.get_ArrayOfInt());
960 break;
961 case 2:
962 avro::encode(e, v.get_ArrayOfLong());
963 break;
964 case 3:
965 avro::encode(e, v.get_ArrayOfFloat());
966 break;
967 case 4:
968 avro::encode(e, v.get_ArrayOfDouble());
969 break;
970 case 5:
971 avro::encode(e, v.get_ArrayOfString());
972 break;
973 case 6:
974 avro::encode(e, v.get_bytes());
975 break;
976 }
977 }
978 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::AnyArrayitem_t& v) {
979
980 size_t n = d.decodeUnionIndex();
981 if (n >= 7) { throw avro::Exception("Union index too big"); }
982 switch (n) {
983 case 0:
984 {
985 Energistics::Etp::v12::Datatypes::ArrayOfBoolean vv;
986 avro::decode(d, vv);
987 v.set_ArrayOfBoolean(vv);
988 }
989 break;
990 case 1:
991 {
992 Energistics::Etp::v12::Datatypes::ArrayOfInt vv;
993 avro::decode(d, vv);
994 v.set_ArrayOfInt(std::move(vv));
995 }
996 break;
997 case 2:
998 {
999 Energistics::Etp::v12::Datatypes::ArrayOfLong vv;
1000 avro::decode(d, vv);
1001 v.set_ArrayOfLong(std::move(vv));
1002 }
1003 break;
1004 case 3:
1005 {
1006 Energistics::Etp::v12::Datatypes::ArrayOfFloat vv;
1007 avro::decode(d, vv);
1008 v.set_ArrayOfFloat(std::move(vv));
1009 }
1010 break;
1011 case 4:
1012 {
1013 Energistics::Etp::v12::Datatypes::ArrayOfDouble vv;
1014 avro::decode(d, vv);
1015 v.set_ArrayOfDouble(std::move(vv));
1016 }
1017 break;
1018 case 5:
1019 {
1020 Energistics::Etp::v12::Datatypes::ArrayOfString vv;
1021 avro::decode(d, vv);
1022 v.set_ArrayOfString(std::move(vv));
1023 }
1024 break;
1025 case 6:
1026 {
1027 std::string vv;
1028 avro::decode(d, vv);
1029 v.set_bytes(std::move(vv));
1030 }
1031 break;
1032 }
1033 }
1034 };
1035}
1036
1037namespace Energistics {
1038 namespace Etp {
1039 namespace v12 {
1040 namespace Datatypes {
1044 }
1045 }
1046 }
1047}
1048namespace avro {
1049 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::AnyArray> {
1050 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::AnyArray& v) {
1051 avro::encode(e, v.item);
1052 }
1053 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::AnyArray& v) {
1054 avro::decode(d, v.item);
1055 }
1056 };
1057}
1058namespace Energistics {
1059 namespace Etp {
1060 namespace v12 {
1061 namespace Datatypes {
1063 int64_t start = 0;
1065 };
1066 }
1067 }
1068 }
1069}
1070namespace avro {
1071 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::AnySubarray> {
1072 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::AnySubarray& v) {
1073 avro::encode(e, v.start);
1074 avro::encode(e, v.slice);
1075 }
1076 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::AnySubarray& v) {
1077 avro::decode(d, v.start);
1078 avro::decode(d, v.slice);
1079 }
1080 };
1081}
1082namespace Energistics {
1083 namespace Etp {
1084 namespace v12 {
1085 namespace Datatypes {
1087 std::vector<Energistics::Etp::v12::Datatypes::AnySubarray> slices;
1088 };
1089 }
1090 }
1091 }
1092}
1093namespace avro {
1094 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::AnySparseArray> {
1095 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::AnySparseArray& v) {
1096 avro::encode(e, v.slices);
1097 }
1098 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::AnySparseArray& v) {
1099 avro::decode(d, v.slices);
1100 }
1101 };
1102}
1103namespace Energistics {
1104 namespace Etp {
1105 namespace v12 {
1106 namespace Datatypes {
1107 struct Contact {
1108 std::string organizationName;
1109 std::string contactName;
1110 std::string contactPhone;
1111 std::string contactEmail;
1112 };
1113 }
1114 }
1115 }
1116}
1117namespace avro {
1118 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Contact> {
1119 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Contact& v) {
1120 avro::encode(e, v.organizationName);
1121 avro::encode(e, v.contactName);
1122 avro::encode(e, v.contactPhone);
1123 avro::encode(e, v.contactEmail);
1124 }
1125 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Contact& v) {
1126 avro::decode(d, v.organizationName);
1127 avro::decode(d, v.contactName);
1128 avro::decode(d, v.contactPhone);
1129 avro::decode(d, v.contactEmail);
1130 }
1131 };
1132}
1133namespace Energistics {
1134 namespace Etp {
1135 namespace v12 {
1136 namespace Datatypes {
1137 enum class DataObjectCapabilityKind {
1138 ActiveTimeoutPeriod = 0,
1139 MaxContainedDataObjectCount = 1,
1140 MaxDataObjectSize = 2,
1141 OrphanedChildrenPrunedOnDelete = 3,
1142 SupportsGet = 4,
1143 SupportsPut = 5,
1144 SupportsDelete = 6,
1145 MaxSecondaryIndexCount = 7
1146 };
1147 }
1148 }
1149 }
1150}
1151namespace avro {
1152 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataObjectCapabilityKind> {
1153 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::DataObjectCapabilityKind& v) {
1154 e.encodeEnum(static_cast<std::size_t>(v));
1155 }
1156 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataObjectCapabilityKind& v) {
1157 v = static_cast<Energistics::Etp::v12::Datatypes::DataObjectCapabilityKind>(d.decodeEnum());
1158 }
1159 };
1160}
1161namespace Energistics {
1162 namespace Etp {
1163 namespace v12 {
1164 namespace Datatypes {
1166 private:
1167 std::variant<
1168 std::nullptr_t,
1169 bool,
1170 int32_t,
1171 int64_t,
1172 float,
1173 double,
1174 std::string,
1185 std::vector<std::byte>,
1187 > value_;
1188
1189 public:
1190 size_t idx() const { return value_.index(); }
1191 bool is_null() const { return idx() == 0; }
1192 void set_null() { value_ = nullptr; }
1193 bool get_boolean() const {
1194 return std::get<bool>(value_);
1195 }
1196 void set_boolean(const bool& v) {
1197 value_ = v;
1198 }
1199 int32_t get_int() const {
1200 return std::get<int32_t>(value_);
1201 }
1202 void set_int(const int32_t& v) {
1203 value_ = v;
1204 }
1205 int64_t get_long() const {
1206 return std::get<int64_t>(value_);
1207 }
1208 void set_long(const int64_t& v) {
1209 value_ = v;
1210 }
1211 float get_float() const {
1212 return std::get<float>(value_);
1213 }
1214 void set_float(const float& v) {
1215 value_ = v;
1216 }
1217 double get_double() const {
1218 return std::get<double>(value_);
1219 }
1220 void set_double(const double& v) {
1221 value_ = v;
1222 }
1223 std::string const& get_string() const {
1224 return std::get<std::string>(value_);
1225 }
1226 void set_string(const std::string& v) {
1227 value_ = v;
1228 }
1229 Energistics::Etp::v12::Datatypes::ArrayOfBoolean const& get_ArrayOfBoolean() const {
1230 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfBoolean>(value_);
1231 }
1232 void set_ArrayOfBoolean(const Energistics::Etp::v12::Datatypes::ArrayOfBoolean& v) {
1233 value_ = v;
1234 }
1235 Energistics::Etp::v12::Datatypes::ArrayOfNullableBoolean const& get_ArrayOfNullableBoolean() const {
1236 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfNullableBoolean>(value_);
1237 }
1238 void set_ArrayOfNullableBoolean(const Energistics::Etp::v12::Datatypes::ArrayOfNullableBoolean& v) {
1239 value_ = v;
1240 }
1241 Energistics::Etp::v12::Datatypes::ArrayOfInt const& get_ArrayOfInt() const {
1242 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfInt>(value_);
1243 }
1244 void set_ArrayOfInt(const Energistics::Etp::v12::Datatypes::ArrayOfInt& v) {
1245 value_ = v;
1246 }
1247 Energistics::Etp::v12::Datatypes::ArrayOfNullableInt const& get_ArrayOfNullableInt() const {
1248 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfNullableInt>(value_);
1249 }
1250 void set_ArrayOfNullableInt(const Energistics::Etp::v12::Datatypes::ArrayOfNullableInt& v) {
1251 value_ = v;
1252 }
1253 Energistics::Etp::v12::Datatypes::ArrayOfLong const& get_ArrayOfLong() const {
1254 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfLong>(value_);
1255 }
1256 void set_ArrayOfLong(const Energistics::Etp::v12::Datatypes::ArrayOfLong& v) {
1257 value_ = v;
1258 }
1259 Energistics::Etp::v12::Datatypes::ArrayOfNullableLong const& get_ArrayOfNullableLong() const {
1260 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfNullableLong>(value_);
1261 }
1262 void set_ArrayOfNullableLong(const Energistics::Etp::v12::Datatypes::ArrayOfNullableLong& v) {
1263 value_ = v;
1264 }
1265 Energistics::Etp::v12::Datatypes::ArrayOfFloat const& get_ArrayOfFloat() const {
1266 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfFloat>(value_);
1267 }
1268 void set_ArrayOfFloat(const Energistics::Etp::v12::Datatypes::ArrayOfFloat& v) {
1269 value_ = v;
1270 }
1271 Energistics::Etp::v12::Datatypes::ArrayOfDouble const& get_ArrayOfDouble() const {
1272 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfDouble>(value_);
1273 }
1274 void set_ArrayOfDouble(const Energistics::Etp::v12::Datatypes::ArrayOfDouble& v) {
1275 value_ = v;
1276 }
1277 Energistics::Etp::v12::Datatypes::ArrayOfString const& get_ArrayOfString() const {
1278 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfString>(value_);
1279 }
1280 void set_ArrayOfString(const Energistics::Etp::v12::Datatypes::ArrayOfString& v) {
1281 value_ = v;
1282 }
1283 Energistics::Etp::v12::Datatypes::ArrayOfBytes const& get_ArrayOfBytes() const {
1284 return std::get<Energistics::Etp::v12::Datatypes::ArrayOfBytes>(value_);
1285 }
1286 void set_ArrayOfBytes(const Energistics::Etp::v12::Datatypes::ArrayOfBytes& v) {
1287 value_ = v;
1288 }
1289 std::string get_bytes() const {
1290 const auto& bytes = std::get<std::vector<std::byte>>(value_);
1291 return std::string(reinterpret_cast<const char*>(bytes.data()), bytes.size());
1292
1293 }
1294 void set_bytes(const std::string& v) {
1295 value_ = v;
1296 }
1297 Energistics::Etp::v12::Datatypes::AnySparseArray const& get_AnySparseArray() const {
1298 return std::get<Energistics::Etp::v12::Datatypes::AnySparseArray>(value_);
1299 }
1300 void set_AnySparseArray(const Energistics::Etp::v12::Datatypes::AnySparseArray& v) {
1301 value_ = v;
1302 }
1303 };
1304 }
1305 }
1306 }
1307}
1308namespace avro {
1309 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataValueitem_t> {
1310
1311 static void encode(Encoder& e, Energistics::Etp::v12::Datatypes::DataValueitem_t v) {
1312 e.encodeUnionIndex(v.idx());
1313 switch (v.idx()) {
1314 case 0:
1315 e.encodeNull();
1316 break;
1317 case 1:
1318 avro::encode(e, v.get_boolean());
1319 break;
1320 case 2:
1321 avro::encode(e, v.get_int());
1322 break;
1323 case 3:
1324 avro::encode(e, v.get_long());
1325 break;
1326 case 4:
1327 avro::encode(e, v.get_float());
1328 break;
1329 case 5:
1330 avro::encode(e, v.get_double());
1331 break;
1332 case 6:
1333 avro::encode(e, v.get_string());
1334 break;
1335 case 7:
1336 avro::encode(e, v.get_ArrayOfBoolean());
1337 break;
1338 case 8:
1339 avro::encode(e, v.get_ArrayOfNullableBoolean());
1340 break;
1341 case 9:
1342 avro::encode(e, v.get_ArrayOfInt());
1343 break;
1344 case 10:
1345 avro::encode(e, v.get_ArrayOfNullableInt());
1346 break;
1347 case 11:
1348 avro::encode(e, v.get_ArrayOfLong());
1349 break;
1350 case 12:
1351 avro::encode(e, v.get_ArrayOfNullableLong());
1352 break;
1353 case 13:
1354 avro::encode(e, v.get_ArrayOfFloat());
1355 break;
1356 case 14:
1357 avro::encode(e, v.get_ArrayOfDouble());
1358 break;
1359 case 15:
1360 avro::encode(e, v.get_ArrayOfString());
1361 break;
1362 case 16:
1363 avro::encode(e, v.get_ArrayOfBytes());
1364 break;
1365 case 17:
1366 avro::encode(e, v.get_bytes());
1367 break;
1368 case 18:
1369 avro::encode(e, v.get_AnySparseArray());
1370 break;
1371 }
1372 }
1373 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataValueitem_t& v) {
1374
1375 size_t n = d.decodeUnionIndex();
1376 if (n >= 19) { throw avro::Exception("Union index too big"); }
1377 switch (n) {
1378 case 0:
1379 {
1380 d.decodeNull();
1381 v.set_null();
1382 }
1383 break;
1384 case 1:
1385 {
1386 bool vv;
1387 avro::decode(d, vv);
1388 v.set_boolean(vv);
1389 }
1390 break;
1391 case 2:
1392 {
1393 int32_t vv;
1394 avro::decode(d, vv);
1395 v.set_int(vv);
1396 }
1397 break;
1398 case 3:
1399 {
1400 int64_t vv;
1401 avro::decode(d, vv);
1402 v.set_long(vv);
1403 }
1404 break;
1405 case 4:
1406 {
1407 float vv;
1408 avro::decode(d, vv);
1409 v.set_float(vv);
1410 }
1411 break;
1412 case 5:
1413 {
1414 double vv;
1415 avro::decode(d, vv);
1416 v.set_double(vv);
1417 }
1418 break;
1419 case 6:
1420 {
1421 std::string vv;
1422 avro::decode(d, vv);
1423 v.set_string(vv);
1424 }
1425 break;
1426 case 7:
1427 {
1428 Energistics::Etp::v12::Datatypes::ArrayOfBoolean vv;
1429 avro::decode(d, vv);
1430 v.set_ArrayOfBoolean(vv);
1431 }
1432 break;
1433 case 8:
1434 {
1435 Energistics::Etp::v12::Datatypes::ArrayOfNullableBoolean vv;
1436 avro::decode(d, vv);
1437 v.set_ArrayOfNullableBoolean(vv);
1438 }
1439 break;
1440 case 9:
1441 {
1442 Energistics::Etp::v12::Datatypes::ArrayOfInt vv;
1443 avro::decode(d, vv);
1444 v.set_ArrayOfInt(vv);
1445 }
1446 break;
1447 case 10:
1448 {
1449 Energistics::Etp::v12::Datatypes::ArrayOfNullableInt vv;
1450 avro::decode(d, vv);
1451 v.set_ArrayOfNullableInt(vv);
1452 }
1453 break;
1454 case 11:
1455 {
1456 Energistics::Etp::v12::Datatypes::ArrayOfLong vv;
1457 avro::decode(d, vv);
1458 v.set_ArrayOfLong(vv);
1459 }
1460 break;
1461 case 12:
1462 {
1463 Energistics::Etp::v12::Datatypes::ArrayOfNullableLong vv;
1464 avro::decode(d, vv);
1465 v.set_ArrayOfNullableLong(vv);
1466 }
1467 break;
1468 case 13:
1469 {
1470 Energistics::Etp::v12::Datatypes::ArrayOfFloat vv;
1471 avro::decode(d, vv);
1472 v.set_ArrayOfFloat(vv);
1473 }
1474 break;
1475 case 14:
1476 {
1477 Energistics::Etp::v12::Datatypes::ArrayOfDouble vv;
1478 avro::decode(d, vv);
1479 v.set_ArrayOfDouble(vv);
1480 }
1481 break;
1482 case 15:
1483 {
1484 Energistics::Etp::v12::Datatypes::ArrayOfString vv;
1485 avro::decode(d, vv);
1486 v.set_ArrayOfString(vv);
1487 }
1488 break;
1489 case 16:
1490 {
1491 Energistics::Etp::v12::Datatypes::ArrayOfBytes vv;
1492 avro::decode(d, vv);
1493 v.set_ArrayOfBytes(vv);
1494 }
1495 break;
1496 case 17:
1497 {
1498 std::string vv;
1499 avro::decode(d, vv);
1500 v.set_bytes(vv);
1501 }
1502 break;
1503 case 18:
1504 {
1505 Energistics::Etp::v12::Datatypes::AnySparseArray vv;
1506 avro::decode(d, vv);
1507 v.set_AnySparseArray(vv);
1508 }
1509 break;
1510 }
1511 }
1512 };
1513}
1514
1515namespace Energistics {
1516 namespace Etp {
1517 namespace v12 {
1518 namespace Datatypes {
1522 }
1523 }
1524 }
1525}
1526namespace avro {
1527 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataValue> {
1528 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::DataValue& v) {
1529 avro::encode(e, v.item);
1530 }
1531 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataValue& v) {
1532 avro::decode(d, v.item);
1533 }
1534 };
1535}
1536namespace Energistics {
1537 namespace Etp {
1538 namespace v12 {
1539 namespace Datatypes {
1541 int32_t attributeId = 0;
1543 };
1544 }
1545 }
1546 }
1547}
1548namespace avro {
1549 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataAttribute> {
1550 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::DataAttribute& v) {
1551 avro::encode(e, v.attributeId);
1552 avro::encode(e, v.attributeValue);
1553 }
1554 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataAttribute& v) {
1555 avro::decode(d, v.attributeId);
1556 avro::decode(d, v.attributeValue);
1557 }
1558 };
1559}
1560namespace Energistics {
1561 namespace Etp {
1562 namespace v12 {
1563 namespace Datatypes {
1564 enum class EndpointCapabilityKind {
1565 ActiveTimeoutPeriod = 0,
1566 AuthorizationDetails = 1,
1567 ChangePropagationPeriod = 2,
1568 ChangeRetentionPeriod = 3,
1569 MaxConcurrentMultipart = 4,
1570 MaxDataObjectSize = 5,
1571 MaxPartSize = 6,
1572 MaxSessionClientCount = 7,
1573 MaxSessionGlobalCount = 8,
1574 MaxWebSocketFramePayloadSize = 9,
1575 MaxWebSocketMessagePayloadSize = 10,
1576 MultipartMessageTimeoutPeriod = 11,
1577 ResponseTimeoutPeriod = 12,
1578 RequestSessionTimeoutPeriod = 13,
1579 SessionEstablishmentTimeoutPeriod = 14,
1580 SupportsAlternateRequestUris = 15,
1581 SupportsMessageHeaderExtensions = 16
1582 };
1583 }
1584 }
1585 }
1586}
1587namespace avro {
1588 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::EndpointCapabilityKind> {
1589 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::EndpointCapabilityKind& v) {
1590 e.encodeEnum(static_cast<std::size_t>(v));
1591 }
1592 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::EndpointCapabilityKind& v) {
1593 v = static_cast<Energistics::Etp::v12::Datatypes::EndpointCapabilityKind>(d.decodeEnum());
1594 }
1595 };
1596}
1597namespace Energistics {
1598 namespace Etp {
1599 namespace v12 {
1600 namespace Datatypes {
1601 struct ErrorInfo {
1602 std::string message;
1603 int32_t code = 0;
1604 };
1605 }
1606 }
1607 }
1608}
1609namespace avro {
1610 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ErrorInfo> {
1611 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ErrorInfo& v) {
1612 avro::encode(e, v.message);
1613 avro::encode(e, v.code);
1614 }
1615 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ErrorInfo& v) {
1616 avro::decode(d, v.message);
1617 avro::decode(d, v.code);
1618 }
1619 };
1620}
1621namespace Energistics {
1622 namespace Etp {
1623 namespace v12 {
1624 namespace Protocol {
1625 namespace Core {
1626 struct ProtocolException : public ETP_NS::EtpMessage {
1627 static constexpr int32_t messageTypeId = 1000;
1628
1629 ProtocolException() {
1630 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Core);
1631 this->messageHeader.messageType = messageTypeId;
1632 }
1633 std::optional<Energistics::Etp::v12::Datatypes::ErrorInfo> error;
1634 bool has_error() const { return error.has_value(); }
1635 Energistics::Etp::v12::Datatypes::ErrorInfo get_error() const { return error.value(); }
1636 std::map<std::string, Energistics::Etp::v12::Datatypes::ErrorInfo> errors;
1637
1638 void encode(avro::Encoder& e) const final {
1639 avro::encode(e, error);
1640 avro::encode(e, errors);
1641 }
1642 void decode(avro::Decoder& d) final {
1643 avro::decode(d, error);
1644 avro::decode(d, errors);
1645 }
1646 };
1647 }
1648 }
1649 }
1650 }
1651}
1652namespace Energistics {
1653 namespace Etp {
1654 namespace v12 {
1655 namespace Datatypes {
1657 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> extension;
1658 };
1659 }
1660 }
1661 }
1662}
1663namespace avro {
1664 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::MessageHeaderExtension> {
1665 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::MessageHeaderExtension& v) {
1666 avro::encode(e, v.extension);
1667 }
1668 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::MessageHeaderExtension& v) {
1669 avro::decode(d, v.extension);
1670 }
1671 };
1672}
1673namespace Energistics {
1674 namespace Etp {
1675 namespace v12 {
1676 namespace Datatypes {
1677 enum class ProtocolCapabilityKind {
1678 FrameChangeDetectionPeriod = 0,
1679 MaxDataArraySize = 1,
1680 MaxDataObjectSize = 2,
1681 MaxFrameResponseRowCount = 3,
1682 MaxIndexCount = 4,
1683 MaxRangeChannelCount = 5,
1684 MaxRangeDataItemCount = 6,
1685 MaxResponseCount = 7,
1686 MaxStreamingChannelsSessionCount = 8,
1687 MaxSubscriptionSessionCount = 9,
1688 MaxTransactionCount = 10,
1689 SupportsSecondaryIndexFiltering = 11,
1690 TransactionTimeoutPeriod = 12
1691 };
1692 }
1693 }
1694 }
1695}
1696namespace avro {
1697 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ProtocolCapabilityKind> {
1698 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ProtocolCapabilityKind& v) {
1699 e.encodeEnum(static_cast<std::size_t>(v));
1700 }
1701 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ProtocolCapabilityKind& v) {
1702 v = static_cast<Energistics::Etp::v12::Datatypes::ProtocolCapabilityKind>(d.decodeEnum());
1703 }
1704 };
1705}
1706namespace Energistics {
1707 namespace Etp {
1708 namespace v12 {
1709 namespace Datatypes {
1711 std::string qualifiedType;
1712 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> dataObjectCapabilities;
1713 };
1714 }
1715 }
1716 }
1717}
1718namespace avro {
1719 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::SupportedDataObject> {
1720 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::SupportedDataObject& v) {
1721 avro::encode(e, v.qualifiedType);
1722 avro::encode(e, v.dataObjectCapabilities);
1723 }
1724 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::SupportedDataObject& v) {
1725 avro::decode(d, v.qualifiedType);
1726 avro::decode(d, v.dataObjectCapabilities);
1727 }
1728 };
1729}
1730namespace Energistics {
1731 namespace Etp {
1732 namespace v12 {
1733 namespace Datatypes {
1734 struct Uuid {
1735 std::array<uint8_t, 16> array{ {} };
1736 };
1737 }
1738 }
1739 }
1740}
1741namespace avro {
1742 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Uuid> {
1743 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Uuid& v) {
1744 avro::encode(e, v.array);
1745 }
1746 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Uuid& v) {
1747 avro::decode(d, v.array);
1748 }
1749 };
1750}
1751namespace Energistics {
1752 namespace Etp {
1753 namespace v12 {
1754 namespace Protocol {
1755 namespace StoreNotification {
1756 struct Chunk : public ETP_NS::EtpMessage {
1757 static constexpr int32_t messageTypeId = 9;
1758
1759 Chunk() {
1760 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
1761 this->messageHeader.messageType = messageTypeId;
1762 }
1764 std::string data;
1765 bool final = false;
1766
1767 void encode(avro::Encoder& e) const final {
1768 avro::encode(e, blobId);
1769 avro::encode(e, data);
1770 avro::encode(e, final);
1771 }
1772 void decode(avro::Decoder& d) final {
1773 avro::decode(d, blobId);
1774 avro::decode(d, data);
1775 avro::decode(d, final);
1776 }
1777 };
1778 }
1779 }
1780 }
1781 }
1782}
1783namespace Energistics {
1784 namespace Etp {
1785 namespace v12 {
1786 namespace Protocol {
1787 namespace StoreNotification {
1788 struct ObjectAccessRevoked : public ETP_NS::EtpMessage {
1789 static constexpr int32_t messageTypeId = 5;
1790
1791 ObjectAccessRevoked() {
1792 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
1793 this->messageHeader.messageType = messageTypeId;
1794 }
1795 std::string uri;
1796 int64_t changeTime;
1798
1799 void encode(avro::Encoder& e) const final {
1800 avro::encode(e, uri);
1801 avro::encode(e, changeTime);
1802 avro::encode(e, requestUuid);
1803 }
1804 void decode(avro::Decoder& d) final {
1805 avro::decode(d, uri);
1806 avro::decode(d, changeTime);
1807 avro::decode(d, requestUuid);
1808 }
1809 };
1810 }
1811 }
1812 }
1813 }
1814}
1815namespace Energistics {
1816 namespace Etp {
1817 namespace v12 {
1818 namespace Protocol {
1819 namespace StoreNotification {
1820 struct ObjectDeleted : public ETP_NS::EtpMessage {
1821 static constexpr int32_t messageTypeId = 3;
1822
1823 ObjectDeleted() {
1824 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
1825 this->messageHeader.messageType = messageTypeId;
1826 }
1827 std::string uri;
1828 int64_t changeTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
1830
1831 void encode(avro::Encoder& e) const final {
1832 avro::encode(e, uri);
1833 avro::encode(e, changeTime);
1834 avro::encode(e, requestUuid);
1835 }
1836 void decode(avro::Decoder& d) final {
1837 avro::decode(d, uri);
1838 avro::decode(d, changeTime);
1839 avro::decode(d, requestUuid);
1840 }
1841 };
1842 }
1843 }
1844 }
1845 }
1846}
1847namespace Energistics {
1848 namespace Etp {
1849 namespace v12 {
1850 namespace Protocol {
1851 namespace StoreNotification {
1852 struct SubscriptionEnded : public ETP_NS::EtpMessage {
1853 static constexpr int32_t messageTypeId = 7;
1854
1855 SubscriptionEnded() {
1856 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
1857 this->messageHeader.messageType = messageTypeId;
1858 }
1859 std::string reason;
1861
1862 void encode(avro::Encoder& e) const final {
1863 avro::encode(e, reason);
1864 avro::encode(e, requestUuid);
1865 }
1866 void decode(avro::Decoder& d) final {
1867 avro::decode(d, reason);
1868 avro::decode(d, requestUuid);
1869 }
1870 };
1871 }
1872 }
1873 }
1874 }
1875}
1876namespace Energistics {
1877 namespace Etp {
1878 namespace v12 {
1879 namespace Protocol {
1880 namespace StoreNotification {
1881 struct UnsubscribeNotifications : public ETP_NS::EtpMessage {
1882 static constexpr int32_t messageTypeId = 4;
1883
1884 UnsubscribeNotifications() {
1885 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
1886 this->messageHeader.messageType = messageTypeId;
1887 }
1889
1890 void encode(avro::Encoder& e) const final {
1891 avro::encode(e, requestUuid);
1892 }
1893 void decode(avro::Decoder& d) final {
1894 avro::decode(d, requestUuid);
1895 }
1896 };
1897 }
1898 }
1899 }
1900 }
1901}
1902namespace Energistics {
1903 namespace Etp {
1904 namespace v12 {
1905 namespace Protocol {
1906 namespace Store {
1907 struct Chunk : public ETP_NS::EtpMessage {
1908 static constexpr int32_t messageTypeId = 8;
1909
1910 Chunk() {
1911 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
1912 this->messageHeader.messageType = messageTypeId;
1913 }
1915 std::string data;
1916 bool final = false;
1917
1918 void encode(avro::Encoder& e) const final {
1919 avro::encode(e, blobId);
1920 avro::encode(e, data);
1921 avro::encode(e, final);
1922 }
1923 void decode(avro::Decoder& d) final {
1924 avro::decode(d, blobId);
1925 avro::decode(d, data);
1926 avro::decode(d, final);
1927 }
1928 };
1929 }
1930 }
1931 }
1932 }
1933}
1934namespace Energistics {
1935 namespace Etp {
1936 namespace v12 {
1937 namespace Protocol {
1938 namespace StoreQuery {
1939 struct Chunk : public ETP_NS::EtpMessage {
1940 static constexpr int32_t messageTypeId = 3;
1941
1942 Chunk() {
1943 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
1944 this->messageHeader.messageType = messageTypeId;
1945 }
1947 std::string data;
1948 bool final = false;
1949
1950 void encode(avro::Encoder& e) const final {
1951 avro::encode(e, blobId);
1952 avro::encode(e, data);
1953 avro::encode(e, final);
1954 }
1955 void decode(avro::Decoder& d) final {
1956 avro::decode(d, blobId);
1957 avro::decode(d, data);
1958 avro::decode(d, final);
1959 }
1960 };
1961 }
1962 }
1963 }
1964 }
1965}
1966namespace Energistics {
1967 namespace Etp {
1968 namespace v12 {
1969 namespace Protocol {
1970 namespace Transaction {
1971 struct CommitTransaction : public ETP_NS::EtpMessage {
1972 static constexpr int32_t messageTypeId = 3;
1973
1974 CommitTransaction() {
1975 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Transaction);
1976 this->messageHeader.messageType = messageTypeId;
1977 }
1979
1980 void encode(avro::Encoder& e) const final {
1981 avro::encode(e, transactionUuid);
1982 }
1983 void decode(avro::Decoder& d) final {
1984 avro::decode(d, transactionUuid);
1985 }
1986 };
1987 }
1988 }
1989 }
1990 }
1991}
1992namespace Energistics {
1993 namespace Etp {
1994 namespace v12 {
1995 namespace Protocol {
1996 namespace Transaction {
1997 struct CommitTransactionResponse : public ETP_NS::EtpMessage {
1998 static constexpr int32_t messageTypeId = 5;
1999
2000 CommitTransactionResponse() {
2001 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Transaction);
2002 this->messageHeader.messageType = messageTypeId;
2003 }
2005 bool successful = false;
2006 std::string failureReason;
2007
2008 void encode(avro::Encoder& e) const final {
2009 avro::encode(e, transactionUuid);
2010 avro::encode(e, successful);
2011 avro::encode(e, failureReason);
2012 }
2013 void decode(avro::Decoder& d) final {
2014 avro::decode(d, transactionUuid);
2015 avro::decode(d, successful);
2016 avro::decode(d, failureReason);
2017 }
2018 };
2019 }
2020 }
2021 }
2022 }
2023}
2024namespace Energistics {
2025 namespace Etp {
2026 namespace v12 {
2027 namespace Protocol {
2028 namespace Transaction {
2029 struct RollbackTransaction : public ETP_NS::EtpMessage {
2030 static constexpr int32_t messageTypeId = 4;
2031
2032 RollbackTransaction() {
2033 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Transaction);
2034 this->messageHeader.messageType = messageTypeId;
2035 }
2037
2038 void encode(avro::Encoder& e) const final {
2039 avro::encode(e, transactionUuid);
2040 }
2041 void decode(avro::Decoder& d) final {
2042 avro::decode(d, transactionUuid);
2043 }
2044 };
2045 }
2046 }
2047 }
2048 }
2049}
2050namespace Energistics {
2051 namespace Etp {
2052 namespace v12 {
2053 namespace Protocol {
2054 namespace Transaction {
2055 struct RollbackTransactionResponse : public ETP_NS::EtpMessage {
2056 static constexpr int32_t messageTypeId = 6;
2057
2058 RollbackTransactionResponse() {
2059 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Transaction);
2060 this->messageHeader.messageType = messageTypeId;
2061 }
2063 bool successful = false;
2064 std::string failureReason;
2065
2066 void encode(avro::Encoder& e) const final {
2067 avro::encode(e, transactionUuid);
2068 avro::encode(e, successful);
2069 avro::encode(e, failureReason);
2070 }
2071 void decode(avro::Decoder& d) final {
2072 avro::decode(d, transactionUuid);
2073 avro::decode(d, successful);
2074 avro::decode(d, failureReason);
2075 }
2076 };
2077 }
2078 }
2079 }
2080 }
2081}
2082namespace Energistics {
2083 namespace Etp {
2084 namespace v12 {
2085 namespace Protocol {
2086 namespace Transaction {
2087 struct StartTransactionResponse : public ETP_NS::EtpMessage {
2088 static constexpr int32_t messageTypeId = 2;
2089
2090 StartTransactionResponse() {
2091 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Transaction);
2092 this->messageHeader.messageType = messageTypeId;
2093 }
2095 bool successful = false;
2096 std::string failureReason;
2097
2098 void encode(avro::Encoder& e) const final {
2099 avro::encode(e, transactionUuid);
2100 avro::encode(e, successful);
2101 avro::encode(e, failureReason);
2102 }
2103 void decode(avro::Decoder& d) final {
2104 avro::decode(d, transactionUuid);
2105 avro::decode(d, successful);
2106 avro::decode(d, failureReason);
2107 }
2108 };
2109 }
2110 }
2111 }
2112 }
2113}
2114namespace Energistics {
2115 namespace Etp {
2116 namespace v12 {
2117 namespace Datatypes {
2118 struct Version {
2119 int32_t major = 1;
2120 int32_t minor = 2;
2121 int32_t revision = 0;
2122 int32_t patch = 0;
2123 };
2124 }
2125 }
2126 }
2127}
2128namespace avro {
2129 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Version> {
2130 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Version& v) {
2131 avro::encode(e, v.major);
2132 avro::encode(e, v.minor);
2133 avro::encode(e, v.revision);
2134 avro::encode(e, v.patch);
2135 }
2136 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Version& v) {
2137 avro::decode(d, v.major);
2138 avro::decode(d, v.minor);
2139 avro::decode(d, v.revision);
2140 avro::decode(d, v.patch);
2141 }
2142 };
2143}
2144namespace Energistics {
2145 namespace Etp {
2146 namespace v12 {
2147 namespace Datatypes {
2149 int32_t protocol = 0;
2151 std::string role;
2152 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> protocolCapabilities;
2153 };
2154 }
2155 }
2156 }
2157}
2158namespace avro {
2159 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::SupportedProtocol> {
2160 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::SupportedProtocol& v) {
2161 avro::encode(e, v.protocol);
2162 avro::encode(e, v.protocolVersion);
2163 avro::encode(e, v.role);
2164 avro::encode(e, v.protocolCapabilities);
2165 }
2166 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::SupportedProtocol& v) {
2167 avro::decode(d, v.protocol);
2168 avro::decode(d, v.protocolVersion);
2169 avro::decode(d, v.role);
2170 avro::decode(d, v.protocolCapabilities);
2171 }
2172 };
2173}
2174namespace Energistics {
2175 namespace Etp {
2176 namespace v12 {
2177 namespace Protocol {
2178 namespace Core {
2179 struct OpenSession : public ETP_NS::EtpMessage {
2180 static constexpr int32_t messageTypeId = 2;
2181
2182 OpenSession() {
2183 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Core);
2184 this->messageHeader.messageType = messageTypeId;
2185 }
2186 std::string applicationName;
2187 std::string applicationVersion;
2189 std::vector<Energistics::Etp::v12::Datatypes::SupportedProtocol> supportedProtocols;
2190 std::vector<Energistics::Etp::v12::Datatypes::SupportedDataObject> supportedDataObjects;
2191 std::string supportedCompression;
2192 std::vector<std::string> supportedFormats;
2193 int64_t currentDateTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
2194 int64_t earliestRetainedChangeTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
2196 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> endpointCapabilities;
2197
2198 void encode(avro::Encoder& e) const final {
2199 avro::encode(e, applicationName);
2200 avro::encode(e, applicationVersion);
2201 avro::encode(e, serverInstanceId);
2202 avro::encode(e, supportedProtocols);
2203 avro::encode(e, supportedDataObjects);
2204 avro::encode(e, supportedCompression);
2205 avro::encode(e, supportedFormats);
2206 avro::encode(e, currentDateTime);
2207 avro::encode(e, earliestRetainedChangeTime);
2208 avro::encode(e, sessionId);
2209 avro::encode(e, endpointCapabilities);
2210 }
2211 void decode(avro::Decoder& d) final {
2212 avro::decode(d, applicationName);
2213 avro::decode(d, applicationVersion);
2214 avro::decode(d, serverInstanceId);
2215 avro::decode(d, supportedProtocols);
2216 avro::decode(d, supportedDataObjects);
2217 avro::decode(d, supportedCompression);
2218 avro::decode(d, supportedFormats);
2219 avro::decode(d, currentDateTime);
2220 avro::decode(d, earliestRetainedChangeTime);
2221 avro::decode(d, sessionId);
2222 avro::decode(d, endpointCapabilities);
2223 }
2224 };
2225 }
2226 }
2227 }
2228 }
2229}
2230namespace Energistics {
2231 namespace Etp {
2232 namespace v12 {
2233 namespace Protocol {
2234 namespace Core {
2235 struct RequestSession : public ETP_NS::EtpMessage {
2236 static constexpr int32_t messageTypeId = 1;
2237
2238 RequestSession() {
2239 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Core);
2240 this->messageHeader.messageType = messageTypeId;
2241 }
2242 std::string applicationName;
2243 std::string applicationVersion;
2245 std::vector<Energistics::Etp::v12::Datatypes::SupportedProtocol> requestedProtocols;
2246 std::vector<Energistics::Etp::v12::Datatypes::SupportedDataObject> supportedDataObjects;
2247 std::vector<std::string> supportedCompression;
2248 std::vector<std::string> supportedFormats = { "xml" };
2249 int64_t currentDateTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
2250 int64_t earliestRetainedChangeTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
2251 bool serverAuthorizationRequired = false;
2252 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> endpointCapabilities;
2253
2254 void encode(avro::Encoder& e) const final {
2255 avro::encode(e, applicationName);
2256 avro::encode(e, applicationVersion);
2257 avro::encode(e, clientInstanceId);
2258 avro::encode(e, requestedProtocols);
2259 avro::encode(e, supportedDataObjects);
2260 avro::encode(e, supportedCompression);
2261 avro::encode(e, supportedFormats);
2262 avro::encode(e, currentDateTime);
2263 avro::encode(e, earliestRetainedChangeTime);
2264 avro::encode(e, serverAuthorizationRequired);
2265 avro::encode(e, endpointCapabilities);
2266 }
2267 void decode(avro::Decoder& d) final {
2268 avro::decode(d, applicationName);
2269 avro::decode(d, applicationVersion);
2270 avro::decode(d, clientInstanceId);
2271 avro::decode(d, requestedProtocols);
2272 avro::decode(d, supportedDataObjects);
2273 avro::decode(d, supportedCompression);
2274 avro::decode(d, supportedFormats);
2275 avro::decode(d, currentDateTime);
2276 avro::decode(d, earliestRetainedChangeTime);
2277 avro::decode(d, serverAuthorizationRequired);
2278 avro::decode(d, endpointCapabilities);
2279 }
2280 };
2281 }
2282 }
2283 }
2284 }
2285}
2286
2287namespace Energistics {
2288 namespace Etp {
2289 namespace v12 {
2290 namespace Datatypes {
2292 std::string applicationName;
2293 std::string applicationVersion;
2295 std::vector<std::string> supportedCompression;
2296 std::vector<std::string> supportedEncodings;
2297 std::vector<std::string> supportedFormats;
2298 std::vector<Energistics::Etp::v12::Datatypes::SupportedDataObject> supportedDataObjects;
2299 std::vector<Energistics::Etp::v12::Datatypes::SupportedProtocol> supportedProtocols;
2300 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> endpointCapabilities;
2301 };
2302 }
2303 }
2304 }
2305}
2306namespace avro {
2307 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ServerCapabilities> {
2308 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ServerCapabilities& v) {
2309 avro::encode(e, v.applicationName);
2310 avro::encode(e, v.applicationVersion);
2311 avro::encode(e, v.contactInformation);
2312 avro::encode(e, v.supportedCompression);
2313 avro::encode(e, v.supportedEncodings);
2314 avro::encode(e, v.supportedFormats);
2315 avro::encode(e, v.supportedDataObjects);
2316 avro::encode(e, v.supportedProtocols);
2317 avro::encode(e, v.endpointCapabilities);
2318 }
2319 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ServerCapabilities& v) {
2320 avro::decode(d, v.applicationName);
2321 avro::decode(d, v.applicationVersion);
2322 avro::decode(d, v.contactInformation);
2323 avro::decode(d, v.supportedCompression);
2324 avro::decode(d, v.supportedEncodings);
2325 avro::decode(d, v.supportedFormats);
2326 avro::decode(d, v.supportedDataObjects);
2327 avro::decode(d, v.supportedProtocols);
2328 avro::decode(d, v.endpointCapabilities);
2329 }
2330 };
2331}
2332namespace Energistics {
2333 namespace Etp {
2334 namespace v12 {
2335 namespace Datatypes {
2336 namespace ChannelData {
2338 int64_t sinceChangeTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
2339 std::vector<int64_t> channelIds;
2340 };
2341 }
2342 }
2343 }
2344 }
2345}
2346namespace avro {
2347 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::ChannelChangeRequestInfo> {
2348 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::ChannelChangeRequestInfo& v) {
2349 avro::encode(e, v.sinceChangeTime);
2350 avro::encode(e, v.channelIds);
2351 }
2352 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::ChannelChangeRequestInfo& v) {
2353 avro::decode(d, v.sinceChangeTime);
2354 avro::decode(d, v.channelIds);
2355 }
2356 };
2357}
2358namespace Energistics {
2359 namespace Etp {
2360 namespace v12 {
2361 namespace Datatypes {
2362 namespace ChannelData {
2363 enum class ChannelDataKind {
2364 DateTime = 0,
2365 ElapsedTime = 1,
2366 MeasuredDepth = 2,
2367 PassIndexedDepth = 3,
2368 TrueVerticalDepth = 4,
2369 typeBoolean = 5,
2370 typeInt = 6,
2371 typeLong = 7,
2372 typeFloat = 8,
2373 typeDouble = 9,
2374 typeString = 10,
2375 typeBytes = 11
2376 };
2377 }
2378 }
2379 }
2380 }
2381}
2382namespace avro {
2383 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::ChannelDataKind> {
2384 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::ChannelDataKind& v) {
2385 e.encodeEnum(static_cast<std::size_t>(v));
2386 }
2387 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::ChannelDataKind& v) {
2388 v = static_cast<Energistics::Etp::v12::Datatypes::ChannelData::ChannelDataKind>(d.decodeEnum());
2389 }
2390 };
2391}
2392namespace Energistics {
2393 namespace Etp {
2394 namespace v12 {
2395 namespace Datatypes {
2397 int32_t attributeId = 0;
2398 std::string attributeName;
2399 Energistics::Etp::v12::Datatypes::ChannelData::ChannelDataKind dataKind;
2400 std::string uom;
2401 std::string depthDatum;
2402 std::string attributePropertyKindUri;
2403 std::vector<int32_t> axisVectorLengths;
2404 };
2405 }
2406 }
2407 }
2408}
2409namespace avro {
2410 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::AttributeMetadataRecord> {
2411 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::AttributeMetadataRecord& v) {
2412 avro::encode(e, v.attributeId);
2413 avro::encode(e, v.attributeName);
2414 avro::encode(e, v.dataKind);
2415 avro::encode(e, v.uom);
2416 avro::encode(e, v.depthDatum);
2417 avro::encode(e, v.attributePropertyKindUri);
2418 avro::encode(e, v.axisVectorLengths);
2419 }
2420 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::AttributeMetadataRecord& v) {
2421 avro::decode(d, v.attributeId);
2422 avro::decode(d, v.attributeName);
2423 avro::decode(d, v.dataKind);
2424 avro::decode(d, v.uom);
2425 avro::decode(d, v.depthDatum);
2426 avro::decode(d, v.attributePropertyKindUri);
2427 avro::decode(d, v.axisVectorLengths);
2428 }
2429 };
2430}
2431namespace Energistics {
2432 namespace Etp {
2433 namespace v12 {
2434 namespace Datatypes {
2435 namespace ChannelData {
2436 enum class ChannelIndexKind {
2437 DateTime = 0,
2438 ElapsedTime = 1,
2439 MeasuredDepth = 2,
2440 TrueVerticalDepth = 3,
2441 PassIndexedDepth = 4,
2442 Pressure = 5,
2443 Temperature = 6,
2444 Scalar = 7
2445 };
2446 }
2447 }
2448 }
2449 }
2450}
2451namespace avro {
2452 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::ChannelIndexKind> {
2453 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::ChannelIndexKind& v) {
2454 e.encodeEnum(static_cast<std::size_t>(v));
2455 }
2456 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::ChannelIndexKind& v) {
2457 v = static_cast<Energistics::Etp::v12::Datatypes::ChannelData::ChannelIndexKind>(d.decodeEnum());
2458 }
2459 };
2460}
2461namespace Energistics {
2462 namespace Etp {
2463 namespace v12 {
2464 namespace Datatypes {
2465 namespace ChannelData {
2466 struct FramePoint {
2468 std::vector<Energistics::Etp::v12::Datatypes::DataAttribute> valueAttributes;
2469 };
2470 }
2471 }
2472 }
2473 }
2474}
2475namespace avro {
2476 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::FramePoint> {
2477 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::FramePoint& v) {
2478 avro::encode(e, v.value);
2479 avro::encode(e, v.valueAttributes);
2480 }
2481 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::FramePoint& v) {
2482 avro::decode(d, v.value);
2483 avro::decode(d, v.valueAttributes);
2484 }
2485 };
2486}
2487namespace Energistics {
2488 namespace Etp {
2489 namespace v12 {
2490 namespace Datatypes {
2491 namespace ChannelData {
2492 enum class IndexDirection {
2493 Increasing = 0,
2494 Decreasing = 1,
2495 Unordered = 2
2496 };
2497 }
2498 }
2499 }
2500 }
2501}
2502namespace avro {
2503 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::IndexDirection> {
2504 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::IndexDirection& v) {
2505 e.encodeEnum(static_cast<std::size_t>(v));
2506 }
2507 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::IndexDirection& v) {
2508 v = static_cast<Energistics::Etp::v12::Datatypes::ChannelData::IndexDirection>(d.decodeEnum());
2509 }
2510 };
2511}
2512namespace Energistics {
2513 namespace Etp {
2514 namespace v12 {
2515 namespace Datatypes {
2516 namespace ChannelData {
2517 enum class PassDirection {
2518 Up = 0,
2519 HoldingSteady = 1,
2520 Down = 2
2521 };
2522 }
2523 }
2524 }
2525 }
2526}
2527namespace avro {
2528 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::PassDirection> {
2529 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::PassDirection& v) {
2530 e.encodeEnum(static_cast<std::size_t>(v));
2531 }
2532 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::PassDirection& v) {
2533 v = static_cast<Energistics::Etp::v12::Datatypes::ChannelData::PassDirection>(d.decodeEnum());
2534 }
2535 };
2536}
2537namespace Energistics {
2538 namespace Etp {
2539 namespace v12 {
2540 namespace Datatypes {
2541 namespace ChannelData {
2543 int64_t pass = 0;
2544 Energistics::Etp::v12::Datatypes::ChannelData::PassDirection direction = Energistics::Etp::v12::Datatypes::ChannelData::PassDirection::Up;
2545 double depth = .0;
2546 };
2547 }
2548 }
2549 }
2550 }
2551}
2552namespace avro {
2553 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::PassIndexedDepth> {
2554 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::PassIndexedDepth& v) {
2555 avro::encode(e, v.pass);
2556 avro::encode(e, v.direction);
2557 avro::encode(e, v.depth);
2558 }
2559 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::PassIndexedDepth& v) {
2560 avro::decode(d, v.pass);
2561 avro::decode(d, v.direction);
2562 avro::decode(d, v.depth);
2563 }
2564 };
2565}
2566namespace Energistics {
2567 namespace Etp {
2568 namespace v12 {
2569 namespace Datatypes {
2571 private:
2572 std::variant<
2573 std::nullptr_t,
2574 int64_t,
2575 double,
2577 > value_;
2578
2579 public:
2580 size_t idx() const { return value_.index(); }
2581 bool is_null() const { return idx() == 0; }
2582 void set_null() { value_ = nullptr; }
2583 int64_t get_long() const {
2584 return std::get<int64_t>(value_);
2585 }
2586 void set_long(const int64_t& v) {
2587 value_ = v;
2588 }
2589 double get_double() const {
2590 return std::get<double>(value_);
2591 }
2592 void set_double(const double& v) {
2593 value_ = v;
2594 }
2595 Energistics::Etp::v12::Datatypes::ChannelData::PassIndexedDepth const& get_PassIndexedDepth() const {
2596 return std::get<Energistics::Etp::v12::Datatypes::ChannelData::PassIndexedDepth>(value_);
2597 }
2598 void set_PassIndexedDepth(const Energistics::Etp::v12::Datatypes::ChannelData::PassIndexedDepth& v) {
2599 value_ = v;
2600 }
2601 };
2602 }
2603 }
2604 }
2605}
2606namespace avro {
2607 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::IndexValueitem_t> {
2608
2609 static void encode(Encoder& e, Energistics::Etp::v12::Datatypes::IndexValueitem_t v) {
2610
2611 e.encodeUnionIndex(v.idx());
2612 switch (v.idx()) {
2613 case 0:
2614 e.encodeNull();
2615 break;
2616 case 1:
2617 avro::encode(e, v.get_long());
2618 break;
2619 case 2:
2620 avro::encode(e, v.get_double());
2621 break;
2622 case 3:
2623 avro::encode(e, v.get_PassIndexedDepth());
2624 break;
2625 }
2626 }
2627 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::IndexValueitem_t& v) {
2628
2629 size_t n = d.decodeUnionIndex();
2630 if (n >= 4) { throw avro::Exception("Union index too big"); }
2631 switch (n) {
2632 case 0:
2633 {
2634 d.decodeNull();
2635 v.set_null();
2636 }
2637 break;
2638 case 1:
2639 {
2640 int64_t vv;
2641 avro::decode(d, vv);
2642 v.set_long(vv);
2643 }
2644 break;
2645 case 2:
2646 {
2647 double vv;
2648 avro::decode(d, vv);
2649 v.set_double(vv);
2650 }
2651 break;
2652 case 3:
2653 {
2654 Energistics::Etp::v12::Datatypes::ChannelData::PassIndexedDepth vv;
2655 avro::decode(d, vv);
2656 v.set_PassIndexedDepth(vv);
2657 }
2658 break;
2659 }
2660 }
2661 };
2662}
2663
2664namespace Energistics {
2665 namespace Etp {
2666 namespace v12 {
2667 namespace Datatypes {
2671 }
2672 }
2673 }
2674}
2675namespace avro {
2676 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::IndexValue> {
2677 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::IndexValue& v) {
2678 avro::encode(e, v.item);
2679 }
2680 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::IndexValue& v) {
2681 avro::decode(d, v.item);
2682 }
2683 };
2684}
2685namespace Energistics {
2686 namespace Etp {
2687 namespace v12 {
2688 namespace Datatypes {
2689 namespace ChannelData {
2691 int64_t channelId = 0;
2693 bool dataChanges = false;
2694 std::optional<int32_t> requestLatestIndexCount;
2695 bool has_requestLatestIndexCount() const { return requestLatestIndexCount.has_value(); }
2696 int32_t get_requestLatestIndexCount() const { return requestLatestIndexCount.value(); }
2697 };
2698 }
2699 }
2700 }
2701 }
2702}
2703namespace avro {
2704 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::ChannelSubscribeInfo> {
2705 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::ChannelSubscribeInfo& v) {
2706 avro::encode(e, v.channelId);
2707 avro::encode(e, v.startIndex);
2708 avro::encode(e, v.dataChanges);
2709 avro::encode(e, v.requestLatestIndexCount);
2710 }
2711 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::ChannelSubscribeInfo& v) {
2712 avro::decode(d, v.channelId);
2713 avro::decode(d, v.startIndex);
2714 avro::decode(d, v.dataChanges);
2715 avro::decode(d, v.requestLatestIndexCount);
2716 }
2717 };
2718}
2719namespace Energistics {
2720 namespace Etp {
2721 namespace v12 {
2722 namespace Datatypes {
2723 namespace ChannelData {
2724 struct DataItem {
2725 int64_t channelId = 0;
2726 std::vector<Energistics::Etp::v12::Datatypes::IndexValue> indexes;
2728 std::vector<Energistics::Etp::v12::Datatypes::DataAttribute> valueAttributes;
2729 };
2730 }
2731 }
2732 }
2733 }
2734}
2735namespace avro {
2736 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::DataItem> {
2737 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::DataItem& v) {
2738 avro::encode(e, v.channelId);
2739 avro::encode(e, v.indexes);
2740 avro::encode(e, v.value);
2741 avro::encode(e, v.valueAttributes);
2742 }
2743 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::DataItem& v) {
2744 avro::decode(d, v.channelId);
2745 avro::decode(d, v.indexes);
2746 avro::decode(d, v.value);
2747 avro::decode(d, v.valueAttributes);
2748 }
2749 };
2750}
2751namespace Energistics {
2752 namespace Etp {
2753 namespace v12 {
2754 namespace Datatypes {
2755 namespace ChannelData {
2756 struct FrameRow {
2757 std::vector<Energistics::Etp::v12::Datatypes::IndexValue> indexes;
2758 std::vector<Energistics::Etp::v12::Datatypes::ChannelData::FramePoint> points;
2759 };
2760 }
2761 }
2762 }
2763 }
2764}
2765namespace avro {
2766 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::FrameRow> {
2767 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::FrameRow& v) {
2768 avro::encode(e, v.indexes);
2769 avro::encode(e, v.points);
2770 }
2771 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::FrameRow& v) {
2772 avro::decode(d, v.indexes);
2773 avro::decode(d, v.points);
2774 }
2775 };
2776}
2777namespace Energistics {
2778 namespace Etp {
2779 namespace v12 {
2780 namespace Datatypes {
2781 namespace ChannelData {
2783 int64_t channelId = 0;
2785 };
2786 }
2787 }
2788 }
2789 }
2790}
2791namespace avro {
2792 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::TruncateInfo> {
2793 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::TruncateInfo& v) {
2794 avro::encode(e, v.channelId);
2795 avro::encode(e, v.newEndIndex);
2796 }
2797 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::TruncateInfo& v) {
2798 avro::decode(d, v.channelId);
2799 avro::decode(d, v.newEndIndex);
2800 }
2801 };
2802}
2803namespace Energistics {
2804 namespace Etp {
2805 namespace v12 {
2806 namespace Datatypes {
2807 namespace DataArrayTypes {
2808 struct DataArray {
2809 std::vector<int64_t> dimensions;
2811 };
2812 }
2813 }
2814 }
2815 }
2816}
2817namespace avro {
2818 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArray> {
2819 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArray& v) {
2820 avro::encode(e, v.dimensions);
2821 avro::encode(e, v.data);
2822 }
2823 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArray& v) {
2824 avro::decode(d, v.dimensions);
2825 avro::decode(d, v.data);
2826 }
2827 };
2828}
2829namespace Energistics {
2830 namespace Etp {
2831 namespace v12 {
2832 namespace Protocol {
2833 namespace DataArray {
2834 struct GetDataArraysResponse : public ETP_NS::EtpMessage {
2835 static constexpr int32_t messageTypeId = 1;
2836
2837 GetDataArraysResponse() {
2838 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
2839 this->messageHeader.messageType = messageTypeId;
2840 }
2841 std::map<std::string, Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArray> dataArrays;
2842
2843 void encode(avro::Encoder& e) const final {
2844 avro::encode(e, dataArrays);
2845 }
2846 void decode(avro::Decoder& d) final {
2847 avro::decode(d, dataArrays);
2848 }
2849 };
2850 }
2851 }
2852 }
2853 }
2854}
2855namespace Energistics {
2856 namespace Etp {
2857 namespace v12 {
2858 namespace Protocol {
2859 namespace DataArray {
2860 struct GetDataSubarraysResponse : public ETP_NS::EtpMessage {
2861 static constexpr int32_t messageTypeId = 8;
2862
2863 GetDataSubarraysResponse() {
2864 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
2865 this->messageHeader.messageType = messageTypeId;
2866 }
2867 std::map<std::string, Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArray> dataSubarrays;
2868
2869 void encode(avro::Encoder& e) const final {
2870 avro::encode(e, dataSubarrays);
2871 }
2872 void decode(avro::Decoder& d) final {
2873 avro::decode(d, dataSubarrays);
2874 }
2875 };
2876 }
2877 }
2878 }
2879 }
2880}
2881namespace Energistics {
2882 namespace Etp {
2883 namespace v12 {
2884 namespace Datatypes {
2885 namespace DataArrayTypes {
2887 std::string uri;
2888 std::string pathInResource;
2889 };
2890 }
2891 }
2892 }
2893 }
2894}
2895namespace avro {
2896 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayIdentifier> {
2897 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayIdentifier& v) {
2898 avro::encode(e, v.uri);
2899 avro::encode(e, v.pathInResource);
2900 }
2901 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayIdentifier& v) {
2902 avro::decode(d, v.uri);
2903 avro::decode(d, v.pathInResource);
2904 }
2905 };
2906}
2907namespace Energistics {
2908 namespace Etp {
2909 namespace v12 {
2910 namespace Protocol {
2911 namespace DataArray {
2912 struct GetDataArrayMetadata : public ETP_NS::EtpMessage {
2913 static constexpr int32_t messageTypeId = 6;
2914
2915 GetDataArrayMetadata() {
2916 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
2917 this->messageHeader.messageType = messageTypeId;
2918 }
2919 std::map<std::string, Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayIdentifier> dataArrays;
2920
2921 void encode(avro::Encoder& e) const final {
2922 avro::encode(e, dataArrays);
2923 }
2924 void decode(avro::Decoder& d) final {
2925 avro::decode(d, dataArrays);
2926 }
2927 };
2928 }
2929 }
2930 }
2931 }
2932}
2933namespace Energistics {
2934 namespace Etp {
2935 namespace v12 {
2936 namespace Protocol {
2937 namespace DataArray {
2938 struct GetDataArrays : public ETP_NS::EtpMessage {
2939 static constexpr int32_t messageTypeId = 2;
2940
2941 GetDataArrays() {
2942 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
2943 this->messageHeader.messageType = messageTypeId;
2944 }
2945 std::map<std::string, Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayIdentifier> dataArrays;
2946
2947 void encode(avro::Encoder& e) const final {
2948 avro::encode(e, dataArrays);
2949 }
2950 void decode(avro::Decoder& d) final {
2951 avro::decode(d, dataArrays);
2952 }
2953 };
2954 }
2955 }
2956 }
2957 }
2958}
2959namespace Energistics {
2960 namespace Etp {
2961 namespace v12 {
2962 namespace Datatypes {
2963 namespace DataArrayTypes {
2966 std::vector<int64_t> starts;
2967 std::vector<int64_t> counts;
2968 };
2969 }
2970 }
2971 }
2972 }
2973}
2974namespace avro {
2975 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataArrayTypes::GetDataSubarraysType> {
2976 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::DataArrayTypes::GetDataSubarraysType& v) {
2977 avro::encode(e, v.uid);
2978 avro::encode(e, v.starts);
2979 avro::encode(e, v.counts);
2980 }
2981 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataArrayTypes::GetDataSubarraysType& v) {
2982 avro::decode(d, v.uid);
2983 avro::decode(d, v.starts);
2984 avro::decode(d, v.counts);
2985 }
2986 };
2987}
2988namespace Energistics {
2989 namespace Etp {
2990 namespace v12 {
2991 namespace Protocol {
2992 namespace DataArray {
2993 struct GetDataSubarrays : public ETP_NS::EtpMessage {
2994 static constexpr int32_t messageTypeId = 3;
2995
2996 GetDataSubarrays() {
2997 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
2998 this->messageHeader.messageType = messageTypeId;
2999 }
3000 std::map<std::string, Energistics::Etp::v12::Datatypes::DataArrayTypes::GetDataSubarraysType> dataSubarrays;
3001
3002 void encode(avro::Encoder& e) const final {
3003 avro::encode(e, dataSubarrays);
3004 }
3005 void decode(avro::Decoder& d) final {
3006 avro::decode(d, dataSubarrays);
3007 }
3008
3009 std::string body_to_string() const final {
3010 std::ostringstream oss;
3011 oss << "*************************************************\n"
3012 << "Message Body put in the queue :\n";
3013 for (auto keyVal : dataSubarrays) {
3014 oss << "Key : " << keyVal.first << " Value : Starts ";
3015 for (auto dim : keyVal.second.starts) {
3016 oss << dim << " ";
3017 }
3018 oss << "Counts ";
3019 for (auto dim : keyVal.second.counts) {
3020 oss << dim << " ";
3021 }
3022 oss << "\n" << "URI " << keyVal.second.uid.uri << " Path " << keyVal.second.uid.pathInResource << "\n";
3023 }
3024 oss << "*************************************************";
3025 return oss.str();
3026 }
3027 };
3028 }
3029 }
3030 }
3031 }
3032}
3033namespace Energistics {
3034 namespace Etp {
3035 namespace v12 {
3036 namespace Datatypes {
3037 namespace DataArrayTypes {
3039 std::vector<int64_t> dimensions;
3040 std::vector<int64_t> preferredSubarrayDimensions;
3041 Energistics::Etp::v12::Datatypes::AnyArrayType transportArrayType;
3042 Energistics::Etp::v12::Datatypes::AnyLogicalArrayType logicalArrayType;
3043 int64_t storeLastWrite = 0;
3044 int64_t storeCreated = 0;
3045 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> customData;
3046 };
3047 }
3048 }
3049 }
3050 }
3051}
3052namespace avro {
3053 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayMetadata> {
3054 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayMetadata& v) {
3055 avro::encode(e, v.dimensions);
3056 avro::encode(e, v.preferredSubarrayDimensions);
3057 avro::encode(e, v.transportArrayType);
3058 avro::encode(e, v.logicalArrayType);
3059 avro::encode(e, v.storeLastWrite);
3060 avro::encode(e, v.storeCreated);
3061 avro::encode(e, v.customData);
3062 }
3063 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayMetadata& v) {
3064 avro::decode(d, v.dimensions);
3065 avro::decode(d, v.preferredSubarrayDimensions);
3066 avro::decode(d, v.transportArrayType);
3067 avro::decode(d, v.logicalArrayType);
3068 avro::decode(d, v.storeLastWrite);
3069 avro::decode(d, v.storeCreated);
3070 avro::decode(d, v.customData);
3071 }
3072 };
3073}
3074namespace Energistics {
3075 namespace Etp {
3076 namespace v12 {
3077 namespace Protocol {
3078 namespace DataArray {
3079 struct GetDataArrayMetadataResponse : public ETP_NS::EtpMessage {
3080 static constexpr int32_t messageTypeId = 7;
3081
3082 GetDataArrayMetadataResponse() {
3083 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
3084 this->messageHeader.messageType = messageTypeId;
3085 }
3086 std::map<std::string, Energistics::Etp::v12::Datatypes::DataArrayTypes::DataArrayMetadata> arrayMetadata;
3087
3088 void encode(avro::Encoder& e) const final {
3089 avro::encode(e, arrayMetadata);
3090 }
3091 void decode(avro::Decoder& d) final {
3092 avro::decode(d, arrayMetadata);
3093 }
3094 };
3095 }
3096 }
3097 }
3098 }
3099}
3100namespace Energistics {
3101 namespace Etp {
3102 namespace v12 {
3103 namespace Datatypes {
3104 namespace DataArrayTypes {
3108 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> customData;
3109 };
3110 }
3111 }
3112 }
3113 }
3114}
3115namespace avro {
3116 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataArrayTypes::PutDataArraysType> {
3117 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::DataArrayTypes::PutDataArraysType& v) {
3118 avro::encode(e, v.uid);
3119 avro::encode(e, v.array);
3120 avro::encode(e, v.customData);
3121 }
3122 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataArrayTypes::PutDataArraysType& v) {
3123 avro::decode(d, v.uid);
3124 avro::decode(d, v.array);
3125 avro::decode(d, v.customData);
3126 }
3127 };
3128}
3129namespace Energistics {
3130 namespace Etp {
3131 namespace v12 {
3132 namespace Protocol {
3133 namespace DataArray {
3134 struct PutDataArrays : public ETP_NS::EtpMessage {
3135 static constexpr int32_t messageTypeId = 4;
3136
3137 PutDataArrays() {
3138 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
3139 this->messageHeader.messageType = messageTypeId;
3140 }
3141 std::map<std::string, Energistics::Etp::v12::Datatypes::DataArrayTypes::PutDataArraysType> dataArrays;
3142
3143 void encode(avro::Encoder& e) const final {
3144 avro::encode(e, dataArrays);
3145 }
3146 void decode(avro::Decoder& d) final {
3147 avro::decode(d, dataArrays);
3148 }
3149 };
3150 }
3151 }
3152 }
3153 }
3154}
3155namespace Energistics {
3156 namespace Etp {
3157 namespace v12 {
3158 namespace Datatypes {
3159 namespace DataArrayTypes {
3163 std::vector<int64_t> starts;
3164 std::vector<int64_t> counts;
3165 };
3166 }
3167 }
3168 }
3169 }
3170}
3171namespace avro {
3172 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataArrayTypes::PutDataSubarraysType> {
3173 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::DataArrayTypes::PutDataSubarraysType& v) {
3174 avro::encode(e, v.uid);
3175 avro::encode(e, v.data);
3176 avro::encode(e, v.starts);
3177 avro::encode(e, v.counts);
3178 }
3179 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataArrayTypes::PutDataSubarraysType& v) {
3180 avro::decode(d, v.uid);
3181 avro::decode(d, v.data);
3182 avro::decode(d, v.starts);
3183 avro::decode(d, v.counts);
3184 }
3185 };
3186}
3187namespace Energistics {
3188 namespace Etp {
3189 namespace v12 {
3190 namespace Protocol {
3191 namespace DataArray {
3192 struct PutDataSubarrays : public ETP_NS::EtpMessage {
3193 static constexpr int32_t messageTypeId = 5;
3194
3195 PutDataSubarrays() {
3196 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
3197 this->messageHeader.messageType = messageTypeId;
3198 }
3199 std::map<std::string, Energistics::Etp::v12::Datatypes::DataArrayTypes::PutDataSubarraysType> dataSubarrays;
3200
3201 void encode(avro::Encoder& e) const final {
3202 avro::encode(e, dataSubarrays);
3203 }
3204 void decode(avro::Decoder& d) final {
3205 avro::decode(d, dataSubarrays);
3206 }
3207 };
3208 }
3209 }
3210 }
3211 }
3212}
3213namespace Energistics {
3214 namespace Etp {
3215 namespace v12 {
3216 namespace Datatypes {
3217 namespace DataArrayTypes {
3222 }
3223 }
3224 }
3225 }
3226}
3227namespace avro {
3228 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::DataArrayTypes::PutUninitializedDataArrayType> {
3230 avro::encode(e, v.uid);
3231 avro::encode(e, v.metadata);
3232 }
3233 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::DataArrayTypes::PutUninitializedDataArrayType& v) {
3234 avro::decode(d, v.uid);
3235 avro::decode(d, v.metadata);
3236 }
3237 };
3238}
3239namespace Energistics {
3240 namespace Etp {
3241 namespace v12 {
3242 namespace Protocol {
3243 namespace DataArray {
3244 struct PutUninitializedDataArrays : public ETP_NS::EtpMessage {
3245 static constexpr int32_t messageTypeId = 9;
3246
3247 PutUninitializedDataArrays() {
3248 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataArray);
3249 this->messageHeader.messageType = messageTypeId;
3250 }
3251 std::map<std::string, Energistics::Etp::v12::Datatypes::DataArrayTypes::PutUninitializedDataArrayType> dataArrays;
3252
3253 void encode(avro::Encoder& e) const final {
3254 avro::encode(e, dataArrays);
3255 }
3256 void decode(avro::Decoder& d) final {
3257 avro::decode(d, dataArrays);
3258 }
3259 };
3260 }
3261 }
3262 }
3263 }
3264}
3265namespace Energistics {
3266 namespace Etp {
3267 namespace v12 {
3268 namespace Datatypes {
3269 namespace Object {
3270 enum class ActiveStatusKind {
3271 Active = 0,
3272 Inactive = 1
3273 };
3274 }
3275 }
3276 }
3277 }
3278}
3279namespace avro {
3280 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind> {
3281 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind& v) {
3282 e.encodeEnum(static_cast<std::size_t>(v));
3283 }
3284 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind& v) {
3285 v = static_cast<Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind>(d.decodeEnum());
3286 }
3287 };
3288}
3289namespace Energistics {
3290 namespace Etp {
3291 namespace v12 {
3292 namespace Datatypes {
3293 namespace ChannelData {
3295 std::string uri;
3296 std::string channelName;
3297 Energistics::Etp::v12::Datatypes::ChannelData::ChannelDataKind dataKind = Energistics::Etp::v12::Datatypes::ChannelData::ChannelDataKind::DateTime;
3298 std::string uom;
3299 std::string depthDatum;
3300 std::string channelPropertyKindUri;
3301 Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind status = Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind::Active;
3302 std::string source;
3303 std::vector<int32_t> axisVectorLengths;
3304 std::vector<Energistics::Etp::v12::Datatypes::AttributeMetadataRecord> attributeMetadata;
3305 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> customData;
3306 };
3307 }
3308 }
3309 }
3310 }
3311}
3312namespace avro {
3313 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::FrameChannelMetadataRecord> {
3314 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::FrameChannelMetadataRecord& v) {
3315 avro::encode(e, v.uri);
3316 avro::encode(e, v.channelName);
3317 avro::encode(e, v.dataKind);
3318 avro::encode(e, v.uom);
3319 avro::encode(e, v.depthDatum);
3320 avro::encode(e, v.channelPropertyKindUri);
3321 avro::encode(e, v.status);
3322 avro::encode(e, v.source);
3323 avro::encode(e, v.axisVectorLengths);
3324 avro::encode(e, v.attributeMetadata);
3325 avro::encode(e, v.customData);
3326 }
3327 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::FrameChannelMetadataRecord& v) {
3328 avro::decode(d, v.uri);
3329 avro::decode(d, v.channelName);
3330 avro::decode(d, v.dataKind);
3331 avro::decode(d, v.uom);
3332 avro::decode(d, v.depthDatum);
3333 avro::decode(d, v.channelPropertyKindUri);
3334 avro::decode(d, v.status);
3335 avro::decode(d, v.source);
3336 avro::decode(d, v.axisVectorLengths);
3337 avro::decode(d, v.attributeMetadata);
3338 avro::decode(d, v.customData);
3339 }
3340 };
3341}
3342namespace Energistics {
3343 namespace Etp {
3344 namespace v12 {
3345 namespace Datatypes {
3346 namespace Object {
3347 enum class ContextScopeKind {
3348 self = 0,
3349 sources = 1,
3350 targets = 2,
3351 sourcesOrSelf = 3,
3352 targetsOrSelf = 4
3353 };
3354 }
3355 }
3356 }
3357 }
3358}
3359namespace avro {
3360 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::ContextScopeKind> {
3361 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::ContextScopeKind& v) {
3362 e.encodeEnum(static_cast<std::size_t>(v));
3363 }
3364 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::ContextScopeKind& v) {
3365 v = static_cast<Energistics::Etp::v12::Datatypes::Object::ContextScopeKind>(d.decodeEnum());
3366 }
3367 };
3368}
3369namespace Energistics {
3370 namespace Etp {
3371 namespace v12 {
3372 namespace Datatypes {
3373 namespace Object {
3374 struct Dataspace {
3375 std::string uri;
3376 std::string path;
3377 int64_t storeLastWrite = 0;
3378 int64_t storeCreated = 0;
3379 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> customData;
3380 };
3381 }
3382 }
3383 }
3384 }
3385}
3386namespace avro {
3387 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::Dataspace> {
3388 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::Dataspace& v) {
3389 avro::encode(e, v.uri);
3390 avro::encode(e, v.path);
3391 avro::encode(e, v.storeLastWrite);
3392 avro::encode(e, v.storeCreated);
3393 avro::encode(e, v.customData);
3394 }
3395 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::Dataspace& v) {
3396 avro::decode(d, v.uri);
3397 avro::decode(d, v.path);
3398 avro::decode(d, v.storeLastWrite);
3399 avro::decode(d, v.storeCreated);
3400 avro::decode(d, v.customData);
3401 }
3402 };
3403}
3404namespace Energistics {
3405 namespace Etp {
3406 namespace v12 {
3407 namespace Protocol {
3408 namespace Dataspace {
3409 struct GetDataspacesResponse : public ETP_NS::EtpMessage {
3410 static constexpr int32_t messageTypeId = 2;
3411
3412 GetDataspacesResponse() {
3413 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Dataspace);
3414 this->messageHeader.messageType = messageTypeId;
3415 }
3416 std::vector<Energistics::Etp::v12::Datatypes::Object::Dataspace> dataspaces;
3417
3418 void encode(avro::Encoder& e) const final {
3419 avro::encode(e, dataspaces);
3420 }
3421 void decode(avro::Decoder& d) final {
3422 avro::decode(d, dataspaces);
3423 }
3424 };
3425 }
3426 }
3427 }
3428 }
3429}
3430namespace Energistics {
3431 namespace Etp {
3432 namespace v12 {
3433 namespace Protocol {
3434 namespace Dataspace {
3435 struct PutDataspaces : public ETP_NS::EtpMessage {
3436 static constexpr int32_t messageTypeId = 3;
3437
3438 PutDataspaces() {
3439 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Dataspace);
3440 this->messageHeader.messageType = messageTypeId;
3441 }
3442 std::map<std::string, Energistics::Etp::v12::Datatypes::Object::Dataspace> dataspaces;
3443
3444 void encode(avro::Encoder& e) const final {
3445 avro::encode(e, dataspaces);
3446 }
3447 void decode(avro::Decoder& d) final {
3448 avro::decode(d, dataspaces);
3449 }
3450 };
3451 }
3452 }
3453 }
3454 }
3455}
3456namespace Energistics {
3457 namespace Etp {
3458 namespace v12 {
3459 namespace Protocol {
3460 namespace CoreOSDU {
3461 struct ResumeSession : public ETP_NS::EtpMessage {
3462 static constexpr int32_t messageTypeId = 1;
3463
3464 ResumeSession() {
3465 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::CoreOSDU);
3466 this->messageHeader.messageType = messageTypeId;
3467 }
3468 std::string applicationName;
3469 std::string applicationVersion;
3471 int64_t currentDateTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
3473
3474 void encode(avro::Encoder& e) const final {
3475 avro::encode(e, applicationName);
3476 avro::encode(e, applicationVersion);
3477 avro::encode(e, clientInstanceId);
3478 avro::encode(e, currentDateTime);
3479 avro::encode(e, sessionId);
3480 }
3481 void decode(avro::Decoder& d) final {
3482 avro::decode(d, applicationName);
3483 avro::decode(d, applicationVersion);
3484 avro::decode(d, clientInstanceId);
3485 avro::decode(d, currentDateTime);
3486 avro::decode(d, sessionId);
3487 }
3488 };
3489 }
3490 }
3491 }
3492 }
3493}
3494namespace Energistics {
3495 namespace Etp {
3496 namespace v12 {
3497 namespace Protocol {
3498 namespace CoreOSDU {
3499 struct ResumeSessionResponse : public ETP_NS::EtpMessage {
3500 static constexpr int32_t messageTypeId = 2;
3501
3502 ResumeSessionResponse() {
3503 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::CoreOSDU);
3504 this->messageHeader.messageType = messageTypeId;
3505 }
3506 std::string applicationName;
3507 std::string applicationVersion;
3509 int64_t currentDateTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
3511 int64_t earliestRetainedChangeTime = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
3512
3513 void encode(avro::Encoder& e) const final {
3514 avro::encode(e, applicationName);
3515 avro::encode(e, applicationVersion);
3516 avro::encode(e, serverInstanceId);
3517 avro::encode(e, currentDateTime);
3518 avro::encode(e, sessionId);
3519 avro::encode(e, earliestRetainedChangeTime);
3520 }
3521 void decode(avro::Decoder& d) final {
3522 avro::decode(d, applicationName);
3523 avro::decode(d, applicationVersion);
3524 avro::decode(d, serverInstanceId);
3525 avro::decode(d, currentDateTime);
3526 avro::decode(d, sessionId);
3527 avro::decode(d, earliestRetainedChangeTime);
3528 }
3529 };
3530 }
3531 }
3532 }
3533 }
3534}
3535namespace Energistics {
3536 namespace Etp {
3537 namespace v12 {
3538 namespace Protocol {
3539 namespace StoreOSDU {
3540 struct CopyDataObjectsByValue : public ETP_NS::EtpMessage {
3541 static constexpr int32_t messageTypeId = 1;
3542
3543 CopyDataObjectsByValue() {
3544 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreOSDU);
3545 this->messageHeader.messageType = messageTypeId;
3546 }
3547 std::string uri;
3548 int32_t sourcesDepth = 0;
3549 std::vector<std::string> dataObjectTypes;
3550
3551 void encode(avro::Encoder& e) const final {
3552 avro::encode(e, uri);
3553 avro::encode(e, sourcesDepth);
3554 avro::encode(e, dataObjectTypes);
3555 }
3556 void decode(avro::Decoder& d) final {
3557 avro::decode(d, uri);
3558 avro::decode(d, sourcesDepth);
3559 avro::decode(d, dataObjectTypes);
3560 }
3561 };
3562 }
3563 }
3564 }
3565 }
3566}
3567namespace Energistics {
3568 namespace Etp {
3569 namespace v12 {
3570 namespace Protocol {
3571 namespace StoreOSDU {
3572 struct CopyDataObjectsByValueResponse : public ETP_NS::EtpMessage {
3573 static constexpr int32_t messageTypeId = 2;
3574
3575 CopyDataObjectsByValueResponse() {
3576 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreOSDU);
3577 this->messageHeader.messageType = messageTypeId;
3578 }
3579 std::vector<std::string> copiedDataObjects;
3580
3581 void encode(avro::Encoder& e) const final {
3582 avro::encode(e, copiedDataObjects);
3583 }
3584 void decode(avro::Decoder& d) final {
3585 avro::decode(d, copiedDataObjects);
3586 }
3587 };
3588 }
3589 }
3590 }
3591 }
3592}
3593namespace Energistics {
3594 namespace Etp {
3595 namespace v12 {
3596 namespace Protocol {
3597 namespace DataspaceOSDU {
3598 struct GetDataspaceInfo : public ETP_NS::EtpMessage {
3599 static constexpr int32_t messageTypeId = 1;
3600
3601 GetDataspaceInfo() {
3602 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataspaceOSDU);
3603 this->messageHeader.messageType = messageTypeId;
3604 }
3605 std::map<std::string, std::string> uris;
3606
3607 void encode(avro::Encoder& e) const final {
3608 avro::encode(e, uris);
3609 }
3610 void decode(avro::Decoder& d) final {
3611 avro::decode(d, uris);
3612 }
3613 };
3614 }
3615 }
3616 }
3617 }
3618}
3619namespace Energistics {
3620 namespace Etp {
3621 namespace v12 {
3622 namespace Protocol {
3623 namespace DataspaceOSDU {
3624 struct GetDataspaceInfoResponse : public ETP_NS::EtpMessage {
3625 static constexpr int32_t messageTypeId = 2;
3626
3627 GetDataspaceInfoResponse() {
3628 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataspaceOSDU);
3629 this->messageHeader.messageType = messageTypeId;
3630 }
3631 std::map<std::string, Energistics::Etp::v12::Datatypes::Object::Dataspace> dataspaces;
3632
3633 void encode(avro::Encoder& e) const final {
3634 avro::encode(e, dataspaces);
3635 }
3636 void decode(avro::Decoder& d) final {
3637 avro::decode(d, dataspaces);
3638 }
3639 };
3640 }
3641 }
3642 }
3643 }
3644}
3645namespace Energistics {
3646 namespace Etp {
3647 namespace v12 {
3648 namespace Protocol {
3649 namespace DataspaceOSDU {
3650 struct CopyDataspacesContent : public ETP_NS::EtpMessage {
3651 static constexpr int32_t messageTypeId = 3;
3652
3653 CopyDataspacesContent() {
3654 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataspaceOSDU);
3655 this->messageHeader.messageType = messageTypeId;
3656 }
3657 std::map<std::string, std::string> dataspaces;
3658 std::string targetDataspace;
3659
3660 void encode(avro::Encoder& e) const final {
3661 avro::encode(e, dataspaces);
3662 avro::encode(e, targetDataspace);
3663 }
3664 void decode(avro::Decoder& d) final {
3665 avro::decode(d, dataspaces);
3666 avro::decode(d, targetDataspace);
3667 }
3668 };
3669 }
3670 }
3671 }
3672 }
3673}
3674namespace Energistics {
3675 namespace Etp {
3676 namespace v12 {
3677 namespace Protocol {
3678 namespace DataspaceOSDU {
3679 struct CopyDataspacesContentResponse : public ETP_NS::EtpMessage {
3680 static constexpr int32_t messageTypeId = 4;
3681
3682 CopyDataspacesContentResponse() {
3683 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataspaceOSDU);
3684 this->messageHeader.messageType = messageTypeId;
3685 }
3686 std::map<std::string, std::string> success;
3687
3688 void encode(avro::Encoder& e) const final {
3689 avro::encode(e, success);
3690 }
3691 void decode(avro::Decoder& d) final {
3692 avro::decode(d, success);
3693 }
3694 };
3695 }
3696 }
3697 }
3698 }
3699}
3700namespace Energistics {
3701 namespace Etp {
3702 namespace v12 {
3703 namespace Protocol {
3704 namespace DataspaceOSDU {
3705 struct LockDataspaces : public ETP_NS::EtpMessage {
3706 static constexpr int32_t messageTypeId = 5;
3707
3708 LockDataspaces() {
3709 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataspaceOSDU);
3710 this->messageHeader.messageType = messageTypeId;
3711 }
3712 std::map<std::string, std::string> uris;
3713 bool lock;
3714
3715 void encode(avro::Encoder& e) const final {
3716 avro::encode(e, uris);
3717 avro::encode(e, lock);
3718 }
3719 void decode(avro::Decoder& d) final {
3720 avro::decode(d, uris);
3721 avro::decode(d, lock);
3722 }
3723 };
3724 }
3725 }
3726 }
3727 }
3728}
3729namespace Energistics {
3730 namespace Etp {
3731 namespace v12 {
3732 namespace Protocol {
3733 namespace DataspaceOSDU {
3734 struct LockDataspacesResponse : public ETP_NS::EtpMessage {
3735 static constexpr int32_t messageTypeId = 6;
3736
3737 LockDataspacesResponse() {
3738 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataspaceOSDU);
3739 this->messageHeader.messageType = messageTypeId;
3740 }
3741 std::map<std::string, std::string> success;
3742
3743 void encode(avro::Encoder& e) const final {
3744 avro::encode(e, success);
3745 }
3746 void decode(avro::Decoder& d) final {
3747 avro::decode(d, success);
3748 }
3749 };
3750 }
3751 }
3752 }
3753 }
3754}
3755namespace Energistics {
3756 namespace Etp {
3757 namespace v12 {
3758 namespace Protocol {
3759 namespace DataspaceOSDU {
3760 struct CopyToDataspace : public ETP_NS::EtpMessage {
3761 static constexpr int32_t messageTypeId = 7;
3762
3763 CopyToDataspace() {
3764 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataspaceOSDU);
3765 this->messageHeader.messageType = messageTypeId;
3766 }
3767 std::map<std::string, std::string> uris;
3768 std::string dataspaceUri;
3769
3770 void encode(avro::Encoder& e) const final {
3771 avro::encode(e, uris);
3772 avro::encode(e, dataspaceUri);
3773 }
3774 void decode(avro::Decoder& d) final {
3775 avro::decode(d, uris);
3776 avro::decode(d, dataspaceUri);
3777 }
3778 };
3779 }
3780 }
3781 }
3782 }
3783}
3784namespace Energistics {
3785 namespace Etp {
3786 namespace v12 {
3787 namespace Protocol {
3788 namespace DataspaceOSDU {
3789 struct CopyToDataspaceResponse : public ETP_NS::EtpMessage {
3790 static constexpr int32_t messageTypeId = 8;
3791
3792 CopyToDataspaceResponse() {
3793 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DataspaceOSDU);
3794 this->messageHeader.messageType = messageTypeId;
3795 }
3796 std::map<std::string, std::string> success;
3797
3798 void encode(avro::Encoder& e) const final {
3799 avro::encode(e, success);
3800 }
3801 void decode(avro::Decoder& d) final {
3802 avro::decode(d, success);
3803 }
3804 };
3805 }
3806 }
3807 }
3808 }
3809}
3810namespace Energistics {
3811 namespace Etp {
3812 namespace v12 {
3813 namespace Datatypes {
3814 namespace Object {
3816 std::string uri;
3817 int64_t deletedTime = 0;
3818 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> customData;
3819 };
3820 }
3821 }
3822 }
3823 }
3824}
3825namespace avro {
3826 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::DeletedResource> {
3827 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::DeletedResource& v) {
3828 avro::encode(e, v.uri);
3829 avro::encode(e, v.deletedTime);
3830 avro::encode(e, v.customData);
3831 }
3832 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::DeletedResource& v) {
3833 avro::decode(d, v.uri);
3834 avro::decode(d, v.deletedTime);
3835 avro::decode(d, v.customData);
3836 }
3837 };
3838}
3839namespace Energistics {
3840 namespace Etp {
3841 namespace v12 {
3842 namespace Protocol {
3843 namespace Discovery {
3844 struct GetDeletedResourcesResponse : public ETP_NS::EtpMessage {
3845 static constexpr int32_t messageTypeId = 6;
3846
3847 GetDeletedResourcesResponse() {
3848 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Discovery);
3849 this->messageHeader.messageType = messageTypeId;
3850 }
3851 std::vector<Energistics::Etp::v12::Datatypes::Object::DeletedResource> deletedResources;
3852
3853 void encode(avro::Encoder& e) const final {
3854 avro::encode(e, deletedResources);
3855 }
3856 void decode(avro::Decoder& d) final {
3857 avro::decode(d, deletedResources);
3858 }
3859 };
3860 }
3861 }
3862 }
3863 }
3864}
3865namespace Energistics {
3866 namespace Etp {
3867 namespace v12 {
3868 namespace Datatypes {
3869 namespace Object {
3873 std::string uom;
3874 std::string depthDatum;
3875 };
3876 }
3877 }
3878 }
3879 }
3880}
3881namespace avro {
3882 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::IndexInterval> {
3883 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::IndexInterval& v) {
3884 avro::encode(e, v.startIndex);
3885 avro::encode(e, v.endIndex);
3886 avro::encode(e, v.uom);
3887 avro::encode(e, v.depthDatum);
3888 }
3889 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::IndexInterval& v) {
3890 avro::decode(d, v.startIndex);
3891 avro::decode(d, v.endIndex);
3892 avro::decode(d, v.uom);
3893 avro::decode(d, v.depthDatum);
3894 }
3895 };
3896}
3897namespace Energistics {
3898 namespace Etp {
3899 namespace v12 {
3900 namespace Datatypes {
3901 namespace ChannelData {
3903 std::vector<int64_t> channelIds;
3905 std::vector<Energistics::Etp::v12::Datatypes::Object::IndexInterval> secondaryIntervals;
3906 };
3907 }
3908 }
3909 }
3910 }
3911}
3912namespace avro {
3913 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::ChannelRangeInfo> {
3914 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::ChannelRangeInfo& v) {
3915 avro::encode(e, v.channelIds);
3916 avro::encode(e, v.interval);
3917 avro::encode(e, v.secondaryIntervals);
3918 }
3919 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::ChannelRangeInfo& v) {
3920 avro::decode(d, v.channelIds);
3921 avro::decode(d, v.interval);
3922 avro::decode(d, v.secondaryIntervals);
3923 }
3924 };
3925}
3926namespace Energistics {
3927 namespace Etp {
3928 namespace v12 {
3929 namespace Datatypes {
3930 namespace ChannelData {
3932 Energistics::Etp::v12::Datatypes::ChannelData::ChannelIndexKind indexKind;
3934 Energistics::Etp::v12::Datatypes::ChannelData::IndexDirection direction;
3935 std::string name;
3936 std::string uom;
3937 std::string depthDatum;
3938 std::string indexPropertyKindUri;
3939 bool filterable = false;
3940 };
3941 }
3942 }
3943 }
3944 }
3945}
3946namespace avro {
3947 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::IndexMetadataRecord> {
3948 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::IndexMetadataRecord& v) {
3949 avro::encode(e, v.indexKind);
3950 avro::encode(e, v.interval);
3951 avro::encode(e, v.direction);
3952 avro::encode(e, v.name);
3953 avro::encode(e, v.uom);
3954 avro::encode(e, v.depthDatum);
3955 avro::encode(e, v.indexPropertyKindUri);
3956 avro::encode(e, v.filterable);
3957 }
3958 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::IndexMetadataRecord& v) {
3959 avro::decode(d, v.indexKind);
3960 avro::decode(d, v.interval);
3961 avro::decode(d, v.direction);
3962 avro::decode(d, v.name);
3963 avro::decode(d, v.uom);
3964 avro::decode(d, v.depthDatum);
3965 avro::decode(d, v.indexPropertyKindUri);
3966 avro::decode(d, v.filterable);
3967 }
3968 };
3969}
3970namespace Energistics {
3971 namespace Etp {
3972 namespace v12 {
3973 namespace Datatypes {
3974 namespace ChannelData {
3976 std::string uri;
3977 int64_t id = 0;
3978 std::vector<Energistics::Etp::v12::Datatypes::ChannelData::IndexMetadataRecord> indexes;
3979 std::string channelName;
3980 Energistics::Etp::v12::Datatypes::ChannelData::ChannelDataKind dataKind = Energistics::Etp::v12::Datatypes::ChannelData::ChannelDataKind::DateTime;
3981 std::string uom;
3982 std::string depthDatum;
3983 std::string channelClassUri;
3984 Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind status = Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind::Active;
3985 std::string source;
3986 std::vector<int32_t> axisVectorLengths;
3987 std::vector<Energistics::Etp::v12::Datatypes::AttributeMetadataRecord> attributeMetadata;
3988 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> customData;
3989 };
3990 }
3991 }
3992 }
3993 }
3994}
3995namespace avro {
3996 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::ChannelMetadataRecord> {
3997 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::ChannelMetadataRecord& v) {
3998 avro::encode(e, v.uri);
3999 avro::encode(e, v.id);
4000 avro::encode(e, v.indexes);
4001 avro::encode(e, v.channelName);
4002 avro::encode(e, v.dataKind);
4003 avro::encode(e, v.uom);
4004 avro::encode(e, v.depthDatum);
4005 avro::encode(e, v.channelClassUri);
4006 avro::encode(e, v.status);
4007 avro::encode(e, v.source);
4008 avro::encode(e, v.axisVectorLengths);
4009 avro::encode(e, v.attributeMetadata);
4010 avro::encode(e, v.customData);
4011 }
4012 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::ChannelMetadataRecord& v) {
4013 avro::decode(d, v.uri);
4014 avro::decode(d, v.id);
4015 avro::decode(d, v.indexes);
4016 avro::decode(d, v.channelName);
4017 avro::decode(d, v.dataKind);
4018 avro::decode(d, v.uom);
4019 avro::decode(d, v.depthDatum);
4020 avro::decode(d, v.channelClassUri);
4021 avro::decode(d, v.status);
4022 avro::decode(d, v.source);
4023 avro::decode(d, v.axisVectorLengths);
4024 avro::decode(d, v.attributeMetadata);
4025 avro::decode(d, v.customData);
4026 }
4027 };
4028}
4029namespace Energistics {
4030 namespace Etp {
4031 namespace v12 {
4032 namespace Datatypes {
4033 namespace ChannelData {
4036 bool preferRealtime = false;
4037 bool dataChanges = false;
4038 };
4039 }
4040 }
4041 }
4042 }
4043}
4044namespace avro {
4045 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::ChannelData::OpenChannelInfo> {
4046 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::ChannelData::OpenChannelInfo& v) {
4047 avro::encode(e, v.metadata);
4048 avro::encode(e, v.preferRealtime);
4049 avro::encode(e, v.dataChanges);
4050 }
4051 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::ChannelData::OpenChannelInfo& v) {
4052 avro::decode(d, v.metadata);
4053 avro::decode(d, v.preferRealtime);
4054 avro::decode(d, v.dataChanges);
4055 }
4056 };
4057}
4058namespace Energistics {
4059 namespace Etp {
4060 namespace v12 {
4061 namespace Datatypes {
4062 namespace Object {
4064 int64_t changeTime = 0;
4066 };
4067 }
4068 }
4069 }
4070 }
4071}
4072namespace avro {
4073 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::ChangeAnnotation> {
4074 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::ChangeAnnotation& v) {
4075 avro::encode(e, v.changeTime);
4076 avro::encode(e, v.interval);
4077 }
4078 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::ChangeAnnotation& v) {
4079 avro::decode(d, v.changeTime);
4080 avro::decode(d, v.interval);
4081 }
4082 };
4083}
4084namespace Energistics {
4085 namespace Etp {
4086 namespace v12 {
4087 namespace Datatypes {
4088 namespace Object {
4090 int64_t responseTimestamp = 0;
4091 std::map<std::string, std::vector<Energistics::Etp::v12::Datatypes::Object::ChangeAnnotation> > changes;
4092 };
4093 }
4094 }
4095 }
4096 }
4097}
4098namespace avro {
4099 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::ChangeResponseInfo> {
4100 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::ChangeResponseInfo& v) {
4101 avro::encode(e, v.responseTimestamp);
4102 avro::encode(e, v.changes);
4103 }
4104 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::ChangeResponseInfo& v) {
4105 avro::decode(d, v.responseTimestamp);
4106 avro::decode(d, v.changes);
4107 }
4108 };
4109}
4110namespace Energistics {
4111 namespace Etp {
4112 namespace v12 {
4113 namespace Datatypes {
4114 namespace Object {
4115 enum class ObjectChangeKind {
4116 insert = 0,
4117 update = 1,
4118 authorized = 2,
4119 joined = 3,
4120 unjoined = 4,
4121 joinedSubscription = 5,
4122 unjoinedSubscription = 6
4123 };
4124 }
4125 }
4126 }
4127 }
4128}
4129namespace avro {
4130 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::ObjectChangeKind> {
4131 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::ObjectChangeKind& v) {
4132 e.encodeEnum(static_cast<std::size_t>(v));
4133 }
4134 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::ObjectChangeKind& v) {
4135 v = static_cast<Energistics::Etp::v12::Datatypes::Object::ObjectChangeKind>(d.decodeEnum());
4136 }
4137 };
4138}
4139namespace Energistics {
4140 namespace Etp {
4141 namespace v12 {
4142 namespace Datatypes {
4143 namespace Object {
4144 struct ObjectPart {
4145 std::string uid;
4146 std::string data;
4147 };
4148 }
4149 }
4150 }
4151 }
4152}
4153namespace avro {
4154 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::ObjectPart> {
4155 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::ObjectPart& v) {
4156 avro::encode(e, v.uid);
4157 avro::encode(e, v.data);
4158 }
4159 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::ObjectPart& v) {
4160 avro::decode(d, v.uid);
4161 avro::decode(d, v.data);
4162 }
4163 };
4164}
4165namespace Energistics {
4166 namespace Etp {
4167 namespace v12 {
4168 namespace Datatypes {
4169 namespace Object {
4171 std::string uri;
4172 std::string name;
4174 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> customData;
4175 };
4176 }
4177 }
4178 }
4179 }
4180}
4181namespace avro {
4182 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::PartsMetadataInfo> {
4183 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::PartsMetadataInfo& v) {
4184 avro::encode(e, v.uri);
4185 avro::encode(e, v.name);
4186 avro::encode(e, v.index);
4187 avro::encode(e, v.customData);
4188 }
4189 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::PartsMetadataInfo& v) {
4190 avro::decode(d, v.uri);
4191 avro::decode(d, v.name);
4192 avro::decode(d, v.index);
4193 avro::decode(d, v.customData);
4194 }
4195 };
4196}
4197namespace Energistics {
4198 namespace Etp {
4199 namespace v12 {
4200 namespace Datatypes {
4201 namespace Object {
4203 std::vector<std::string> createdContainedObjectUris;
4204 std::vector<std::string> deletedContainedObjectUris;
4205 std::vector<std::string> joinedContainedObjectUris;
4206 std::vector<std::string> unjoinedContainedObjectUris;
4207 };
4208 }
4209 }
4210 }
4211 }
4212}
4213namespace avro {
4214 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::PutResponse> {
4215 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::PutResponse& v) {
4216 avro::encode(e, v.createdContainedObjectUris);
4217 avro::encode(e, v.deletedContainedObjectUris);
4218 avro::encode(e, v.joinedContainedObjectUris);
4219 avro::encode(e, v.unjoinedContainedObjectUris);
4220 }
4221 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::PutResponse& v) {
4222 avro::decode(d, v.createdContainedObjectUris);
4223 avro::decode(d, v.deletedContainedObjectUris);
4224 avro::decode(d, v.joinedContainedObjectUris);
4225 avro::decode(d, v.unjoinedContainedObjectUris);
4226 }
4227 };
4228}
4229namespace Energistics {
4230 namespace Etp {
4231 namespace v12 {
4232 namespace Protocol {
4233 namespace Store {
4234 struct PutDataObjectsResponse : public ETP_NS::EtpMessage {
4235 static constexpr int32_t messageTypeId = 9;
4236
4237 PutDataObjectsResponse() {
4238 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Store);
4239 this->messageHeader.messageType = messageTypeId;
4240 }
4241 std::map<std::string, Energistics::Etp::v12::Datatypes::Object::PutResponse> success;
4242
4243 void encode(avro::Encoder& e) const final {
4244 avro::encode(e, success);
4245 }
4246 void decode(avro::Decoder& d) final {
4247 avro::decode(d, success);
4248 }
4249 };
4250 }
4251 }
4252 }
4253 }
4254}
4255namespace Energistics {
4256 namespace Etp {
4257 namespace v12 {
4258 namespace Datatypes {
4259 namespace Object {
4260 enum class RelationshipKind {
4261 Primary = 0,
4262 Secondary = 1,
4263 Both = 2
4264 };
4265 }
4266 }
4267 }
4268 }
4269}
4270namespace avro {
4271 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::RelationshipKind> {
4272 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::RelationshipKind& v) {
4273 e.encodeEnum(static_cast<std::size_t>(v));
4274 }
4275 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::RelationshipKind& v) {
4276 v = static_cast<Energistics::Etp::v12::Datatypes::Object::RelationshipKind>(d.decodeEnum());
4277 }
4278 };
4279}
4280namespace Energistics {
4281 namespace Etp {
4282 namespace v12 {
4283 namespace Datatypes {
4284 namespace Object {
4286 std::string uri;
4287 int32_t depth = 1;
4288 std::vector<std::string> dataObjectTypes;
4289 Energistics::Etp::v12::Datatypes::Object::RelationshipKind navigableEdges = Energistics::Etp::v12::Datatypes::Object::RelationshipKind::Primary;
4290 bool includeSecondaryTargets = false;
4291 bool includeSecondarySources = false;
4292 };
4293 }
4294 }
4295 }
4296 }
4297}
4298namespace avro {
4299 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::ContextInfo> {
4300 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::ContextInfo& v) {
4301 avro::encode(e, v.uri);
4302 avro::encode(e, v.depth);
4303 avro::encode(e, v.dataObjectTypes);
4304 avro::encode(e, v.navigableEdges);
4305 avro::encode(e, v.includeSecondaryTargets);
4306 avro::encode(e, v.includeSecondarySources);
4307 }
4308 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::ContextInfo& v) {
4309 avro::decode(d, v.uri);
4310 avro::decode(d, v.depth);
4311 avro::decode(d, v.dataObjectTypes);
4312 avro::decode(d, v.navigableEdges);
4313 avro::decode(d, v.includeSecondaryTargets);
4314 avro::decode(d, v.includeSecondarySources);
4315 }
4316 };
4317}
4318namespace Energistics {
4319 namespace Etp {
4320 namespace v12 {
4321 namespace Protocol {
4322 namespace Discovery {
4323 struct GetResources : public ETP_NS::EtpMessage {
4324 static constexpr int32_t messageTypeId = 1;
4325
4326 GetResources() {
4327 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Discovery);
4328 this->messageHeader.messageType = messageTypeId;
4329 }
4331 Energistics::Etp::v12::Datatypes::Object::ContextScopeKind scope = Energistics::Etp::v12::Datatypes::Object::ContextScopeKind::targets;
4332 bool countObjects = false;
4333 std::optional<int64_t> storeLastWriteFilter;
4334 bool has_storeLastWriteFilter() const { return storeLastWriteFilter.has_value(); }
4335 int64_t get_storeLastWriteFilter() const { return storeLastWriteFilter.value(); }
4336 std::optional<Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind> activeStatusFilter;
4337 bool has_activeStatusFilter() const { return activeStatusFilter.has_value(); }
4338 Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind get_activeStatusFilter() const { return activeStatusFilter.value(); }
4339 bool includeEdges = false;
4340
4341 void encode(avro::Encoder& e) const final {
4342 avro::encode(e, context);
4343 avro::encode(e, scope);
4344 avro::encode(e, countObjects);
4345 avro::encode(e, storeLastWriteFilter);
4346 avro::encode(e, activeStatusFilter);
4347 avro::encode(e, includeEdges);
4348 }
4349 void decode(avro::Decoder& d) final {
4350 avro::decode(d, context);
4351 avro::decode(d, scope);
4352 avro::decode(d, countObjects);
4353 avro::decode(d, storeLastWriteFilter);
4354 avro::decode(d, activeStatusFilter);
4355 avro::decode(d, includeEdges);
4356 }
4357 };
4358 }
4359 }
4360 }
4361 }
4362}
4363namespace Energistics {
4364 namespace Etp {
4365 namespace v12 {
4366 namespace Protocol {
4367 namespace DiscoveryQuery {
4368 struct FindResources : public ETP_NS::EtpMessage {
4369 static constexpr int32_t messageTypeId = 1;
4370
4371 FindResources() {
4372 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DiscoveryQuery);
4373 this->messageHeader.messageType = messageTypeId;
4374 }
4376 Energistics::Etp::v12::Datatypes::Object::ContextScopeKind scope = Energistics::Etp::v12::Datatypes::Object::ContextScopeKind::targets;
4377 std::optional<int64_t> storeLastWriteFilter;
4378 bool has_storeLastWriteFilter() const { return storeLastWriteFilter.has_value(); }
4379 int64_t get_storeLastWriteFilter() const { return storeLastWriteFilter.value(); }
4380 std::optional<Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind> activeStatusFilter;
4381 bool has_activeStatusFilter() const { return activeStatusFilter.has_value(); }
4382 Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind get_activeStatusFilter() const { return activeStatusFilter.value(); }
4383
4384 void encode(avro::Encoder& e) const final {
4385 avro::encode(e, context);
4386 avro::encode(e, scope);
4387 avro::encode(e, storeLastWriteFilter);
4388 avro::encode(e, activeStatusFilter);
4389 }
4390 void decode(avro::Decoder& d) final {
4391 avro::decode(d, context);
4392 avro::decode(d, scope);
4393 avro::decode(d, storeLastWriteFilter);
4394 avro::decode(d, activeStatusFilter);
4395 }
4396 };
4397 }
4398 }
4399 }
4400 }
4401}
4402namespace Energistics {
4403 namespace Etp {
4404 namespace v12 {
4405 namespace Protocol {
4406 namespace StoreQuery {
4407 struct FindDataObjects : public ETP_NS::EtpMessage {
4408 static constexpr int32_t messageTypeId = 1;
4409
4410 FindDataObjects() {
4411 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreQuery);
4412 this->messageHeader.messageType = messageTypeId;
4413 }
4415 Energistics::Etp::v12::Datatypes::Object::ContextScopeKind scope = Energistics::Etp::v12::Datatypes::Object::ContextScopeKind::targets;
4416 std::optional<int64_t> storeLastWriteFilter;
4417 bool has_storeLastWriteFilter() const { return storeLastWriteFilter.has_value(); }
4418 int64_t get_storeLastWriteFilter() const { return storeLastWriteFilter.value(); }
4419 std::optional<Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind> activeStatusFilter;
4420 bool has_activeStatusFilter() const { return activeStatusFilter.has_value(); }
4421 Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind get_activeStatusFilter() const { return activeStatusFilter.value(); }
4422 std::string format;
4423
4424 void encode(avro::Encoder& e) const final {
4425 avro::encode(e, context);
4426 avro::encode(e, scope);
4427 avro::encode(e, storeLastWriteFilter);
4428 avro::encode(e, activeStatusFilter);
4429 avro::encode(e, format);
4430 }
4431 void decode(avro::Decoder& d) final {
4432 avro::decode(d, context);
4433 avro::decode(d, scope);
4434 avro::decode(d, storeLastWriteFilter);
4435 avro::decode(d, activeStatusFilter);
4436 avro::decode(d, format);
4437 }
4438 };
4439 }
4440 }
4441 }
4442 }
4443}
4444namespace Energistics {
4445 namespace Etp {
4446 namespace v12 {
4447 namespace Datatypes {
4448 namespace Object {
4449 struct Edge {
4450 std::string sourceUri;
4451 std::string targetUri;
4452 Energistics::Etp::v12::Datatypes::Object::RelationshipKind relationshipKind = Energistics::Etp::v12::Datatypes::Object::RelationshipKind::Primary;
4453 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> customData;
4454 };
4455 }
4456 }
4457 }
4458 }
4459}
4460namespace avro {
4461 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::Edge> {
4462 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::Edge& v) {
4463 avro::encode(e, v.sourceUri);
4464 avro::encode(e, v.targetUri);
4465 avro::encode(e, v.relationshipKind);
4466 avro::encode(e, v.customData);
4467 }
4468 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::Edge& v) {
4469 avro::decode(d, v.sourceUri);
4470 avro::decode(d, v.targetUri);
4471 avro::decode(d, v.relationshipKind);
4472 avro::decode(d, v.customData);
4473 }
4474 };
4475}
4476namespace Energistics {
4477 namespace Etp {
4478 namespace v12 {
4479 namespace Protocol {
4480 namespace Discovery {
4481 struct GetResourcesEdgesResponse : public ETP_NS::EtpMessage {
4482 static constexpr int32_t messageTypeId = 7;
4483
4484 GetResourcesEdgesResponse() {
4485 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Discovery);
4486 this->messageHeader.messageType = messageTypeId;
4487 }
4488 std::vector<Energistics::Etp::v12::Datatypes::Object::Edge> edges;
4489
4490 void encode(avro::Encoder& e) const final {
4491 avro::encode(e, edges);
4492 }
4493 void decode(avro::Decoder& d) final {
4494 avro::decode(d, edges);
4495 }
4496 };
4497 }
4498 }
4499 }
4500 }
4501}
4502namespace Energistics {
4503 namespace Etp {
4504 namespace v12 {
4505 namespace Datatypes {
4506 namespace Object {
4507 struct Resource {
4508 std::string uri;
4509 std::vector<std::string> alternateUris;
4510 std::string name;
4511 std::optional<int32_t> sourceCount;
4512 bool has_sourceCount() const { return sourceCount.has_value(); }
4513 int32_t get_sourceCount() const { return sourceCount.value(); }
4514 std::optional<int32_t> targetCount;
4515 bool has_targetCount() const { return targetCount.has_value(); }
4516 int32_t get_targetCount() const { return targetCount.value(); }
4517 int64_t lastChanged = 0;
4518 int64_t storeLastWrite = 0;
4519 int64_t storeCreated = 0;
4520 Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind activeStatus = Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind::Inactive;
4521 std::map<std::string, Energistics::Etp::v12::Datatypes::DataValue> customData;
4522 };
4523 }
4524 }
4525 }
4526 }
4527}
4528namespace avro {
4529 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::Resource> {
4530 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::Resource& v) {
4531 avro::encode(e, v.uri);
4532 avro::encode(e, v.alternateUris);
4533 avro::encode(e, v.name);
4534 avro::encode(e, v.sourceCount);
4535 avro::encode(e, v.targetCount);
4536 avro::encode(e, v.lastChanged);
4537 avro::encode(e, v.storeLastWrite);
4538 avro::encode(e, v.storeCreated);
4539 avro::encode(e, v.activeStatus);
4540 avro::encode(e, v.customData);
4541 }
4542 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::Resource& v) {
4543 avro::decode(d, v.uri);
4544 avro::decode(d, v.alternateUris);
4545 avro::decode(d, v.name);
4546 avro::decode(d, v.sourceCount);
4547 avro::decode(d, v.targetCount);
4548 avro::decode(d, v.lastChanged);
4549 avro::decode(d, v.storeLastWrite);
4550 avro::decode(d, v.storeCreated);
4551 avro::decode(d, v.activeStatus);
4552 avro::decode(d, v.customData);
4553 }
4554 };
4555}
4556namespace Energistics {
4557 namespace Etp {
4558 namespace v12 {
4559 namespace Protocol {
4560 namespace Discovery {
4561 struct GetResourcesResponse : public ETP_NS::EtpMessage {
4562 static constexpr int32_t messageTypeId = 4;
4563
4564 GetResourcesResponse() {
4565 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Discovery);
4566 this->messageHeader.messageType = messageTypeId;
4567 }
4568 std::vector<Energistics::Etp::v12::Datatypes::Object::Resource> resources;
4569
4570 void encode(avro::Encoder& e) const final {
4571 avro::encode(e, resources);
4572 }
4573 void decode(avro::Decoder& d) final {
4574 avro::decode(d, resources);
4575 }
4576 };
4577 }
4578 }
4579 }
4580 }
4581}
4582namespace Energistics {
4583 namespace Etp {
4584 namespace v12 {
4585 namespace Protocol {
4586 namespace DiscoveryQuery {
4587 struct FindResourcesResponse : public ETP_NS::EtpMessage {
4588 static constexpr int32_t messageTypeId = 2;
4589
4590 FindResourcesResponse() {
4591 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::DiscoveryQuery);
4592 this->messageHeader.messageType = messageTypeId;
4593 }
4594 std::vector<Energistics::Etp::v12::Datatypes::Object::Resource> resources;
4595 std::string serverSortOrder;
4596
4597 void encode(avro::Encoder& e) const final {
4598 avro::encode(e, resources);
4599 avro::encode(e, serverSortOrder);
4600 }
4601 void decode(avro::Decoder& d) final {
4602 avro::decode(d, resources);
4603 avro::decode(d, serverSortOrder);
4604 }
4605 };
4606 }
4607 }
4608 }
4609 }
4610}
4611namespace Energistics {
4612 namespace Etp {
4613 namespace v12 {
4614 namespace Protocol {
4615 namespace StoreNotification {
4616 struct ObjectActiveStatusChanged : public ETP_NS::EtpMessage {
4617 static constexpr int32_t messageTypeId = 11;
4618
4619 ObjectActiveStatusChanged() {
4620 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
4621 this->messageHeader.messageType = messageTypeId;
4622 }
4623 Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind activeStatus = Energistics::Etp::v12::Datatypes::Object::ActiveStatusKind::Inactive;
4624 int64_t changeTime = 0;
4627
4628 void encode(avro::Encoder& e) const final {
4629 avro::encode(e, activeStatus);
4630 avro::encode(e, changeTime);
4631 avro::encode(e, resource);
4632 avro::encode(e, requestUuid);
4633 }
4634 void decode(avro::Decoder& d) final {
4635 avro::decode(d, activeStatus);
4636 avro::decode(d, changeTime);
4637 avro::decode(d, resource);
4638 avro::decode(d, requestUuid);
4639 }
4640 };
4641 }
4642 }
4643 }
4644 }
4645}
4646namespace Energistics {
4647 namespace Etp {
4648 namespace v12 {
4649 namespace Datatypes {
4650 namespace Object {
4651 struct DataObject {
4653 std::string format;
4654 std::optional<Energistics::Etp::v12::Datatypes::Uuid> blobId;
4655 bool has_blobId() const { return blobId.has_value(); }
4656 Energistics::Etp::v12::Datatypes::Uuid get_blobId() const { return blobId.value(); }
4657 std::string data;
4658 };
4659 }
4660 }
4661 }
4662 }
4663}
4664namespace avro {
4665 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::DataObject> {
4666 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::DataObject& v) {
4667 avro::encode(e, v.resource);
4668 avro::encode(e, v.format);
4669 avro::encode(e, v.blobId);
4670 avro::encode(e, v.data);
4671 }
4672 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::DataObject& v) {
4673 avro::decode(d, v.resource);
4674 avro::decode(d, v.format);
4675 avro::decode(d, v.blobId);
4676 avro::decode(d, v.data);
4677 }
4678 };
4679}
4680namespace Energistics {
4681 namespace Etp {
4682 namespace v12 {
4683 namespace Protocol {
4684 namespace Store {
4685 struct GetDataObjectsResponse : public ETP_NS::EtpMessage {
4686 static constexpr int32_t messageTypeId = 4;
4687
4688 GetDataObjectsResponse() {
4689 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Store);
4690 this->messageHeader.messageType = messageTypeId;
4691 }
4692 std::map<std::string, Energistics::Etp::v12::Datatypes::Object::DataObject> dataObjects;
4693
4694 void encode(avro::Encoder& e) const final {
4695 avro::encode(e, dataObjects);
4696 }
4697 void decode(avro::Decoder& d) final {
4698 avro::decode(d, dataObjects);
4699 }
4700 };
4701 }
4702 }
4703 }
4704 }
4705}
4706namespace Energistics {
4707 namespace Etp {
4708 namespace v12 {
4709 namespace Protocol {
4710 namespace Store {
4711 struct PutDataObjects : public ETP_NS::EtpMessage {
4712 static constexpr int32_t messageTypeId = 2;
4713
4714 PutDataObjects() {
4715 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::Store);
4716 this->messageHeader.messageType = messageTypeId;
4717 }
4718 std::map<std::string, Energistics::Etp::v12::Datatypes::Object::DataObject> dataObjects;
4719 bool pruneContainedObjects = false;
4720
4721 void encode(avro::Encoder& e) const final {
4722 avro::encode(e, dataObjects);
4723 avro::encode(e, pruneContainedObjects);
4724 }
4725 void decode(avro::Decoder& d) final {
4726 avro::decode(d, dataObjects);
4727 avro::decode(d, pruneContainedObjects);
4728 }
4729 };
4730 }
4731 }
4732 }
4733 }
4734}
4735namespace Energistics {
4736 namespace Etp {
4737 namespace v12 {
4738 namespace Protocol {
4739 namespace StoreQuery {
4740 struct FindDataObjectsResponse : public ETP_NS::EtpMessage {
4741 static constexpr int32_t messageTypeId = 2;
4742
4743 FindDataObjectsResponse() {
4744 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreQuery);
4745 this->messageHeader.messageType = messageTypeId;
4746 }
4747 std::vector<Energistics::Etp::v12::Datatypes::Object::DataObject> dataObjects;
4748 std::string serverSortOrder;
4749
4750 void encode(avro::Encoder& e) const final {
4751 avro::encode(e, dataObjects);
4752 avro::encode(e, serverSortOrder);
4753 }
4754 void decode(avro::Decoder& d) final {
4755 avro::decode(d, dataObjects);
4756 avro::decode(d, serverSortOrder);
4757 }
4758 };
4759 }
4760 }
4761 }
4762 }
4763}
4764namespace Energistics {
4765 namespace Etp {
4766 namespace v12 {
4767 namespace Datatypes {
4768 namespace Object {
4770 Energistics::Etp::v12::Datatypes::Object::ObjectChangeKind changeKind = Energistics::Etp::v12::Datatypes::Object::ObjectChangeKind::insert;
4771 int64_t changeTime = 0;
4773 };
4774 }
4775 }
4776 }
4777 }
4778}
4779namespace avro {
4780 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::ObjectChange> {
4781 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::ObjectChange& v) {
4782 avro::encode(e, v.changeKind);
4783 avro::encode(e, v.changeTime);
4784 avro::encode(e, v.dataObject);
4785 }
4786 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::ObjectChange& v) {
4787 avro::decode(d, v.changeKind);
4788 avro::decode(d, v.changeTime);
4789 avro::decode(d, v.dataObject);
4790 }
4791 };
4792}
4793namespace Energistics {
4794 namespace Etp {
4795 namespace v12 {
4796 namespace Protocol {
4797 namespace StoreNotification {
4798 struct ObjectChanged : public ETP_NS::EtpMessage {
4799 static constexpr int32_t messageTypeId = 2;
4800
4801 ObjectChanged() {
4802 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
4803 this->messageHeader.messageType = messageTypeId;
4804 }
4807
4808 void encode(avro::Encoder& e) const final {
4809 avro::encode(e, change);
4810 avro::encode(e, requestUuid);
4811 }
4812 void decode(avro::Decoder& d) final {
4813 avro::decode(d, change);
4814 avro::decode(d, requestUuid);
4815 }
4816 };
4817 }
4818 }
4819 }
4820 }
4821}
4822namespace Energistics {
4823 namespace Etp {
4824 namespace v12 {
4825 namespace Datatypes {
4826 namespace Object {
4829 Energistics::Etp::v12::Datatypes::Object::ContextScopeKind scope = Energistics::Etp::v12::Datatypes::Object::ContextScopeKind::targets;
4831 bool includeObjectData = false;
4832 std::string format;
4833 };
4834 }
4835 }
4836 }
4837 }
4838}
4839namespace avro {
4840 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::SubscriptionInfo> {
4841 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::SubscriptionInfo& v) {
4842 avro::encode(e, v.context);
4843 avro::encode(e, v.scope);
4844 avro::encode(e, v.requestUuid);
4845 avro::encode(e, v.includeObjectData);
4846 avro::encode(e, v.format);
4847 }
4848 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::SubscriptionInfo& v) {
4849 avro::decode(d, v.context);
4850 avro::decode(d, v.scope);
4851 avro::decode(d, v.requestUuid);
4852 avro::decode(d, v.includeObjectData);
4853 avro::decode(d, v.format);
4854 }
4855 };
4856}
4857namespace Energistics {
4858 namespace Etp {
4859 namespace v12 {
4860 namespace Protocol {
4861 namespace StoreNotification {
4862 struct SubscribeNotifications : public ETP_NS::EtpMessage {
4863 static constexpr int32_t messageTypeId = 6;
4864
4865 SubscribeNotifications() {
4866 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
4867 this->messageHeader.messageType = messageTypeId;
4868 }
4869 std::map<std::string, Energistics::Etp::v12::Datatypes::Object::SubscriptionInfo> request;
4870
4871 void encode(avro::Encoder& e) const final {
4872 avro::encode(e, request);
4873 }
4874 void decode(avro::Decoder& d) final {
4875 avro::decode(d, request);
4876 }
4877 };
4878 }
4879 }
4880 }
4881 }
4882}
4883namespace Energistics {
4884 namespace Etp {
4885 namespace v12 {
4886 namespace Protocol {
4887 namespace StoreNotification {
4888 struct UnsolicitedStoreNotifications : public ETP_NS::EtpMessage {
4889 static constexpr int32_t messageTypeId = 8;
4890
4891 UnsolicitedStoreNotifications() {
4892 this->messageHeader.protocol = static_cast<std::underlying_type_t<Energistics::Etp::v12::Datatypes::Protocol>>(Energistics::Etp::v12::Datatypes::Protocol::StoreNotification);
4893 this->messageHeader.messageType = messageTypeId;
4894 }
4895 std::vector<Energistics::Etp::v12::Datatypes::Object::SubscriptionInfo> subscriptions;
4896
4897 void encode(avro::Encoder& e) const final {
4898 avro::encode(e, subscriptions);
4899 }
4900 void decode(avro::Decoder& d) final {
4901 avro::decode(d, subscriptions);
4902 }
4903 };
4904 }
4905 }
4906 }
4907 }
4908}
4909namespace Energistics {
4910 namespace Etp {
4911 namespace v12 {
4912 namespace Datatypes {
4913 namespace Object {
4915 std::string dataObjectType;
4916 std::optional<int32_t> objectCount;
4917 bool has_objectCount() const { return objectCount.has_value(); }
4918 int32_t get_objectCount() const { return objectCount.value(); }
4919 Energistics::Etp::v12::Datatypes::Object::RelationshipKind relationshipKind = Energistics::Etp::v12::Datatypes::Object::RelationshipKind::Primary;
4920 };
4921 }
4922 }
4923 }
4924 }
4925}
4926namespace avro {
4927 template<> struct codec_traits<Energistics::Etp::v12::Datatypes::Object::SupportedType> {
4928 static void encode(Encoder& e, const Energistics::Etp::v12::Datatypes::Object::SupportedType& v) {
4929 avro::encode(e, v.dataObjectType);
4930 avro::encode(e, v.objectCount);
4931 avro::encode(e, v.relationshipKind);
4932 }
4933 static void decode(Decoder& d, Energistics::Etp::v12::Datatypes::Object::SupportedType& v) {
4934 avro::decode(d, v.dataObjectType);
4935 avro::decode(d, v.objectCount);
4936 avro::decode(d, v.relationshipKind);
4937 }
4938 };
4939}
4940
4941namespace avro {
4945 template<typename T>
4946 struct codec_traits<std::optional<T>> {
4950 static void encode(Encoder& e, const std::optional<T>& b) {
4951 if (b) {
4952 e.encodeUnionIndex(1);
4953 avro::encode(e, b.value());
4954 }
4955 else {
4956 e.encodeUnionIndex(0);
4957 e.encodeNull();
4958 }
4959 }
4960
4964 static void decode(Decoder& d, std::optional<T>& s) {
4965 size_t n = d.decodeUnionIndex();
4966 if (n >= 2) { throw avro::Exception("Union index too big for optional (expected 0 or 1, got " + std::to_string(n) + ")"); }
4967 switch (n) {
4968 case 0:
4969 {
4970 d.decodeNull();
4971 s.reset();
4972 }
4973 break;
4974 case 1:
4975 {
4976 s.emplace();
4977 avro::decode(d, *s);
4978 }
4979 break;
4980 }
4981 }
4982 };
4983}
4984
4985#endif
Definition EtpMessages.h:1041
Definition EtpMessages.h:1107
Definition EtpMessages.h:1519
Definition EtpMessages.h:1601
Definition EtpMessages.h:1734
Definition EtpMessages.h:2118