]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/thrift-gen/jaeger_types.cpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / jaegertracing / jaeger-client-cpp / src / jaegertracing / thrift-gen / jaeger_types.cpp
1 /**
2 * Autogenerated by Thrift Compiler (0.11.0)
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated
6 */
7 #include "jaeger_types.h"
8
9 #include <algorithm>
10 #include <ostream>
11
12 #include <thrift/TToString.h>
13
14 namespace jaegertracing { namespace thrift {
15
16 int _kTagTypeValues[] = {
17 TagType::STRING,
18 TagType::DOUBLE,
19 TagType::BOOL,
20 TagType::LONG,
21 TagType::BINARY
22 };
23 const char* _kTagTypeNames[] = {
24 "STRING",
25 "DOUBLE",
26 "BOOL",
27 "LONG",
28 "BINARY"
29 };
30 const std::map<int, const char*> _TagType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kTagTypeValues, _kTagTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
31
32 std::ostream& operator<<(std::ostream& out, const TagType::type& val) {
33 std::map<int, const char*>::const_iterator it = _TagType_VALUES_TO_NAMES.find(val);
34 if (it != _TagType_VALUES_TO_NAMES.end()) {
35 out << it->second;
36 } else {
37 out << static_cast<int>(val);
38 }
39 return out;
40 }
41
42 int _kSpanRefTypeValues[] = {
43 SpanRefType::CHILD_OF,
44 SpanRefType::FOLLOWS_FROM
45 };
46 const char* _kSpanRefTypeNames[] = {
47 "CHILD_OF",
48 "FOLLOWS_FROM"
49 };
50 const std::map<int, const char*> _SpanRefType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kSpanRefTypeValues, _kSpanRefTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
51
52 std::ostream& operator<<(std::ostream& out, const SpanRefType::type& val) {
53 std::map<int, const char*>::const_iterator it = _SpanRefType_VALUES_TO_NAMES.find(val);
54 if (it != _SpanRefType_VALUES_TO_NAMES.end()) {
55 out << it->second;
56 } else {
57 out << static_cast<int>(val);
58 }
59 return out;
60 }
61
62
63 Tag::~Tag() throw() {
64 }
65
66
67 void Tag::__set_key(const std::string& val) {
68 this->key = val;
69 }
70
71 void Tag::__set_vType(const TagType::type val) {
72 this->vType = val;
73 }
74
75 void Tag::__set_vStr(const std::string& val) {
76 this->vStr = val;
77 __isset.vStr = true;
78 }
79
80 void Tag::__set_vDouble(const double val) {
81 this->vDouble = val;
82 __isset.vDouble = true;
83 }
84
85 void Tag::__set_vBool(const bool val) {
86 this->vBool = val;
87 __isset.vBool = true;
88 }
89
90 void Tag::__set_vLong(const int64_t val) {
91 this->vLong = val;
92 __isset.vLong = true;
93 }
94
95 void Tag::__set_vBinary(const std::string& val) {
96 this->vBinary = val;
97 __isset.vBinary = true;
98 }
99 std::ostream& operator<<(std::ostream& out, const Tag& obj)
100 {
101 obj.printTo(out);
102 return out;
103 }
104
105
106 uint32_t Tag::read(::apache::thrift::protocol::TProtocol* iprot) {
107
108 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
109 uint32_t xfer = 0;
110 std::string fname;
111 ::apache::thrift::protocol::TType ftype;
112 int16_t fid;
113
114 xfer += iprot->readStructBegin(fname);
115
116 using ::apache::thrift::protocol::TProtocolException;
117
118 bool isset_key = false;
119 bool isset_vType = false;
120
121 while (true)
122 {
123 xfer += iprot->readFieldBegin(fname, ftype, fid);
124 if (ftype == ::apache::thrift::protocol::T_STOP) {
125 break;
126 }
127 switch (fid)
128 {
129 case 1:
130 if (ftype == ::apache::thrift::protocol::T_STRING) {
131 xfer += iprot->readString(this->key);
132 isset_key = true;
133 } else {
134 xfer += iprot->skip(ftype);
135 }
136 break;
137 case 2:
138 if (ftype == ::apache::thrift::protocol::T_I32) {
139 int32_t ecast0;
140 xfer += iprot->readI32(ecast0);
141 this->vType = (TagType::type)ecast0;
142 isset_vType = true;
143 } else {
144 xfer += iprot->skip(ftype);
145 }
146 break;
147 case 3:
148 if (ftype == ::apache::thrift::protocol::T_STRING) {
149 xfer += iprot->readString(this->vStr);
150 this->__isset.vStr = true;
151 } else {
152 xfer += iprot->skip(ftype);
153 }
154 break;
155 case 4:
156 if (ftype == ::apache::thrift::protocol::T_DOUBLE) {
157 xfer += iprot->readDouble(this->vDouble);
158 this->__isset.vDouble = true;
159 } else {
160 xfer += iprot->skip(ftype);
161 }
162 break;
163 case 5:
164 if (ftype == ::apache::thrift::protocol::T_BOOL) {
165 xfer += iprot->readBool(this->vBool);
166 this->__isset.vBool = true;
167 } else {
168 xfer += iprot->skip(ftype);
169 }
170 break;
171 case 6:
172 if (ftype == ::apache::thrift::protocol::T_I64) {
173 xfer += iprot->readI64(this->vLong);
174 this->__isset.vLong = true;
175 } else {
176 xfer += iprot->skip(ftype);
177 }
178 break;
179 case 7:
180 if (ftype == ::apache::thrift::protocol::T_STRING) {
181 xfer += iprot->readBinary(this->vBinary);
182 this->__isset.vBinary = true;
183 } else {
184 xfer += iprot->skip(ftype);
185 }
186 break;
187 default:
188 xfer += iprot->skip(ftype);
189 break;
190 }
191 xfer += iprot->readFieldEnd();
192 }
193
194 xfer += iprot->readStructEnd();
195
196 if (!isset_key)
197 throw TProtocolException(TProtocolException::INVALID_DATA);
198 if (!isset_vType)
199 throw TProtocolException(TProtocolException::INVALID_DATA);
200 return xfer;
201 }
202
203 uint32_t Tag::write(::apache::thrift::protocol::TProtocol* oprot) const {
204 uint32_t xfer = 0;
205 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
206 xfer += oprot->writeStructBegin("Tag");
207
208 xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
209 xfer += oprot->writeString(this->key);
210 xfer += oprot->writeFieldEnd();
211
212 xfer += oprot->writeFieldBegin("vType", ::apache::thrift::protocol::T_I32, 2);
213 xfer += oprot->writeI32((int32_t)this->vType);
214 xfer += oprot->writeFieldEnd();
215
216 if (this->__isset.vStr) {
217 xfer += oprot->writeFieldBegin("vStr", ::apache::thrift::protocol::T_STRING, 3);
218 xfer += oprot->writeString(this->vStr);
219 xfer += oprot->writeFieldEnd();
220 }
221 if (this->__isset.vDouble) {
222 xfer += oprot->writeFieldBegin("vDouble", ::apache::thrift::protocol::T_DOUBLE, 4);
223 xfer += oprot->writeDouble(this->vDouble);
224 xfer += oprot->writeFieldEnd();
225 }
226 if (this->__isset.vBool) {
227 xfer += oprot->writeFieldBegin("vBool", ::apache::thrift::protocol::T_BOOL, 5);
228 xfer += oprot->writeBool(this->vBool);
229 xfer += oprot->writeFieldEnd();
230 }
231 if (this->__isset.vLong) {
232 xfer += oprot->writeFieldBegin("vLong", ::apache::thrift::protocol::T_I64, 6);
233 xfer += oprot->writeI64(this->vLong);
234 xfer += oprot->writeFieldEnd();
235 }
236 if (this->__isset.vBinary) {
237 xfer += oprot->writeFieldBegin("vBinary", ::apache::thrift::protocol::T_STRING, 7);
238 xfer += oprot->writeBinary(this->vBinary);
239 xfer += oprot->writeFieldEnd();
240 }
241 xfer += oprot->writeFieldStop();
242 xfer += oprot->writeStructEnd();
243 return xfer;
244 }
245
246 void swap(Tag &a, Tag &b) {
247 using ::std::swap;
248 swap(a.key, b.key);
249 swap(a.vType, b.vType);
250 swap(a.vStr, b.vStr);
251 swap(a.vDouble, b.vDouble);
252 swap(a.vBool, b.vBool);
253 swap(a.vLong, b.vLong);
254 swap(a.vBinary, b.vBinary);
255 swap(a.__isset, b.__isset);
256 }
257
258 Tag::Tag(const Tag& other1) {
259 key = other1.key;
260 vType = other1.vType;
261 vStr = other1.vStr;
262 vDouble = other1.vDouble;
263 vBool = other1.vBool;
264 vLong = other1.vLong;
265 vBinary = other1.vBinary;
266 __isset = other1.__isset;
267 }
268 Tag& Tag::operator=(const Tag& other2) {
269 key = other2.key;
270 vType = other2.vType;
271 vStr = other2.vStr;
272 vDouble = other2.vDouble;
273 vBool = other2.vBool;
274 vLong = other2.vLong;
275 vBinary = other2.vBinary;
276 __isset = other2.__isset;
277 return *this;
278 }
279 void Tag::printTo(std::ostream& out) const {
280 using ::apache::thrift::to_string;
281 out << "Tag(";
282 out << "key=" << to_string(key);
283 out << ", " << "vType=" << to_string(vType);
284 out << ", " << "vStr="; (__isset.vStr ? (out << to_string(vStr)) : (out << "<null>"));
285 out << ", " << "vDouble="; (__isset.vDouble ? (out << to_string(vDouble)) : (out << "<null>"));
286 out << ", " << "vBool="; (__isset.vBool ? (out << to_string(vBool)) : (out << "<null>"));
287 out << ", " << "vLong="; (__isset.vLong ? (out << to_string(vLong)) : (out << "<null>"));
288 out << ", " << "vBinary="; (__isset.vBinary ? (out << to_string(vBinary)) : (out << "<null>"));
289 out << ")";
290 }
291
292
293 Log::~Log() throw() {
294 }
295
296
297 void Log::__set_timestamp(const int64_t val) {
298 this->timestamp = val;
299 }
300
301 void Log::__set_fields(const std::vector<Tag> & val) {
302 this->fields = val;
303 }
304 std::ostream& operator<<(std::ostream& out, const Log& obj)
305 {
306 obj.printTo(out);
307 return out;
308 }
309
310
311 uint32_t Log::read(::apache::thrift::protocol::TProtocol* iprot) {
312
313 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
314 uint32_t xfer = 0;
315 std::string fname;
316 ::apache::thrift::protocol::TType ftype;
317 int16_t fid;
318
319 xfer += iprot->readStructBegin(fname);
320
321 using ::apache::thrift::protocol::TProtocolException;
322
323 bool isset_timestamp = false;
324 bool isset_fields = false;
325
326 while (true)
327 {
328 xfer += iprot->readFieldBegin(fname, ftype, fid);
329 if (ftype == ::apache::thrift::protocol::T_STOP) {
330 break;
331 }
332 switch (fid)
333 {
334 case 1:
335 if (ftype == ::apache::thrift::protocol::T_I64) {
336 xfer += iprot->readI64(this->timestamp);
337 isset_timestamp = true;
338 } else {
339 xfer += iprot->skip(ftype);
340 }
341 break;
342 case 2:
343 if (ftype == ::apache::thrift::protocol::T_LIST) {
344 {
345 this->fields.clear();
346 uint32_t _size3;
347 ::apache::thrift::protocol::TType _etype6;
348 xfer += iprot->readListBegin(_etype6, _size3);
349 this->fields.resize(_size3);
350 uint32_t _i7;
351 for (_i7 = 0; _i7 < _size3; ++_i7)
352 {
353 xfer += this->fields[_i7].read(iprot);
354 }
355 xfer += iprot->readListEnd();
356 }
357 isset_fields = true;
358 } else {
359 xfer += iprot->skip(ftype);
360 }
361 break;
362 default:
363 xfer += iprot->skip(ftype);
364 break;
365 }
366 xfer += iprot->readFieldEnd();
367 }
368
369 xfer += iprot->readStructEnd();
370
371 if (!isset_timestamp)
372 throw TProtocolException(TProtocolException::INVALID_DATA);
373 if (!isset_fields)
374 throw TProtocolException(TProtocolException::INVALID_DATA);
375 return xfer;
376 }
377
378 uint32_t Log::write(::apache::thrift::protocol::TProtocol* oprot) const {
379 uint32_t xfer = 0;
380 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
381 xfer += oprot->writeStructBegin("Log");
382
383 xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 1);
384 xfer += oprot->writeI64(this->timestamp);
385 xfer += oprot->writeFieldEnd();
386
387 xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 2);
388 {
389 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->fields.size()));
390 std::vector<Tag> ::const_iterator _iter8;
391 for (_iter8 = this->fields.begin(); _iter8 != this->fields.end(); ++_iter8)
392 {
393 xfer += (*_iter8).write(oprot);
394 }
395 xfer += oprot->writeListEnd();
396 }
397 xfer += oprot->writeFieldEnd();
398
399 xfer += oprot->writeFieldStop();
400 xfer += oprot->writeStructEnd();
401 return xfer;
402 }
403
404 void swap(Log &a, Log &b) {
405 using ::std::swap;
406 swap(a.timestamp, b.timestamp);
407 swap(a.fields, b.fields);
408 }
409
410 Log::Log(const Log& other9) {
411 timestamp = other9.timestamp;
412 fields = other9.fields;
413 }
414 Log& Log::operator=(const Log& other10) {
415 timestamp = other10.timestamp;
416 fields = other10.fields;
417 return *this;
418 }
419 void Log::printTo(std::ostream& out) const {
420 using ::apache::thrift::to_string;
421 out << "Log(";
422 out << "timestamp=" << to_string(timestamp);
423 out << ", " << "fields=" << to_string(fields);
424 out << ")";
425 }
426
427
428 SpanRef::~SpanRef() throw() {
429 }
430
431
432 void SpanRef::__set_refType(const SpanRefType::type val) {
433 this->refType = val;
434 }
435
436 void SpanRef::__set_traceIdLow(const int64_t val) {
437 this->traceIdLow = val;
438 }
439
440 void SpanRef::__set_traceIdHigh(const int64_t val) {
441 this->traceIdHigh = val;
442 }
443
444 void SpanRef::__set_spanId(const int64_t val) {
445 this->spanId = val;
446 }
447 std::ostream& operator<<(std::ostream& out, const SpanRef& obj)
448 {
449 obj.printTo(out);
450 return out;
451 }
452
453
454 uint32_t SpanRef::read(::apache::thrift::protocol::TProtocol* iprot) {
455
456 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
457 uint32_t xfer = 0;
458 std::string fname;
459 ::apache::thrift::protocol::TType ftype;
460 int16_t fid;
461
462 xfer += iprot->readStructBegin(fname);
463
464 using ::apache::thrift::protocol::TProtocolException;
465
466 bool isset_refType = false;
467 bool isset_traceIdLow = false;
468 bool isset_traceIdHigh = false;
469 bool isset_spanId = false;
470
471 while (true)
472 {
473 xfer += iprot->readFieldBegin(fname, ftype, fid);
474 if (ftype == ::apache::thrift::protocol::T_STOP) {
475 break;
476 }
477 switch (fid)
478 {
479 case 1:
480 if (ftype == ::apache::thrift::protocol::T_I32) {
481 int32_t ecast11;
482 xfer += iprot->readI32(ecast11);
483 this->refType = (SpanRefType::type)ecast11;
484 isset_refType = true;
485 } else {
486 xfer += iprot->skip(ftype);
487 }
488 break;
489 case 2:
490 if (ftype == ::apache::thrift::protocol::T_I64) {
491 xfer += iprot->readI64(this->traceIdLow);
492 isset_traceIdLow = true;
493 } else {
494 xfer += iprot->skip(ftype);
495 }
496 break;
497 case 3:
498 if (ftype == ::apache::thrift::protocol::T_I64) {
499 xfer += iprot->readI64(this->traceIdHigh);
500 isset_traceIdHigh = true;
501 } else {
502 xfer += iprot->skip(ftype);
503 }
504 break;
505 case 4:
506 if (ftype == ::apache::thrift::protocol::T_I64) {
507 xfer += iprot->readI64(this->spanId);
508 isset_spanId = true;
509 } else {
510 xfer += iprot->skip(ftype);
511 }
512 break;
513 default:
514 xfer += iprot->skip(ftype);
515 break;
516 }
517 xfer += iprot->readFieldEnd();
518 }
519
520 xfer += iprot->readStructEnd();
521
522 if (!isset_refType)
523 throw TProtocolException(TProtocolException::INVALID_DATA);
524 if (!isset_traceIdLow)
525 throw TProtocolException(TProtocolException::INVALID_DATA);
526 if (!isset_traceIdHigh)
527 throw TProtocolException(TProtocolException::INVALID_DATA);
528 if (!isset_spanId)
529 throw TProtocolException(TProtocolException::INVALID_DATA);
530 return xfer;
531 }
532
533 uint32_t SpanRef::write(::apache::thrift::protocol::TProtocol* oprot) const {
534 uint32_t xfer = 0;
535 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
536 xfer += oprot->writeStructBegin("SpanRef");
537
538 xfer += oprot->writeFieldBegin("refType", ::apache::thrift::protocol::T_I32, 1);
539 xfer += oprot->writeI32((int32_t)this->refType);
540 xfer += oprot->writeFieldEnd();
541
542 xfer += oprot->writeFieldBegin("traceIdLow", ::apache::thrift::protocol::T_I64, 2);
543 xfer += oprot->writeI64(this->traceIdLow);
544 xfer += oprot->writeFieldEnd();
545
546 xfer += oprot->writeFieldBegin("traceIdHigh", ::apache::thrift::protocol::T_I64, 3);
547 xfer += oprot->writeI64(this->traceIdHigh);
548 xfer += oprot->writeFieldEnd();
549
550 xfer += oprot->writeFieldBegin("spanId", ::apache::thrift::protocol::T_I64, 4);
551 xfer += oprot->writeI64(this->spanId);
552 xfer += oprot->writeFieldEnd();
553
554 xfer += oprot->writeFieldStop();
555 xfer += oprot->writeStructEnd();
556 return xfer;
557 }
558
559 void swap(SpanRef &a, SpanRef &b) {
560 using ::std::swap;
561 swap(a.refType, b.refType);
562 swap(a.traceIdLow, b.traceIdLow);
563 swap(a.traceIdHigh, b.traceIdHigh);
564 swap(a.spanId, b.spanId);
565 }
566
567 SpanRef::SpanRef(const SpanRef& other12) {
568 refType = other12.refType;
569 traceIdLow = other12.traceIdLow;
570 traceIdHigh = other12.traceIdHigh;
571 spanId = other12.spanId;
572 }
573 SpanRef& SpanRef::operator=(const SpanRef& other13) {
574 refType = other13.refType;
575 traceIdLow = other13.traceIdLow;
576 traceIdHigh = other13.traceIdHigh;
577 spanId = other13.spanId;
578 return *this;
579 }
580 void SpanRef::printTo(std::ostream& out) const {
581 using ::apache::thrift::to_string;
582 out << "SpanRef(";
583 out << "refType=" << to_string(refType);
584 out << ", " << "traceIdLow=" << to_string(traceIdLow);
585 out << ", " << "traceIdHigh=" << to_string(traceIdHigh);
586 out << ", " << "spanId=" << to_string(spanId);
587 out << ")";
588 }
589
590
591 Span::~Span() throw() {
592 }
593
594
595 void Span::__set_traceIdLow(const int64_t val) {
596 this->traceIdLow = val;
597 }
598
599 void Span::__set_traceIdHigh(const int64_t val) {
600 this->traceIdHigh = val;
601 }
602
603 void Span::__set_spanId(const int64_t val) {
604 this->spanId = val;
605 }
606
607 void Span::__set_parentSpanId(const int64_t val) {
608 this->parentSpanId = val;
609 }
610
611 void Span::__set_operationName(const std::string& val) {
612 this->operationName = val;
613 }
614
615 void Span::__set_references(const std::vector<SpanRef> & val) {
616 this->references = val;
617 __isset.references = true;
618 }
619
620 void Span::__set_flags(const int32_t val) {
621 this->flags = val;
622 }
623
624 void Span::__set_startTime(const int64_t val) {
625 this->startTime = val;
626 }
627
628 void Span::__set_duration(const int64_t val) {
629 this->duration = val;
630 }
631
632 void Span::__set_tags(const std::vector<Tag> & val) {
633 this->tags = val;
634 __isset.tags = true;
635 }
636
637 void Span::__set_logs(const std::vector<Log> & val) {
638 this->logs = val;
639 __isset.logs = true;
640 }
641 std::ostream& operator<<(std::ostream& out, const Span& obj)
642 {
643 obj.printTo(out);
644 return out;
645 }
646
647
648 uint32_t Span::read(::apache::thrift::protocol::TProtocol* iprot) {
649
650 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
651 uint32_t xfer = 0;
652 std::string fname;
653 ::apache::thrift::protocol::TType ftype;
654 int16_t fid;
655
656 xfer += iprot->readStructBegin(fname);
657
658 using ::apache::thrift::protocol::TProtocolException;
659
660 bool isset_traceIdLow = false;
661 bool isset_traceIdHigh = false;
662 bool isset_spanId = false;
663 bool isset_parentSpanId = false;
664 bool isset_operationName = false;
665 bool isset_flags = false;
666 bool isset_startTime = false;
667 bool isset_duration = false;
668
669 while (true)
670 {
671 xfer += iprot->readFieldBegin(fname, ftype, fid);
672 if (ftype == ::apache::thrift::protocol::T_STOP) {
673 break;
674 }
675 switch (fid)
676 {
677 case 1:
678 if (ftype == ::apache::thrift::protocol::T_I64) {
679 xfer += iprot->readI64(this->traceIdLow);
680 isset_traceIdLow = true;
681 } else {
682 xfer += iprot->skip(ftype);
683 }
684 break;
685 case 2:
686 if (ftype == ::apache::thrift::protocol::T_I64) {
687 xfer += iprot->readI64(this->traceIdHigh);
688 isset_traceIdHigh = true;
689 } else {
690 xfer += iprot->skip(ftype);
691 }
692 break;
693 case 3:
694 if (ftype == ::apache::thrift::protocol::T_I64) {
695 xfer += iprot->readI64(this->spanId);
696 isset_spanId = true;
697 } else {
698 xfer += iprot->skip(ftype);
699 }
700 break;
701 case 4:
702 if (ftype == ::apache::thrift::protocol::T_I64) {
703 xfer += iprot->readI64(this->parentSpanId);
704 isset_parentSpanId = true;
705 } else {
706 xfer += iprot->skip(ftype);
707 }
708 break;
709 case 5:
710 if (ftype == ::apache::thrift::protocol::T_STRING) {
711 xfer += iprot->readString(this->operationName);
712 isset_operationName = true;
713 } else {
714 xfer += iprot->skip(ftype);
715 }
716 break;
717 case 6:
718 if (ftype == ::apache::thrift::protocol::T_LIST) {
719 {
720 this->references.clear();
721 uint32_t _size14;
722 ::apache::thrift::protocol::TType _etype17;
723 xfer += iprot->readListBegin(_etype17, _size14);
724 this->references.resize(_size14);
725 uint32_t _i18;
726 for (_i18 = 0; _i18 < _size14; ++_i18)
727 {
728 xfer += this->references[_i18].read(iprot);
729 }
730 xfer += iprot->readListEnd();
731 }
732 this->__isset.references = true;
733 } else {
734 xfer += iprot->skip(ftype);
735 }
736 break;
737 case 7:
738 if (ftype == ::apache::thrift::protocol::T_I32) {
739 xfer += iprot->readI32(this->flags);
740 isset_flags = true;
741 } else {
742 xfer += iprot->skip(ftype);
743 }
744 break;
745 case 8:
746 if (ftype == ::apache::thrift::protocol::T_I64) {
747 xfer += iprot->readI64(this->startTime);
748 isset_startTime = true;
749 } else {
750 xfer += iprot->skip(ftype);
751 }
752 break;
753 case 9:
754 if (ftype == ::apache::thrift::protocol::T_I64) {
755 xfer += iprot->readI64(this->duration);
756 isset_duration = true;
757 } else {
758 xfer += iprot->skip(ftype);
759 }
760 break;
761 case 10:
762 if (ftype == ::apache::thrift::protocol::T_LIST) {
763 {
764 this->tags.clear();
765 uint32_t _size19;
766 ::apache::thrift::protocol::TType _etype22;
767 xfer += iprot->readListBegin(_etype22, _size19);
768 this->tags.resize(_size19);
769 uint32_t _i23;
770 for (_i23 = 0; _i23 < _size19; ++_i23)
771 {
772 xfer += this->tags[_i23].read(iprot);
773 }
774 xfer += iprot->readListEnd();
775 }
776 this->__isset.tags = true;
777 } else {
778 xfer += iprot->skip(ftype);
779 }
780 break;
781 case 11:
782 if (ftype == ::apache::thrift::protocol::T_LIST) {
783 {
784 this->logs.clear();
785 uint32_t _size24;
786 ::apache::thrift::protocol::TType _etype27;
787 xfer += iprot->readListBegin(_etype27, _size24);
788 this->logs.resize(_size24);
789 uint32_t _i28;
790 for (_i28 = 0; _i28 < _size24; ++_i28)
791 {
792 xfer += this->logs[_i28].read(iprot);
793 }
794 xfer += iprot->readListEnd();
795 }
796 this->__isset.logs = true;
797 } else {
798 xfer += iprot->skip(ftype);
799 }
800 break;
801 default:
802 xfer += iprot->skip(ftype);
803 break;
804 }
805 xfer += iprot->readFieldEnd();
806 }
807
808 xfer += iprot->readStructEnd();
809
810 if (!isset_traceIdLow)
811 throw TProtocolException(TProtocolException::INVALID_DATA);
812 if (!isset_traceIdHigh)
813 throw TProtocolException(TProtocolException::INVALID_DATA);
814 if (!isset_spanId)
815 throw TProtocolException(TProtocolException::INVALID_DATA);
816 if (!isset_parentSpanId)
817 throw TProtocolException(TProtocolException::INVALID_DATA);
818 if (!isset_operationName)
819 throw TProtocolException(TProtocolException::INVALID_DATA);
820 if (!isset_flags)
821 throw TProtocolException(TProtocolException::INVALID_DATA);
822 if (!isset_startTime)
823 throw TProtocolException(TProtocolException::INVALID_DATA);
824 if (!isset_duration)
825 throw TProtocolException(TProtocolException::INVALID_DATA);
826 return xfer;
827 }
828
829 uint32_t Span::write(::apache::thrift::protocol::TProtocol* oprot) const {
830 uint32_t xfer = 0;
831 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
832 xfer += oprot->writeStructBegin("Span");
833
834 xfer += oprot->writeFieldBegin("traceIdLow", ::apache::thrift::protocol::T_I64, 1);
835 xfer += oprot->writeI64(this->traceIdLow);
836 xfer += oprot->writeFieldEnd();
837
838 xfer += oprot->writeFieldBegin("traceIdHigh", ::apache::thrift::protocol::T_I64, 2);
839 xfer += oprot->writeI64(this->traceIdHigh);
840 xfer += oprot->writeFieldEnd();
841
842 xfer += oprot->writeFieldBegin("spanId", ::apache::thrift::protocol::T_I64, 3);
843 xfer += oprot->writeI64(this->spanId);
844 xfer += oprot->writeFieldEnd();
845
846 xfer += oprot->writeFieldBegin("parentSpanId", ::apache::thrift::protocol::T_I64, 4);
847 xfer += oprot->writeI64(this->parentSpanId);
848 xfer += oprot->writeFieldEnd();
849
850 xfer += oprot->writeFieldBegin("operationName", ::apache::thrift::protocol::T_STRING, 5);
851 xfer += oprot->writeString(this->operationName);
852 xfer += oprot->writeFieldEnd();
853
854 if (this->__isset.references) {
855 xfer += oprot->writeFieldBegin("references", ::apache::thrift::protocol::T_LIST, 6);
856 {
857 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->references.size()));
858 std::vector<SpanRef> ::const_iterator _iter29;
859 for (_iter29 = this->references.begin(); _iter29 != this->references.end(); ++_iter29)
860 {
861 xfer += (*_iter29).write(oprot);
862 }
863 xfer += oprot->writeListEnd();
864 }
865 xfer += oprot->writeFieldEnd();
866 }
867 xfer += oprot->writeFieldBegin("flags", ::apache::thrift::protocol::T_I32, 7);
868 xfer += oprot->writeI32(this->flags);
869 xfer += oprot->writeFieldEnd();
870
871 xfer += oprot->writeFieldBegin("startTime", ::apache::thrift::protocol::T_I64, 8);
872 xfer += oprot->writeI64(this->startTime);
873 xfer += oprot->writeFieldEnd();
874
875 xfer += oprot->writeFieldBegin("duration", ::apache::thrift::protocol::T_I64, 9);
876 xfer += oprot->writeI64(this->duration);
877 xfer += oprot->writeFieldEnd();
878
879 if (this->__isset.tags) {
880 xfer += oprot->writeFieldBegin("tags", ::apache::thrift::protocol::T_LIST, 10);
881 {
882 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->tags.size()));
883 std::vector<Tag> ::const_iterator _iter30;
884 for (_iter30 = this->tags.begin(); _iter30 != this->tags.end(); ++_iter30)
885 {
886 xfer += (*_iter30).write(oprot);
887 }
888 xfer += oprot->writeListEnd();
889 }
890 xfer += oprot->writeFieldEnd();
891 }
892 if (this->__isset.logs) {
893 xfer += oprot->writeFieldBegin("logs", ::apache::thrift::protocol::T_LIST, 11);
894 {
895 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->logs.size()));
896 std::vector<Log> ::const_iterator _iter31;
897 for (_iter31 = this->logs.begin(); _iter31 != this->logs.end(); ++_iter31)
898 {
899 xfer += (*_iter31).write(oprot);
900 }
901 xfer += oprot->writeListEnd();
902 }
903 xfer += oprot->writeFieldEnd();
904 }
905 xfer += oprot->writeFieldStop();
906 xfer += oprot->writeStructEnd();
907 return xfer;
908 }
909
910 void swap(Span &a, Span &b) {
911 using ::std::swap;
912 swap(a.traceIdLow, b.traceIdLow);
913 swap(a.traceIdHigh, b.traceIdHigh);
914 swap(a.spanId, b.spanId);
915 swap(a.parentSpanId, b.parentSpanId);
916 swap(a.operationName, b.operationName);
917 swap(a.references, b.references);
918 swap(a.flags, b.flags);
919 swap(a.startTime, b.startTime);
920 swap(a.duration, b.duration);
921 swap(a.tags, b.tags);
922 swap(a.logs, b.logs);
923 swap(a.__isset, b.__isset);
924 }
925
926 Span::Span(const Span& other32) {
927 traceIdLow = other32.traceIdLow;
928 traceIdHigh = other32.traceIdHigh;
929 spanId = other32.spanId;
930 parentSpanId = other32.parentSpanId;
931 operationName = other32.operationName;
932 references = other32.references;
933 flags = other32.flags;
934 startTime = other32.startTime;
935 duration = other32.duration;
936 tags = other32.tags;
937 logs = other32.logs;
938 __isset = other32.__isset;
939 }
940 Span& Span::operator=(const Span& other33) {
941 traceIdLow = other33.traceIdLow;
942 traceIdHigh = other33.traceIdHigh;
943 spanId = other33.spanId;
944 parentSpanId = other33.parentSpanId;
945 operationName = other33.operationName;
946 references = other33.references;
947 flags = other33.flags;
948 startTime = other33.startTime;
949 duration = other33.duration;
950 tags = other33.tags;
951 logs = other33.logs;
952 __isset = other33.__isset;
953 return *this;
954 }
955 void Span::printTo(std::ostream& out) const {
956 using ::apache::thrift::to_string;
957 out << "Span(";
958 out << "traceIdLow=" << to_string(traceIdLow);
959 out << ", " << "traceIdHigh=" << to_string(traceIdHigh);
960 out << ", " << "spanId=" << to_string(spanId);
961 out << ", " << "parentSpanId=" << to_string(parentSpanId);
962 out << ", " << "operationName=" << to_string(operationName);
963 out << ", " << "references="; (__isset.references ? (out << to_string(references)) : (out << "<null>"));
964 out << ", " << "flags=" << to_string(flags);
965 out << ", " << "startTime=" << to_string(startTime);
966 out << ", " << "duration=" << to_string(duration);
967 out << ", " << "tags="; (__isset.tags ? (out << to_string(tags)) : (out << "<null>"));
968 out << ", " << "logs="; (__isset.logs ? (out << to_string(logs)) : (out << "<null>"));
969 out << ")";
970 }
971
972
973 Process::~Process() throw() {
974 }
975
976
977 void Process::__set_serviceName(const std::string& val) {
978 this->serviceName = val;
979 }
980
981 void Process::__set_tags(const std::vector<Tag> & val) {
982 this->tags = val;
983 __isset.tags = true;
984 }
985 std::ostream& operator<<(std::ostream& out, const Process& obj)
986 {
987 obj.printTo(out);
988 return out;
989 }
990
991
992 uint32_t Process::read(::apache::thrift::protocol::TProtocol* iprot) {
993
994 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
995 uint32_t xfer = 0;
996 std::string fname;
997 ::apache::thrift::protocol::TType ftype;
998 int16_t fid;
999
1000 xfer += iprot->readStructBegin(fname);
1001
1002 using ::apache::thrift::protocol::TProtocolException;
1003
1004 bool isset_serviceName = false;
1005
1006 while (true)
1007 {
1008 xfer += iprot->readFieldBegin(fname, ftype, fid);
1009 if (ftype == ::apache::thrift::protocol::T_STOP) {
1010 break;
1011 }
1012 switch (fid)
1013 {
1014 case 1:
1015 if (ftype == ::apache::thrift::protocol::T_STRING) {
1016 xfer += iprot->readString(this->serviceName);
1017 isset_serviceName = true;
1018 } else {
1019 xfer += iprot->skip(ftype);
1020 }
1021 break;
1022 case 2:
1023 if (ftype == ::apache::thrift::protocol::T_LIST) {
1024 {
1025 this->tags.clear();
1026 uint32_t _size34;
1027 ::apache::thrift::protocol::TType _etype37;
1028 xfer += iprot->readListBegin(_etype37, _size34);
1029 this->tags.resize(_size34);
1030 uint32_t _i38;
1031 for (_i38 = 0; _i38 < _size34; ++_i38)
1032 {
1033 xfer += this->tags[_i38].read(iprot);
1034 }
1035 xfer += iprot->readListEnd();
1036 }
1037 this->__isset.tags = true;
1038 } else {
1039 xfer += iprot->skip(ftype);
1040 }
1041 break;
1042 default:
1043 xfer += iprot->skip(ftype);
1044 break;
1045 }
1046 xfer += iprot->readFieldEnd();
1047 }
1048
1049 xfer += iprot->readStructEnd();
1050
1051 if (!isset_serviceName)
1052 throw TProtocolException(TProtocolException::INVALID_DATA);
1053 return xfer;
1054 }
1055
1056 uint32_t Process::write(::apache::thrift::protocol::TProtocol* oprot) const {
1057 uint32_t xfer = 0;
1058 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1059 xfer += oprot->writeStructBegin("Process");
1060
1061 xfer += oprot->writeFieldBegin("serviceName", ::apache::thrift::protocol::T_STRING, 1);
1062 xfer += oprot->writeString(this->serviceName);
1063 xfer += oprot->writeFieldEnd();
1064
1065 if (this->__isset.tags) {
1066 xfer += oprot->writeFieldBegin("tags", ::apache::thrift::protocol::T_LIST, 2);
1067 {
1068 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->tags.size()));
1069 std::vector<Tag> ::const_iterator _iter39;
1070 for (_iter39 = this->tags.begin(); _iter39 != this->tags.end(); ++_iter39)
1071 {
1072 xfer += (*_iter39).write(oprot);
1073 }
1074 xfer += oprot->writeListEnd();
1075 }
1076 xfer += oprot->writeFieldEnd();
1077 }
1078 xfer += oprot->writeFieldStop();
1079 xfer += oprot->writeStructEnd();
1080 return xfer;
1081 }
1082
1083 void swap(Process &a, Process &b) {
1084 using ::std::swap;
1085 swap(a.serviceName, b.serviceName);
1086 swap(a.tags, b.tags);
1087 swap(a.__isset, b.__isset);
1088 }
1089
1090 Process::Process(const Process& other40) {
1091 serviceName = other40.serviceName;
1092 tags = other40.tags;
1093 __isset = other40.__isset;
1094 }
1095 Process& Process::operator=(const Process& other41) {
1096 serviceName = other41.serviceName;
1097 tags = other41.tags;
1098 __isset = other41.__isset;
1099 return *this;
1100 }
1101 void Process::printTo(std::ostream& out) const {
1102 using ::apache::thrift::to_string;
1103 out << "Process(";
1104 out << "serviceName=" << to_string(serviceName);
1105 out << ", " << "tags="; (__isset.tags ? (out << to_string(tags)) : (out << "<null>"));
1106 out << ")";
1107 }
1108
1109
1110 Batch::~Batch() throw() {
1111 }
1112
1113
1114 void Batch::__set_process(const Process& val) {
1115 this->process = val;
1116 }
1117
1118 void Batch::__set_spans(const std::vector<Span> & val) {
1119 this->spans = val;
1120 }
1121 std::ostream& operator<<(std::ostream& out, const Batch& obj)
1122 {
1123 obj.printTo(out);
1124 return out;
1125 }
1126
1127
1128 uint32_t Batch::read(::apache::thrift::protocol::TProtocol* iprot) {
1129
1130 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1131 uint32_t xfer = 0;
1132 std::string fname;
1133 ::apache::thrift::protocol::TType ftype;
1134 int16_t fid;
1135
1136 xfer += iprot->readStructBegin(fname);
1137
1138 using ::apache::thrift::protocol::TProtocolException;
1139
1140 bool isset_process = false;
1141 bool isset_spans = false;
1142
1143 while (true)
1144 {
1145 xfer += iprot->readFieldBegin(fname, ftype, fid);
1146 if (ftype == ::apache::thrift::protocol::T_STOP) {
1147 break;
1148 }
1149 switch (fid)
1150 {
1151 case 1:
1152 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1153 xfer += this->process.read(iprot);
1154 isset_process = true;
1155 } else {
1156 xfer += iprot->skip(ftype);
1157 }
1158 break;
1159 case 2:
1160 if (ftype == ::apache::thrift::protocol::T_LIST) {
1161 {
1162 this->spans.clear();
1163 uint32_t _size42;
1164 ::apache::thrift::protocol::TType _etype45;
1165 xfer += iprot->readListBegin(_etype45, _size42);
1166 this->spans.resize(_size42);
1167 uint32_t _i46;
1168 for (_i46 = 0; _i46 < _size42; ++_i46)
1169 {
1170 xfer += this->spans[_i46].read(iprot);
1171 }
1172 xfer += iprot->readListEnd();
1173 }
1174 isset_spans = true;
1175 } else {
1176 xfer += iprot->skip(ftype);
1177 }
1178 break;
1179 default:
1180 xfer += iprot->skip(ftype);
1181 break;
1182 }
1183 xfer += iprot->readFieldEnd();
1184 }
1185
1186 xfer += iprot->readStructEnd();
1187
1188 if (!isset_process)
1189 throw TProtocolException(TProtocolException::INVALID_DATA);
1190 if (!isset_spans)
1191 throw TProtocolException(TProtocolException::INVALID_DATA);
1192 return xfer;
1193 }
1194
1195 uint32_t Batch::write(::apache::thrift::protocol::TProtocol* oprot) const {
1196 uint32_t xfer = 0;
1197 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1198 xfer += oprot->writeStructBegin("Batch");
1199
1200 xfer += oprot->writeFieldBegin("process", ::apache::thrift::protocol::T_STRUCT, 1);
1201 xfer += this->process.write(oprot);
1202 xfer += oprot->writeFieldEnd();
1203
1204 xfer += oprot->writeFieldBegin("spans", ::apache::thrift::protocol::T_LIST, 2);
1205 {
1206 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->spans.size()));
1207 std::vector<Span> ::const_iterator _iter47;
1208 for (_iter47 = this->spans.begin(); _iter47 != this->spans.end(); ++_iter47)
1209 {
1210 xfer += (*_iter47).write(oprot);
1211 }
1212 xfer += oprot->writeListEnd();
1213 }
1214 xfer += oprot->writeFieldEnd();
1215
1216 xfer += oprot->writeFieldStop();
1217 xfer += oprot->writeStructEnd();
1218 return xfer;
1219 }
1220
1221 void swap(Batch &a, Batch &b) {
1222 using ::std::swap;
1223 swap(a.process, b.process);
1224 swap(a.spans, b.spans);
1225 }
1226
1227 Batch::Batch(const Batch& other48) {
1228 process = other48.process;
1229 spans = other48.spans;
1230 }
1231 Batch& Batch::operator=(const Batch& other49) {
1232 process = other49.process;
1233 spans = other49.spans;
1234 return *this;
1235 }
1236 void Batch::printTo(std::ostream& out) const {
1237 using ::apache::thrift::to_string;
1238 out << "Batch(";
1239 out << "process=" << to_string(process);
1240 out << ", " << "spans=" << to_string(spans);
1241 out << ")";
1242 }
1243
1244
1245 BatchSubmitResponse::~BatchSubmitResponse() throw() {
1246 }
1247
1248
1249 void BatchSubmitResponse::__set_ok(const bool val) {
1250 this->ok = val;
1251 }
1252 std::ostream& operator<<(std::ostream& out, const BatchSubmitResponse& obj)
1253 {
1254 obj.printTo(out);
1255 return out;
1256 }
1257
1258
1259 uint32_t BatchSubmitResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
1260
1261 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1262 uint32_t xfer = 0;
1263 std::string fname;
1264 ::apache::thrift::protocol::TType ftype;
1265 int16_t fid;
1266
1267 xfer += iprot->readStructBegin(fname);
1268
1269 using ::apache::thrift::protocol::TProtocolException;
1270
1271 bool isset_ok = false;
1272
1273 while (true)
1274 {
1275 xfer += iprot->readFieldBegin(fname, ftype, fid);
1276 if (ftype == ::apache::thrift::protocol::T_STOP) {
1277 break;
1278 }
1279 switch (fid)
1280 {
1281 case 1:
1282 if (ftype == ::apache::thrift::protocol::T_BOOL) {
1283 xfer += iprot->readBool(this->ok);
1284 isset_ok = true;
1285 } else {
1286 xfer += iprot->skip(ftype);
1287 }
1288 break;
1289 default:
1290 xfer += iprot->skip(ftype);
1291 break;
1292 }
1293 xfer += iprot->readFieldEnd();
1294 }
1295
1296 xfer += iprot->readStructEnd();
1297
1298 if (!isset_ok)
1299 throw TProtocolException(TProtocolException::INVALID_DATA);
1300 return xfer;
1301 }
1302
1303 uint32_t BatchSubmitResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
1304 uint32_t xfer = 0;
1305 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1306 xfer += oprot->writeStructBegin("BatchSubmitResponse");
1307
1308 xfer += oprot->writeFieldBegin("ok", ::apache::thrift::protocol::T_BOOL, 1);
1309 xfer += oprot->writeBool(this->ok);
1310 xfer += oprot->writeFieldEnd();
1311
1312 xfer += oprot->writeFieldStop();
1313 xfer += oprot->writeStructEnd();
1314 return xfer;
1315 }
1316
1317 void swap(BatchSubmitResponse &a, BatchSubmitResponse &b) {
1318 using ::std::swap;
1319 swap(a.ok, b.ok);
1320 }
1321
1322 BatchSubmitResponse::BatchSubmitResponse(const BatchSubmitResponse& other50) {
1323 ok = other50.ok;
1324 }
1325 BatchSubmitResponse& BatchSubmitResponse::operator=(const BatchSubmitResponse& other51) {
1326 ok = other51.ok;
1327 return *this;
1328 }
1329 void BatchSubmitResponse::printTo(std::ostream& out) const {
1330 using ::apache::thrift::to_string;
1331 out << "BatchSubmitResponse(";
1332 out << "ok=" << to_string(ok);
1333 out << ")";
1334 }
1335
1336 }} // namespace