2 * Autogenerated by Thrift Compiler (0.14.0)
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
7 #include "jaeger_types.h"
12 #include <thrift/TToString.h>
14 namespace jaegertracing
{ namespace thrift
{
16 int _kTagTypeValues
[] = {
23 const char* _kTagTypeNames
[] = {
30 const std::map
<int, const char*> _TagType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kTagTypeValues
, _kTagTypeNames
), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr));
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()) {
37 out
<< static_cast<int>(val
);
42 std::string
to_string(const TagType::type
& val
) {
43 std::map
<int, const char*>::const_iterator it
= _TagType_VALUES_TO_NAMES
.find(val
);
44 if (it
!= _TagType_VALUES_TO_NAMES
.end()) {
45 return std::string(it
->second
);
47 return std::to_string(static_cast<int>(val
));
51 int _kSpanRefTypeValues
[] = {
52 SpanRefType::CHILD_OF
,
53 SpanRefType::FOLLOWS_FROM
55 const char* _kSpanRefTypeNames
[] = {
59 const std::map
<int, const char*> _SpanRefType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kSpanRefTypeValues
, _kSpanRefTypeNames
), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr));
61 std::ostream
& operator<<(std::ostream
& out
, const SpanRefType::type
& val
) {
62 std::map
<int, const char*>::const_iterator it
= _SpanRefType_VALUES_TO_NAMES
.find(val
);
63 if (it
!= _SpanRefType_VALUES_TO_NAMES
.end()) {
66 out
<< static_cast<int>(val
);
71 std::string
to_string(const SpanRefType::type
& val
) {
72 std::map
<int, const char*>::const_iterator it
= _SpanRefType_VALUES_TO_NAMES
.find(val
);
73 if (it
!= _SpanRefType_VALUES_TO_NAMES
.end()) {
74 return std::string(it
->second
);
76 return std::to_string(static_cast<int>(val
));
81 Tag::~Tag() noexcept
{
85 void Tag::__set_key(const std::string
& val
) {
89 void Tag::__set_vType(const TagType::type val
) {
93 void Tag::__set_vStr(const std::string
& val
) {
98 void Tag::__set_vDouble(const double val
) {
100 __isset
.vDouble
= true;
103 void Tag::__set_vBool(const bool val
) {
105 __isset
.vBool
= true;
108 void Tag::__set_vLong(const int64_t val
) {
110 __isset
.vLong
= true;
113 void Tag::__set_vBinary(const std::string
& val
) {
115 __isset
.vBinary
= true;
117 std::ostream
& operator<<(std::ostream
& out
, const Tag
& obj
)
124 uint32_t Tag::read(::apache::thrift::protocol::TProtocol
* iprot
) {
126 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
129 ::apache::thrift::protocol::TType ftype
;
132 xfer
+= iprot
->readStructBegin(fname
);
134 using ::apache::thrift::protocol::TProtocolException
;
136 bool isset_key
= false;
137 bool isset_vType
= false;
141 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
142 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
148 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
149 xfer
+= iprot
->readString(this->key
);
152 xfer
+= iprot
->skip(ftype
);
156 if (ftype
== ::apache::thrift::protocol::T_I32
) {
158 xfer
+= iprot
->readI32(ecast0
);
159 this->vType
= (TagType::type
)ecast0
;
162 xfer
+= iprot
->skip(ftype
);
166 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
167 xfer
+= iprot
->readString(this->vStr
);
168 this->__isset
.vStr
= true;
170 xfer
+= iprot
->skip(ftype
);
174 if (ftype
== ::apache::thrift::protocol::T_DOUBLE
) {
175 xfer
+= iprot
->readDouble(this->vDouble
);
176 this->__isset
.vDouble
= true;
178 xfer
+= iprot
->skip(ftype
);
182 if (ftype
== ::apache::thrift::protocol::T_BOOL
) {
183 xfer
+= iprot
->readBool(this->vBool
);
184 this->__isset
.vBool
= true;
186 xfer
+= iprot
->skip(ftype
);
190 if (ftype
== ::apache::thrift::protocol::T_I64
) {
191 xfer
+= iprot
->readI64(this->vLong
);
192 this->__isset
.vLong
= true;
194 xfer
+= iprot
->skip(ftype
);
198 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
199 xfer
+= iprot
->readBinary(this->vBinary
);
200 this->__isset
.vBinary
= true;
202 xfer
+= iprot
->skip(ftype
);
206 xfer
+= iprot
->skip(ftype
);
209 xfer
+= iprot
->readFieldEnd();
212 xfer
+= iprot
->readStructEnd();
215 throw TProtocolException(TProtocolException::INVALID_DATA
);
217 throw TProtocolException(TProtocolException::INVALID_DATA
);
221 uint32_t Tag::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
223 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
224 xfer
+= oprot
->writeStructBegin("Tag");
226 xfer
+= oprot
->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING
, 1);
227 xfer
+= oprot
->writeString(this->key
);
228 xfer
+= oprot
->writeFieldEnd();
230 xfer
+= oprot
->writeFieldBegin("vType", ::apache::thrift::protocol::T_I32
, 2);
231 xfer
+= oprot
->writeI32((int32_t)this->vType
);
232 xfer
+= oprot
->writeFieldEnd();
234 if (this->__isset
.vStr
) {
235 xfer
+= oprot
->writeFieldBegin("vStr", ::apache::thrift::protocol::T_STRING
, 3);
236 xfer
+= oprot
->writeString(this->vStr
);
237 xfer
+= oprot
->writeFieldEnd();
239 if (this->__isset
.vDouble
) {
240 xfer
+= oprot
->writeFieldBegin("vDouble", ::apache::thrift::protocol::T_DOUBLE
, 4);
241 xfer
+= oprot
->writeDouble(this->vDouble
);
242 xfer
+= oprot
->writeFieldEnd();
244 if (this->__isset
.vBool
) {
245 xfer
+= oprot
->writeFieldBegin("vBool", ::apache::thrift::protocol::T_BOOL
, 5);
246 xfer
+= oprot
->writeBool(this->vBool
);
247 xfer
+= oprot
->writeFieldEnd();
249 if (this->__isset
.vLong
) {
250 xfer
+= oprot
->writeFieldBegin("vLong", ::apache::thrift::protocol::T_I64
, 6);
251 xfer
+= oprot
->writeI64(this->vLong
);
252 xfer
+= oprot
->writeFieldEnd();
254 if (this->__isset
.vBinary
) {
255 xfer
+= oprot
->writeFieldBegin("vBinary", ::apache::thrift::protocol::T_STRING
, 7);
256 xfer
+= oprot
->writeBinary(this->vBinary
);
257 xfer
+= oprot
->writeFieldEnd();
259 xfer
+= oprot
->writeFieldStop();
260 xfer
+= oprot
->writeStructEnd();
264 void swap(Tag
&a
, Tag
&b
) {
267 swap(a
.vType
, b
.vType
);
268 swap(a
.vStr
, b
.vStr
);
269 swap(a
.vDouble
, b
.vDouble
);
270 swap(a
.vBool
, b
.vBool
);
271 swap(a
.vLong
, b
.vLong
);
272 swap(a
.vBinary
, b
.vBinary
);
273 swap(a
.__isset
, b
.__isset
);
276 Tag::Tag(const Tag
& other1
) {
278 vType
= other1
.vType
;
280 vDouble
= other1
.vDouble
;
281 vBool
= other1
.vBool
;
282 vLong
= other1
.vLong
;
283 vBinary
= other1
.vBinary
;
284 __isset
= other1
.__isset
;
286 Tag
& Tag::operator=(const Tag
& other2
) {
288 vType
= other2
.vType
;
290 vDouble
= other2
.vDouble
;
291 vBool
= other2
.vBool
;
292 vLong
= other2
.vLong
;
293 vBinary
= other2
.vBinary
;
294 __isset
= other2
.__isset
;
297 void Tag::printTo(std::ostream
& out
) const {
298 using ::apache::thrift::to_string
;
300 out
<< "key=" << to_string(key
);
301 out
<< ", " << "vType=" << to_string(vType
);
302 out
<< ", " << "vStr="; (__isset
.vStr
? (out
<< to_string(vStr
)) : (out
<< "<null>"));
303 out
<< ", " << "vDouble="; (__isset
.vDouble
? (out
<< to_string(vDouble
)) : (out
<< "<null>"));
304 out
<< ", " << "vBool="; (__isset
.vBool
? (out
<< to_string(vBool
)) : (out
<< "<null>"));
305 out
<< ", " << "vLong="; (__isset
.vLong
? (out
<< to_string(vLong
)) : (out
<< "<null>"));
306 out
<< ", " << "vBinary="; (__isset
.vBinary
? (out
<< to_string(vBinary
)) : (out
<< "<null>"));
311 Log::~Log() noexcept
{
315 void Log::__set_timestamp(const int64_t val
) {
316 this->timestamp
= val
;
319 void Log::__set_fields(const std::vector
<Tag
> & val
) {
322 std::ostream
& operator<<(std::ostream
& out
, const Log
& obj
)
329 uint32_t Log::read(::apache::thrift::protocol::TProtocol
* iprot
) {
331 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
334 ::apache::thrift::protocol::TType ftype
;
337 xfer
+= iprot
->readStructBegin(fname
);
339 using ::apache::thrift::protocol::TProtocolException
;
341 bool isset_timestamp
= false;
342 bool isset_fields
= false;
346 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
347 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
353 if (ftype
== ::apache::thrift::protocol::T_I64
) {
354 xfer
+= iprot
->readI64(this->timestamp
);
355 isset_timestamp
= true;
357 xfer
+= iprot
->skip(ftype
);
361 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
363 this->fields
.clear();
365 ::apache::thrift::protocol::TType _etype6
;
366 xfer
+= iprot
->readListBegin(_etype6
, _size3
);
367 this->fields
.resize(_size3
);
369 for (_i7
= 0; _i7
< _size3
; ++_i7
)
371 xfer
+= this->fields
[_i7
].read(iprot
);
373 xfer
+= iprot
->readListEnd();
377 xfer
+= iprot
->skip(ftype
);
381 xfer
+= iprot
->skip(ftype
);
384 xfer
+= iprot
->readFieldEnd();
387 xfer
+= iprot
->readStructEnd();
389 if (!isset_timestamp
)
390 throw TProtocolException(TProtocolException::INVALID_DATA
);
392 throw TProtocolException(TProtocolException::INVALID_DATA
);
396 uint32_t Log::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
398 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
399 xfer
+= oprot
->writeStructBegin("Log");
401 xfer
+= oprot
->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64
, 1);
402 xfer
+= oprot
->writeI64(this->timestamp
);
403 xfer
+= oprot
->writeFieldEnd();
405 xfer
+= oprot
->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST
, 2);
407 xfer
+= oprot
->writeListBegin(::apache::thrift::protocol::T_STRUCT
, static_cast<uint32_t>(this->fields
.size()));
408 std::vector
<Tag
> ::const_iterator _iter8
;
409 for (_iter8
= this->fields
.begin(); _iter8
!= this->fields
.end(); ++_iter8
)
411 xfer
+= (*_iter8
).write(oprot
);
413 xfer
+= oprot
->writeListEnd();
415 xfer
+= oprot
->writeFieldEnd();
417 xfer
+= oprot
->writeFieldStop();
418 xfer
+= oprot
->writeStructEnd();
422 void swap(Log
&a
, Log
&b
) {
424 swap(a
.timestamp
, b
.timestamp
);
425 swap(a
.fields
, b
.fields
);
428 Log::Log(const Log
& other9
) {
429 timestamp
= other9
.timestamp
;
430 fields
= other9
.fields
;
432 Log
& Log::operator=(const Log
& other10
) {
433 timestamp
= other10
.timestamp
;
434 fields
= other10
.fields
;
437 void Log::printTo(std::ostream
& out
) const {
438 using ::apache::thrift::to_string
;
440 out
<< "timestamp=" << to_string(timestamp
);
441 out
<< ", " << "fields=" << to_string(fields
);
446 SpanRef::~SpanRef() noexcept
{
450 void SpanRef::__set_refType(const SpanRefType::type val
) {
454 void SpanRef::__set_traceIdLow(const int64_t val
) {
455 this->traceIdLow
= val
;
458 void SpanRef::__set_traceIdHigh(const int64_t val
) {
459 this->traceIdHigh
= val
;
462 void SpanRef::__set_spanId(const int64_t val
) {
465 std::ostream
& operator<<(std::ostream
& out
, const SpanRef
& obj
)
472 uint32_t SpanRef::read(::apache::thrift::protocol::TProtocol
* iprot
) {
474 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
477 ::apache::thrift::protocol::TType ftype
;
480 xfer
+= iprot
->readStructBegin(fname
);
482 using ::apache::thrift::protocol::TProtocolException
;
484 bool isset_refType
= false;
485 bool isset_traceIdLow
= false;
486 bool isset_traceIdHigh
= false;
487 bool isset_spanId
= false;
491 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
492 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
498 if (ftype
== ::apache::thrift::protocol::T_I32
) {
500 xfer
+= iprot
->readI32(ecast11
);
501 this->refType
= (SpanRefType::type
)ecast11
;
502 isset_refType
= true;
504 xfer
+= iprot
->skip(ftype
);
508 if (ftype
== ::apache::thrift::protocol::T_I64
) {
509 xfer
+= iprot
->readI64(this->traceIdLow
);
510 isset_traceIdLow
= true;
512 xfer
+= iprot
->skip(ftype
);
516 if (ftype
== ::apache::thrift::protocol::T_I64
) {
517 xfer
+= iprot
->readI64(this->traceIdHigh
);
518 isset_traceIdHigh
= true;
520 xfer
+= iprot
->skip(ftype
);
524 if (ftype
== ::apache::thrift::protocol::T_I64
) {
525 xfer
+= iprot
->readI64(this->spanId
);
528 xfer
+= iprot
->skip(ftype
);
532 xfer
+= iprot
->skip(ftype
);
535 xfer
+= iprot
->readFieldEnd();
538 xfer
+= iprot
->readStructEnd();
541 throw TProtocolException(TProtocolException::INVALID_DATA
);
542 if (!isset_traceIdLow
)
543 throw TProtocolException(TProtocolException::INVALID_DATA
);
544 if (!isset_traceIdHigh
)
545 throw TProtocolException(TProtocolException::INVALID_DATA
);
547 throw TProtocolException(TProtocolException::INVALID_DATA
);
551 uint32_t SpanRef::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
553 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
554 xfer
+= oprot
->writeStructBegin("SpanRef");
556 xfer
+= oprot
->writeFieldBegin("refType", ::apache::thrift::protocol::T_I32
, 1);
557 xfer
+= oprot
->writeI32((int32_t)this->refType
);
558 xfer
+= oprot
->writeFieldEnd();
560 xfer
+= oprot
->writeFieldBegin("traceIdLow", ::apache::thrift::protocol::T_I64
, 2);
561 xfer
+= oprot
->writeI64(this->traceIdLow
);
562 xfer
+= oprot
->writeFieldEnd();
564 xfer
+= oprot
->writeFieldBegin("traceIdHigh", ::apache::thrift::protocol::T_I64
, 3);
565 xfer
+= oprot
->writeI64(this->traceIdHigh
);
566 xfer
+= oprot
->writeFieldEnd();
568 xfer
+= oprot
->writeFieldBegin("spanId", ::apache::thrift::protocol::T_I64
, 4);
569 xfer
+= oprot
->writeI64(this->spanId
);
570 xfer
+= oprot
->writeFieldEnd();
572 xfer
+= oprot
->writeFieldStop();
573 xfer
+= oprot
->writeStructEnd();
577 void swap(SpanRef
&a
, SpanRef
&b
) {
579 swap(a
.refType
, b
.refType
);
580 swap(a
.traceIdLow
, b
.traceIdLow
);
581 swap(a
.traceIdHigh
, b
.traceIdHigh
);
582 swap(a
.spanId
, b
.spanId
);
585 SpanRef::SpanRef(const SpanRef
& other12
) {
586 refType
= other12
.refType
;
587 traceIdLow
= other12
.traceIdLow
;
588 traceIdHigh
= other12
.traceIdHigh
;
589 spanId
= other12
.spanId
;
591 SpanRef
& SpanRef::operator=(const SpanRef
& other13
) {
592 refType
= other13
.refType
;
593 traceIdLow
= other13
.traceIdLow
;
594 traceIdHigh
= other13
.traceIdHigh
;
595 spanId
= other13
.spanId
;
598 void SpanRef::printTo(std::ostream
& out
) const {
599 using ::apache::thrift::to_string
;
601 out
<< "refType=" << to_string(refType
);
602 out
<< ", " << "traceIdLow=" << to_string(traceIdLow
);
603 out
<< ", " << "traceIdHigh=" << to_string(traceIdHigh
);
604 out
<< ", " << "spanId=" << to_string(spanId
);
609 Span::~Span() noexcept
{
613 void Span::__set_traceIdLow(const int64_t val
) {
614 this->traceIdLow
= val
;
617 void Span::__set_traceIdHigh(const int64_t val
) {
618 this->traceIdHigh
= val
;
621 void Span::__set_spanId(const int64_t val
) {
625 void Span::__set_parentSpanId(const int64_t val
) {
626 this->parentSpanId
= val
;
629 void Span::__set_operationName(const std::string
& val
) {
630 this->operationName
= val
;
633 void Span::__set_references(const std::vector
<SpanRef
> & val
) {
634 this->references
= val
;
635 __isset
.references
= true;
638 void Span::__set_flags(const int32_t val
) {
642 void Span::__set_startTime(const int64_t val
) {
643 this->startTime
= val
;
646 void Span::__set_duration(const int64_t val
) {
647 this->duration
= val
;
650 void Span::__set_tags(const std::vector
<Tag
> & val
) {
655 void Span::__set_logs(const std::vector
<Log
> & val
) {
659 std::ostream
& operator<<(std::ostream
& out
, const Span
& obj
)
666 uint32_t Span::read(::apache::thrift::protocol::TProtocol
* iprot
) {
668 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
671 ::apache::thrift::protocol::TType ftype
;
674 xfer
+= iprot
->readStructBegin(fname
);
676 using ::apache::thrift::protocol::TProtocolException
;
678 bool isset_traceIdLow
= false;
679 bool isset_traceIdHigh
= false;
680 bool isset_spanId
= false;
681 bool isset_parentSpanId
= false;
682 bool isset_operationName
= false;
683 bool isset_flags
= false;
684 bool isset_startTime
= false;
685 bool isset_duration
= false;
689 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
690 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
696 if (ftype
== ::apache::thrift::protocol::T_I64
) {
697 xfer
+= iprot
->readI64(this->traceIdLow
);
698 isset_traceIdLow
= true;
700 xfer
+= iprot
->skip(ftype
);
704 if (ftype
== ::apache::thrift::protocol::T_I64
) {
705 xfer
+= iprot
->readI64(this->traceIdHigh
);
706 isset_traceIdHigh
= true;
708 xfer
+= iprot
->skip(ftype
);
712 if (ftype
== ::apache::thrift::protocol::T_I64
) {
713 xfer
+= iprot
->readI64(this->spanId
);
716 xfer
+= iprot
->skip(ftype
);
720 if (ftype
== ::apache::thrift::protocol::T_I64
) {
721 xfer
+= iprot
->readI64(this->parentSpanId
);
722 isset_parentSpanId
= true;
724 xfer
+= iprot
->skip(ftype
);
728 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
729 xfer
+= iprot
->readString(this->operationName
);
730 isset_operationName
= true;
732 xfer
+= iprot
->skip(ftype
);
736 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
738 this->references
.clear();
740 ::apache::thrift::protocol::TType _etype17
;
741 xfer
+= iprot
->readListBegin(_etype17
, _size14
);
742 this->references
.resize(_size14
);
744 for (_i18
= 0; _i18
< _size14
; ++_i18
)
746 xfer
+= this->references
[_i18
].read(iprot
);
748 xfer
+= iprot
->readListEnd();
750 this->__isset
.references
= true;
752 xfer
+= iprot
->skip(ftype
);
756 if (ftype
== ::apache::thrift::protocol::T_I32
) {
757 xfer
+= iprot
->readI32(this->flags
);
760 xfer
+= iprot
->skip(ftype
);
764 if (ftype
== ::apache::thrift::protocol::T_I64
) {
765 xfer
+= iprot
->readI64(this->startTime
);
766 isset_startTime
= true;
768 xfer
+= iprot
->skip(ftype
);
772 if (ftype
== ::apache::thrift::protocol::T_I64
) {
773 xfer
+= iprot
->readI64(this->duration
);
774 isset_duration
= true;
776 xfer
+= iprot
->skip(ftype
);
780 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
784 ::apache::thrift::protocol::TType _etype22
;
785 xfer
+= iprot
->readListBegin(_etype22
, _size19
);
786 this->tags
.resize(_size19
);
788 for (_i23
= 0; _i23
< _size19
; ++_i23
)
790 xfer
+= this->tags
[_i23
].read(iprot
);
792 xfer
+= iprot
->readListEnd();
794 this->__isset
.tags
= true;
796 xfer
+= iprot
->skip(ftype
);
800 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
804 ::apache::thrift::protocol::TType _etype27
;
805 xfer
+= iprot
->readListBegin(_etype27
, _size24
);
806 this->logs
.resize(_size24
);
808 for (_i28
= 0; _i28
< _size24
; ++_i28
)
810 xfer
+= this->logs
[_i28
].read(iprot
);
812 xfer
+= iprot
->readListEnd();
814 this->__isset
.logs
= true;
816 xfer
+= iprot
->skip(ftype
);
820 xfer
+= iprot
->skip(ftype
);
823 xfer
+= iprot
->readFieldEnd();
826 xfer
+= iprot
->readStructEnd();
828 if (!isset_traceIdLow
)
829 throw TProtocolException(TProtocolException::INVALID_DATA
);
830 if (!isset_traceIdHigh
)
831 throw TProtocolException(TProtocolException::INVALID_DATA
);
833 throw TProtocolException(TProtocolException::INVALID_DATA
);
834 if (!isset_parentSpanId
)
835 throw TProtocolException(TProtocolException::INVALID_DATA
);
836 if (!isset_operationName
)
837 throw TProtocolException(TProtocolException::INVALID_DATA
);
839 throw TProtocolException(TProtocolException::INVALID_DATA
);
840 if (!isset_startTime
)
841 throw TProtocolException(TProtocolException::INVALID_DATA
);
843 throw TProtocolException(TProtocolException::INVALID_DATA
);
847 uint32_t Span::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
849 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
850 xfer
+= oprot
->writeStructBegin("Span");
852 xfer
+= oprot
->writeFieldBegin("traceIdLow", ::apache::thrift::protocol::T_I64
, 1);
853 xfer
+= oprot
->writeI64(this->traceIdLow
);
854 xfer
+= oprot
->writeFieldEnd();
856 xfer
+= oprot
->writeFieldBegin("traceIdHigh", ::apache::thrift::protocol::T_I64
, 2);
857 xfer
+= oprot
->writeI64(this->traceIdHigh
);
858 xfer
+= oprot
->writeFieldEnd();
860 xfer
+= oprot
->writeFieldBegin("spanId", ::apache::thrift::protocol::T_I64
, 3);
861 xfer
+= oprot
->writeI64(this->spanId
);
862 xfer
+= oprot
->writeFieldEnd();
864 xfer
+= oprot
->writeFieldBegin("parentSpanId", ::apache::thrift::protocol::T_I64
, 4);
865 xfer
+= oprot
->writeI64(this->parentSpanId
);
866 xfer
+= oprot
->writeFieldEnd();
868 xfer
+= oprot
->writeFieldBegin("operationName", ::apache::thrift::protocol::T_STRING
, 5);
869 xfer
+= oprot
->writeString(this->operationName
);
870 xfer
+= oprot
->writeFieldEnd();
872 if (this->__isset
.references
) {
873 xfer
+= oprot
->writeFieldBegin("references", ::apache::thrift::protocol::T_LIST
, 6);
875 xfer
+= oprot
->writeListBegin(::apache::thrift::protocol::T_STRUCT
, static_cast<uint32_t>(this->references
.size()));
876 std::vector
<SpanRef
> ::const_iterator _iter29
;
877 for (_iter29
= this->references
.begin(); _iter29
!= this->references
.end(); ++_iter29
)
879 xfer
+= (*_iter29
).write(oprot
);
881 xfer
+= oprot
->writeListEnd();
883 xfer
+= oprot
->writeFieldEnd();
885 xfer
+= oprot
->writeFieldBegin("flags", ::apache::thrift::protocol::T_I32
, 7);
886 xfer
+= oprot
->writeI32(this->flags
);
887 xfer
+= oprot
->writeFieldEnd();
889 xfer
+= oprot
->writeFieldBegin("startTime", ::apache::thrift::protocol::T_I64
, 8);
890 xfer
+= oprot
->writeI64(this->startTime
);
891 xfer
+= oprot
->writeFieldEnd();
893 xfer
+= oprot
->writeFieldBegin("duration", ::apache::thrift::protocol::T_I64
, 9);
894 xfer
+= oprot
->writeI64(this->duration
);
895 xfer
+= oprot
->writeFieldEnd();
897 if (this->__isset
.tags
) {
898 xfer
+= oprot
->writeFieldBegin("tags", ::apache::thrift::protocol::T_LIST
, 10);
900 xfer
+= oprot
->writeListBegin(::apache::thrift::protocol::T_STRUCT
, static_cast<uint32_t>(this->tags
.size()));
901 std::vector
<Tag
> ::const_iterator _iter30
;
902 for (_iter30
= this->tags
.begin(); _iter30
!= this->tags
.end(); ++_iter30
)
904 xfer
+= (*_iter30
).write(oprot
);
906 xfer
+= oprot
->writeListEnd();
908 xfer
+= oprot
->writeFieldEnd();
910 if (this->__isset
.logs
) {
911 xfer
+= oprot
->writeFieldBegin("logs", ::apache::thrift::protocol::T_LIST
, 11);
913 xfer
+= oprot
->writeListBegin(::apache::thrift::protocol::T_STRUCT
, static_cast<uint32_t>(this->logs
.size()));
914 std::vector
<Log
> ::const_iterator _iter31
;
915 for (_iter31
= this->logs
.begin(); _iter31
!= this->logs
.end(); ++_iter31
)
917 xfer
+= (*_iter31
).write(oprot
);
919 xfer
+= oprot
->writeListEnd();
921 xfer
+= oprot
->writeFieldEnd();
923 xfer
+= oprot
->writeFieldStop();
924 xfer
+= oprot
->writeStructEnd();
928 void swap(Span
&a
, Span
&b
) {
930 swap(a
.traceIdLow
, b
.traceIdLow
);
931 swap(a
.traceIdHigh
, b
.traceIdHigh
);
932 swap(a
.spanId
, b
.spanId
);
933 swap(a
.parentSpanId
, b
.parentSpanId
);
934 swap(a
.operationName
, b
.operationName
);
935 swap(a
.references
, b
.references
);
936 swap(a
.flags
, b
.flags
);
937 swap(a
.startTime
, b
.startTime
);
938 swap(a
.duration
, b
.duration
);
939 swap(a
.tags
, b
.tags
);
940 swap(a
.logs
, b
.logs
);
941 swap(a
.__isset
, b
.__isset
);
944 Span::Span(const Span
& other32
) {
945 traceIdLow
= other32
.traceIdLow
;
946 traceIdHigh
= other32
.traceIdHigh
;
947 spanId
= other32
.spanId
;
948 parentSpanId
= other32
.parentSpanId
;
949 operationName
= other32
.operationName
;
950 references
= other32
.references
;
951 flags
= other32
.flags
;
952 startTime
= other32
.startTime
;
953 duration
= other32
.duration
;
956 __isset
= other32
.__isset
;
958 Span
& Span::operator=(const Span
& other33
) {
959 traceIdLow
= other33
.traceIdLow
;
960 traceIdHigh
= other33
.traceIdHigh
;
961 spanId
= other33
.spanId
;
962 parentSpanId
= other33
.parentSpanId
;
963 operationName
= other33
.operationName
;
964 references
= other33
.references
;
965 flags
= other33
.flags
;
966 startTime
= other33
.startTime
;
967 duration
= other33
.duration
;
970 __isset
= other33
.__isset
;
973 void Span::printTo(std::ostream
& out
) const {
974 using ::apache::thrift::to_string
;
976 out
<< "traceIdLow=" << to_string(traceIdLow
);
977 out
<< ", " << "traceIdHigh=" << to_string(traceIdHigh
);
978 out
<< ", " << "spanId=" << to_string(spanId
);
979 out
<< ", " << "parentSpanId=" << to_string(parentSpanId
);
980 out
<< ", " << "operationName=" << to_string(operationName
);
981 out
<< ", " << "references="; (__isset
.references
? (out
<< to_string(references
)) : (out
<< "<null>"));
982 out
<< ", " << "flags=" << to_string(flags
);
983 out
<< ", " << "startTime=" << to_string(startTime
);
984 out
<< ", " << "duration=" << to_string(duration
);
985 out
<< ", " << "tags="; (__isset
.tags
? (out
<< to_string(tags
)) : (out
<< "<null>"));
986 out
<< ", " << "logs="; (__isset
.logs
? (out
<< to_string(logs
)) : (out
<< "<null>"));
991 Process::~Process() noexcept
{
995 void Process::__set_serviceName(const std::string
& val
) {
996 this->serviceName
= val
;
999 void Process::__set_tags(const std::vector
<Tag
> & val
) {
1001 __isset
.tags
= true;
1003 std::ostream
& operator<<(std::ostream
& out
, const Process
& obj
)
1010 uint32_t Process::read(::apache::thrift::protocol::TProtocol
* iprot
) {
1012 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
1015 ::apache::thrift::protocol::TType ftype
;
1018 xfer
+= iprot
->readStructBegin(fname
);
1020 using ::apache::thrift::protocol::TProtocolException
;
1022 bool isset_serviceName
= false;
1026 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
1027 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
1033 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
1034 xfer
+= iprot
->readString(this->serviceName
);
1035 isset_serviceName
= true;
1037 xfer
+= iprot
->skip(ftype
);
1041 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
1045 ::apache::thrift::protocol::TType _etype37
;
1046 xfer
+= iprot
->readListBegin(_etype37
, _size34
);
1047 this->tags
.resize(_size34
);
1049 for (_i38
= 0; _i38
< _size34
; ++_i38
)
1051 xfer
+= this->tags
[_i38
].read(iprot
);
1053 xfer
+= iprot
->readListEnd();
1055 this->__isset
.tags
= true;
1057 xfer
+= iprot
->skip(ftype
);
1061 xfer
+= iprot
->skip(ftype
);
1064 xfer
+= iprot
->readFieldEnd();
1067 xfer
+= iprot
->readStructEnd();
1069 if (!isset_serviceName
)
1070 throw TProtocolException(TProtocolException::INVALID_DATA
);
1074 uint32_t Process::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
1076 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
1077 xfer
+= oprot
->writeStructBegin("Process");
1079 xfer
+= oprot
->writeFieldBegin("serviceName", ::apache::thrift::protocol::T_STRING
, 1);
1080 xfer
+= oprot
->writeString(this->serviceName
);
1081 xfer
+= oprot
->writeFieldEnd();
1083 if (this->__isset
.tags
) {
1084 xfer
+= oprot
->writeFieldBegin("tags", ::apache::thrift::protocol::T_LIST
, 2);
1086 xfer
+= oprot
->writeListBegin(::apache::thrift::protocol::T_STRUCT
, static_cast<uint32_t>(this->tags
.size()));
1087 std::vector
<Tag
> ::const_iterator _iter39
;
1088 for (_iter39
= this->tags
.begin(); _iter39
!= this->tags
.end(); ++_iter39
)
1090 xfer
+= (*_iter39
).write(oprot
);
1092 xfer
+= oprot
->writeListEnd();
1094 xfer
+= oprot
->writeFieldEnd();
1096 xfer
+= oprot
->writeFieldStop();
1097 xfer
+= oprot
->writeStructEnd();
1101 void swap(Process
&a
, Process
&b
) {
1103 swap(a
.serviceName
, b
.serviceName
);
1104 swap(a
.tags
, b
.tags
);
1105 swap(a
.__isset
, b
.__isset
);
1108 Process::Process(const Process
& other40
) {
1109 serviceName
= other40
.serviceName
;
1110 tags
= other40
.tags
;
1111 __isset
= other40
.__isset
;
1113 Process
& Process::operator=(const Process
& other41
) {
1114 serviceName
= other41
.serviceName
;
1115 tags
= other41
.tags
;
1116 __isset
= other41
.__isset
;
1119 void Process::printTo(std::ostream
& out
) const {
1120 using ::apache::thrift::to_string
;
1122 out
<< "serviceName=" << to_string(serviceName
);
1123 out
<< ", " << "tags="; (__isset
.tags
? (out
<< to_string(tags
)) : (out
<< "<null>"));
1128 Batch::~Batch() noexcept
{
1132 void Batch::__set_process(const Process
& val
) {
1133 this->process
= val
;
1136 void Batch::__set_spans(const std::vector
<Span
> & val
) {
1139 std::ostream
& operator<<(std::ostream
& out
, const Batch
& obj
)
1146 uint32_t Batch::read(::apache::thrift::protocol::TProtocol
* iprot
) {
1148 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
1151 ::apache::thrift::protocol::TType ftype
;
1154 xfer
+= iprot
->readStructBegin(fname
);
1156 using ::apache::thrift::protocol::TProtocolException
;
1158 bool isset_process
= false;
1159 bool isset_spans
= false;
1163 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
1164 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
1170 if (ftype
== ::apache::thrift::protocol::T_STRUCT
) {
1171 xfer
+= this->process
.read(iprot
);
1172 isset_process
= true;
1174 xfer
+= iprot
->skip(ftype
);
1178 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
1180 this->spans
.clear();
1182 ::apache::thrift::protocol::TType _etype45
;
1183 xfer
+= iprot
->readListBegin(_etype45
, _size42
);
1184 this->spans
.resize(_size42
);
1186 for (_i46
= 0; _i46
< _size42
; ++_i46
)
1188 xfer
+= this->spans
[_i46
].read(iprot
);
1190 xfer
+= iprot
->readListEnd();
1194 xfer
+= iprot
->skip(ftype
);
1198 xfer
+= iprot
->skip(ftype
);
1201 xfer
+= iprot
->readFieldEnd();
1204 xfer
+= iprot
->readStructEnd();
1207 throw TProtocolException(TProtocolException::INVALID_DATA
);
1209 throw TProtocolException(TProtocolException::INVALID_DATA
);
1213 uint32_t Batch::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
1215 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
1216 xfer
+= oprot
->writeStructBegin("Batch");
1218 xfer
+= oprot
->writeFieldBegin("process", ::apache::thrift::protocol::T_STRUCT
, 1);
1219 xfer
+= this->process
.write(oprot
);
1220 xfer
+= oprot
->writeFieldEnd();
1222 xfer
+= oprot
->writeFieldBegin("spans", ::apache::thrift::protocol::T_LIST
, 2);
1224 xfer
+= oprot
->writeListBegin(::apache::thrift::protocol::T_STRUCT
, static_cast<uint32_t>(this->spans
.size()));
1225 std::vector
<Span
> ::const_iterator _iter47
;
1226 for (_iter47
= this->spans
.begin(); _iter47
!= this->spans
.end(); ++_iter47
)
1228 xfer
+= (*_iter47
).write(oprot
);
1230 xfer
+= oprot
->writeListEnd();
1232 xfer
+= oprot
->writeFieldEnd();
1234 xfer
+= oprot
->writeFieldStop();
1235 xfer
+= oprot
->writeStructEnd();
1239 void swap(Batch
&a
, Batch
&b
) {
1241 swap(a
.process
, b
.process
);
1242 swap(a
.spans
, b
.spans
);
1245 Batch::Batch(const Batch
& other48
) {
1246 process
= other48
.process
;
1247 spans
= other48
.spans
;
1249 Batch
& Batch::operator=(const Batch
& other49
) {
1250 process
= other49
.process
;
1251 spans
= other49
.spans
;
1254 void Batch::printTo(std::ostream
& out
) const {
1255 using ::apache::thrift::to_string
;
1257 out
<< "process=" << to_string(process
);
1258 out
<< ", " << "spans=" << to_string(spans
);
1263 BatchSubmitResponse::~BatchSubmitResponse() noexcept
{
1267 void BatchSubmitResponse::__set_ok(const bool val
) {
1270 std::ostream
& operator<<(std::ostream
& out
, const BatchSubmitResponse
& obj
)
1277 uint32_t BatchSubmitResponse::read(::apache::thrift::protocol::TProtocol
* iprot
) {
1279 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
1282 ::apache::thrift::protocol::TType ftype
;
1285 xfer
+= iprot
->readStructBegin(fname
);
1287 using ::apache::thrift::protocol::TProtocolException
;
1289 bool isset_ok
= false;
1293 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
1294 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
1300 if (ftype
== ::apache::thrift::protocol::T_BOOL
) {
1301 xfer
+= iprot
->readBool(this->ok
);
1304 xfer
+= iprot
->skip(ftype
);
1308 xfer
+= iprot
->skip(ftype
);
1311 xfer
+= iprot
->readFieldEnd();
1314 xfer
+= iprot
->readStructEnd();
1317 throw TProtocolException(TProtocolException::INVALID_DATA
);
1321 uint32_t BatchSubmitResponse::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
1323 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
1324 xfer
+= oprot
->writeStructBegin("BatchSubmitResponse");
1326 xfer
+= oprot
->writeFieldBegin("ok", ::apache::thrift::protocol::T_BOOL
, 1);
1327 xfer
+= oprot
->writeBool(this->ok
);
1328 xfer
+= oprot
->writeFieldEnd();
1330 xfer
+= oprot
->writeFieldStop();
1331 xfer
+= oprot
->writeStructEnd();
1335 void swap(BatchSubmitResponse
&a
, BatchSubmitResponse
&b
) {
1340 BatchSubmitResponse::BatchSubmitResponse(const BatchSubmitResponse
& other50
) {
1343 BatchSubmitResponse
& BatchSubmitResponse::operator=(const BatchSubmitResponse
& other51
) {
1347 void BatchSubmitResponse::printTo(std::ostream
& out
) const {
1348 using ::apache::thrift::to_string
;
1349 out
<< "BatchSubmitResponse(";
1350 out
<< "ok=" << to_string(ok
);