2 * Autogenerated by Thrift Compiler (0.11.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, NULL
, NULL
));
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 int _kSpanRefTypeValues
[] = {
43 SpanRefType::CHILD_OF
,
44 SpanRefType::FOLLOWS_FROM
46 const char* _kSpanRefTypeNames
[] = {
50 const std::map
<int, const char*> _SpanRefType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(2, _kSpanRefTypeValues
, _kSpanRefTypeNames
), ::apache::thrift::TEnumIterator(-1, NULL
, NULL
));
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()) {
57 out
<< static_cast<int>(val
);
67 void Tag::__set_key(const std::string
& val
) {
71 void Tag::__set_vType(const TagType::type val
) {
75 void Tag::__set_vStr(const std::string
& val
) {
80 void Tag::__set_vDouble(const double val
) {
82 __isset
.vDouble
= true;
85 void Tag::__set_vBool(const bool val
) {
90 void Tag::__set_vLong(const int64_t val
) {
95 void Tag::__set_vBinary(const std::string
& val
) {
97 __isset
.vBinary
= true;
99 std::ostream
& operator<<(std::ostream
& out
, const Tag
& obj
)
106 uint32_t Tag::read(::apache::thrift::protocol::TProtocol
* iprot
) {
108 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
111 ::apache::thrift::protocol::TType ftype
;
114 xfer
+= iprot
->readStructBegin(fname
);
116 using ::apache::thrift::protocol::TProtocolException
;
118 bool isset_key
= false;
119 bool isset_vType
= false;
123 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
124 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
130 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
131 xfer
+= iprot
->readString(this->key
);
134 xfer
+= iprot
->skip(ftype
);
138 if (ftype
== ::apache::thrift::protocol::T_I32
) {
140 xfer
+= iprot
->readI32(ecast0
);
141 this->vType
= (TagType::type
)ecast0
;
144 xfer
+= iprot
->skip(ftype
);
148 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
149 xfer
+= iprot
->readString(this->vStr
);
150 this->__isset
.vStr
= true;
152 xfer
+= iprot
->skip(ftype
);
156 if (ftype
== ::apache::thrift::protocol::T_DOUBLE
) {
157 xfer
+= iprot
->readDouble(this->vDouble
);
158 this->__isset
.vDouble
= true;
160 xfer
+= iprot
->skip(ftype
);
164 if (ftype
== ::apache::thrift::protocol::T_BOOL
) {
165 xfer
+= iprot
->readBool(this->vBool
);
166 this->__isset
.vBool
= true;
168 xfer
+= iprot
->skip(ftype
);
172 if (ftype
== ::apache::thrift::protocol::T_I64
) {
173 xfer
+= iprot
->readI64(this->vLong
);
174 this->__isset
.vLong
= true;
176 xfer
+= iprot
->skip(ftype
);
180 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
181 xfer
+= iprot
->readBinary(this->vBinary
);
182 this->__isset
.vBinary
= true;
184 xfer
+= iprot
->skip(ftype
);
188 xfer
+= iprot
->skip(ftype
);
191 xfer
+= iprot
->readFieldEnd();
194 xfer
+= iprot
->readStructEnd();
197 throw TProtocolException(TProtocolException::INVALID_DATA
);
199 throw TProtocolException(TProtocolException::INVALID_DATA
);
203 uint32_t Tag::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
205 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
206 xfer
+= oprot
->writeStructBegin("Tag");
208 xfer
+= oprot
->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING
, 1);
209 xfer
+= oprot
->writeString(this->key
);
210 xfer
+= oprot
->writeFieldEnd();
212 xfer
+= oprot
->writeFieldBegin("vType", ::apache::thrift::protocol::T_I32
, 2);
213 xfer
+= oprot
->writeI32((int32_t)this->vType
);
214 xfer
+= oprot
->writeFieldEnd();
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();
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();
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();
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();
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();
241 xfer
+= oprot
->writeFieldStop();
242 xfer
+= oprot
->writeStructEnd();
246 void swap(Tag
&a
, Tag
&b
) {
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
);
258 Tag::Tag(const Tag
& other1
) {
260 vType
= other1
.vType
;
262 vDouble
= other1
.vDouble
;
263 vBool
= other1
.vBool
;
264 vLong
= other1
.vLong
;
265 vBinary
= other1
.vBinary
;
266 __isset
= other1
.__isset
;
268 Tag
& Tag::operator=(const Tag
& other2
) {
270 vType
= other2
.vType
;
272 vDouble
= other2
.vDouble
;
273 vBool
= other2
.vBool
;
274 vLong
= other2
.vLong
;
275 vBinary
= other2
.vBinary
;
276 __isset
= other2
.__isset
;
279 void Tag::printTo(std::ostream
& out
) const {
280 using ::apache::thrift::to_string
;
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>"));
293 Log::~Log() throw() {
297 void Log::__set_timestamp(const int64_t val
) {
298 this->timestamp
= val
;
301 void Log::__set_fields(const std::vector
<Tag
> & val
) {
304 std::ostream
& operator<<(std::ostream
& out
, const Log
& obj
)
311 uint32_t Log::read(::apache::thrift::protocol::TProtocol
* iprot
) {
313 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
316 ::apache::thrift::protocol::TType ftype
;
319 xfer
+= iprot
->readStructBegin(fname
);
321 using ::apache::thrift::protocol::TProtocolException
;
323 bool isset_timestamp
= false;
324 bool isset_fields
= false;
328 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
329 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
335 if (ftype
== ::apache::thrift::protocol::T_I64
) {
336 xfer
+= iprot
->readI64(this->timestamp
);
337 isset_timestamp
= true;
339 xfer
+= iprot
->skip(ftype
);
343 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
345 this->fields
.clear();
347 ::apache::thrift::protocol::TType _etype6
;
348 xfer
+= iprot
->readListBegin(_etype6
, _size3
);
349 this->fields
.resize(_size3
);
351 for (_i7
= 0; _i7
< _size3
; ++_i7
)
353 xfer
+= this->fields
[_i7
].read(iprot
);
355 xfer
+= iprot
->readListEnd();
359 xfer
+= iprot
->skip(ftype
);
363 xfer
+= iprot
->skip(ftype
);
366 xfer
+= iprot
->readFieldEnd();
369 xfer
+= iprot
->readStructEnd();
371 if (!isset_timestamp
)
372 throw TProtocolException(TProtocolException::INVALID_DATA
);
374 throw TProtocolException(TProtocolException::INVALID_DATA
);
378 uint32_t Log::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
380 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
381 xfer
+= oprot
->writeStructBegin("Log");
383 xfer
+= oprot
->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64
, 1);
384 xfer
+= oprot
->writeI64(this->timestamp
);
385 xfer
+= oprot
->writeFieldEnd();
387 xfer
+= oprot
->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST
, 2);
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
)
393 xfer
+= (*_iter8
).write(oprot
);
395 xfer
+= oprot
->writeListEnd();
397 xfer
+= oprot
->writeFieldEnd();
399 xfer
+= oprot
->writeFieldStop();
400 xfer
+= oprot
->writeStructEnd();
404 void swap(Log
&a
, Log
&b
) {
406 swap(a
.timestamp
, b
.timestamp
);
407 swap(a
.fields
, b
.fields
);
410 Log::Log(const Log
& other9
) {
411 timestamp
= other9
.timestamp
;
412 fields
= other9
.fields
;
414 Log
& Log::operator=(const Log
& other10
) {
415 timestamp
= other10
.timestamp
;
416 fields
= other10
.fields
;
419 void Log::printTo(std::ostream
& out
) const {
420 using ::apache::thrift::to_string
;
422 out
<< "timestamp=" << to_string(timestamp
);
423 out
<< ", " << "fields=" << to_string(fields
);
428 SpanRef::~SpanRef() throw() {
432 void SpanRef::__set_refType(const SpanRefType::type val
) {
436 void SpanRef::__set_traceIdLow(const int64_t val
) {
437 this->traceIdLow
= val
;
440 void SpanRef::__set_traceIdHigh(const int64_t val
) {
441 this->traceIdHigh
= val
;
444 void SpanRef::__set_spanId(const int64_t val
) {
447 std::ostream
& operator<<(std::ostream
& out
, const SpanRef
& obj
)
454 uint32_t SpanRef::read(::apache::thrift::protocol::TProtocol
* iprot
) {
456 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
459 ::apache::thrift::protocol::TType ftype
;
462 xfer
+= iprot
->readStructBegin(fname
);
464 using ::apache::thrift::protocol::TProtocolException
;
466 bool isset_refType
= false;
467 bool isset_traceIdLow
= false;
468 bool isset_traceIdHigh
= false;
469 bool isset_spanId
= false;
473 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
474 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
480 if (ftype
== ::apache::thrift::protocol::T_I32
) {
482 xfer
+= iprot
->readI32(ecast11
);
483 this->refType
= (SpanRefType::type
)ecast11
;
484 isset_refType
= true;
486 xfer
+= iprot
->skip(ftype
);
490 if (ftype
== ::apache::thrift::protocol::T_I64
) {
491 xfer
+= iprot
->readI64(this->traceIdLow
);
492 isset_traceIdLow
= true;
494 xfer
+= iprot
->skip(ftype
);
498 if (ftype
== ::apache::thrift::protocol::T_I64
) {
499 xfer
+= iprot
->readI64(this->traceIdHigh
);
500 isset_traceIdHigh
= true;
502 xfer
+= iprot
->skip(ftype
);
506 if (ftype
== ::apache::thrift::protocol::T_I64
) {
507 xfer
+= iprot
->readI64(this->spanId
);
510 xfer
+= iprot
->skip(ftype
);
514 xfer
+= iprot
->skip(ftype
);
517 xfer
+= iprot
->readFieldEnd();
520 xfer
+= iprot
->readStructEnd();
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
);
529 throw TProtocolException(TProtocolException::INVALID_DATA
);
533 uint32_t SpanRef::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
535 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
536 xfer
+= oprot
->writeStructBegin("SpanRef");
538 xfer
+= oprot
->writeFieldBegin("refType", ::apache::thrift::protocol::T_I32
, 1);
539 xfer
+= oprot
->writeI32((int32_t)this->refType
);
540 xfer
+= oprot
->writeFieldEnd();
542 xfer
+= oprot
->writeFieldBegin("traceIdLow", ::apache::thrift::protocol::T_I64
, 2);
543 xfer
+= oprot
->writeI64(this->traceIdLow
);
544 xfer
+= oprot
->writeFieldEnd();
546 xfer
+= oprot
->writeFieldBegin("traceIdHigh", ::apache::thrift::protocol::T_I64
, 3);
547 xfer
+= oprot
->writeI64(this->traceIdHigh
);
548 xfer
+= oprot
->writeFieldEnd();
550 xfer
+= oprot
->writeFieldBegin("spanId", ::apache::thrift::protocol::T_I64
, 4);
551 xfer
+= oprot
->writeI64(this->spanId
);
552 xfer
+= oprot
->writeFieldEnd();
554 xfer
+= oprot
->writeFieldStop();
555 xfer
+= oprot
->writeStructEnd();
559 void swap(SpanRef
&a
, SpanRef
&b
) {
561 swap(a
.refType
, b
.refType
);
562 swap(a
.traceIdLow
, b
.traceIdLow
);
563 swap(a
.traceIdHigh
, b
.traceIdHigh
);
564 swap(a
.spanId
, b
.spanId
);
567 SpanRef::SpanRef(const SpanRef
& other12
) {
568 refType
= other12
.refType
;
569 traceIdLow
= other12
.traceIdLow
;
570 traceIdHigh
= other12
.traceIdHigh
;
571 spanId
= other12
.spanId
;
573 SpanRef
& SpanRef::operator=(const SpanRef
& other13
) {
574 refType
= other13
.refType
;
575 traceIdLow
= other13
.traceIdLow
;
576 traceIdHigh
= other13
.traceIdHigh
;
577 spanId
= other13
.spanId
;
580 void SpanRef::printTo(std::ostream
& out
) const {
581 using ::apache::thrift::to_string
;
583 out
<< "refType=" << to_string(refType
);
584 out
<< ", " << "traceIdLow=" << to_string(traceIdLow
);
585 out
<< ", " << "traceIdHigh=" << to_string(traceIdHigh
);
586 out
<< ", " << "spanId=" << to_string(spanId
);
591 Span::~Span() throw() {
595 void Span::__set_traceIdLow(const int64_t val
) {
596 this->traceIdLow
= val
;
599 void Span::__set_traceIdHigh(const int64_t val
) {
600 this->traceIdHigh
= val
;
603 void Span::__set_spanId(const int64_t val
) {
607 void Span::__set_parentSpanId(const int64_t val
) {
608 this->parentSpanId
= val
;
611 void Span::__set_operationName(const std::string
& val
) {
612 this->operationName
= val
;
615 void Span::__set_references(const std::vector
<SpanRef
> & val
) {
616 this->references
= val
;
617 __isset
.references
= true;
620 void Span::__set_flags(const int32_t val
) {
624 void Span::__set_startTime(const int64_t val
) {
625 this->startTime
= val
;
628 void Span::__set_duration(const int64_t val
) {
629 this->duration
= val
;
632 void Span::__set_tags(const std::vector
<Tag
> & val
) {
637 void Span::__set_logs(const std::vector
<Log
> & val
) {
641 std::ostream
& operator<<(std::ostream
& out
, const Span
& obj
)
648 uint32_t Span::read(::apache::thrift::protocol::TProtocol
* iprot
) {
650 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
653 ::apache::thrift::protocol::TType ftype
;
656 xfer
+= iprot
->readStructBegin(fname
);
658 using ::apache::thrift::protocol::TProtocolException
;
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;
671 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
672 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
678 if (ftype
== ::apache::thrift::protocol::T_I64
) {
679 xfer
+= iprot
->readI64(this->traceIdLow
);
680 isset_traceIdLow
= true;
682 xfer
+= iprot
->skip(ftype
);
686 if (ftype
== ::apache::thrift::protocol::T_I64
) {
687 xfer
+= iprot
->readI64(this->traceIdHigh
);
688 isset_traceIdHigh
= true;
690 xfer
+= iprot
->skip(ftype
);
694 if (ftype
== ::apache::thrift::protocol::T_I64
) {
695 xfer
+= iprot
->readI64(this->spanId
);
698 xfer
+= iprot
->skip(ftype
);
702 if (ftype
== ::apache::thrift::protocol::T_I64
) {
703 xfer
+= iprot
->readI64(this->parentSpanId
);
704 isset_parentSpanId
= true;
706 xfer
+= iprot
->skip(ftype
);
710 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
711 xfer
+= iprot
->readString(this->operationName
);
712 isset_operationName
= true;
714 xfer
+= iprot
->skip(ftype
);
718 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
720 this->references
.clear();
722 ::apache::thrift::protocol::TType _etype17
;
723 xfer
+= iprot
->readListBegin(_etype17
, _size14
);
724 this->references
.resize(_size14
);
726 for (_i18
= 0; _i18
< _size14
; ++_i18
)
728 xfer
+= this->references
[_i18
].read(iprot
);
730 xfer
+= iprot
->readListEnd();
732 this->__isset
.references
= true;
734 xfer
+= iprot
->skip(ftype
);
738 if (ftype
== ::apache::thrift::protocol::T_I32
) {
739 xfer
+= iprot
->readI32(this->flags
);
742 xfer
+= iprot
->skip(ftype
);
746 if (ftype
== ::apache::thrift::protocol::T_I64
) {
747 xfer
+= iprot
->readI64(this->startTime
);
748 isset_startTime
= true;
750 xfer
+= iprot
->skip(ftype
);
754 if (ftype
== ::apache::thrift::protocol::T_I64
) {
755 xfer
+= iprot
->readI64(this->duration
);
756 isset_duration
= true;
758 xfer
+= iprot
->skip(ftype
);
762 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
766 ::apache::thrift::protocol::TType _etype22
;
767 xfer
+= iprot
->readListBegin(_etype22
, _size19
);
768 this->tags
.resize(_size19
);
770 for (_i23
= 0; _i23
< _size19
; ++_i23
)
772 xfer
+= this->tags
[_i23
].read(iprot
);
774 xfer
+= iprot
->readListEnd();
776 this->__isset
.tags
= true;
778 xfer
+= iprot
->skip(ftype
);
782 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
786 ::apache::thrift::protocol::TType _etype27
;
787 xfer
+= iprot
->readListBegin(_etype27
, _size24
);
788 this->logs
.resize(_size24
);
790 for (_i28
= 0; _i28
< _size24
; ++_i28
)
792 xfer
+= this->logs
[_i28
].read(iprot
);
794 xfer
+= iprot
->readListEnd();
796 this->__isset
.logs
= true;
798 xfer
+= iprot
->skip(ftype
);
802 xfer
+= iprot
->skip(ftype
);
805 xfer
+= iprot
->readFieldEnd();
808 xfer
+= iprot
->readStructEnd();
810 if (!isset_traceIdLow
)
811 throw TProtocolException(TProtocolException::INVALID_DATA
);
812 if (!isset_traceIdHigh
)
813 throw TProtocolException(TProtocolException::INVALID_DATA
);
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
);
821 throw TProtocolException(TProtocolException::INVALID_DATA
);
822 if (!isset_startTime
)
823 throw TProtocolException(TProtocolException::INVALID_DATA
);
825 throw TProtocolException(TProtocolException::INVALID_DATA
);
829 uint32_t Span::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
831 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
832 xfer
+= oprot
->writeStructBegin("Span");
834 xfer
+= oprot
->writeFieldBegin("traceIdLow", ::apache::thrift::protocol::T_I64
, 1);
835 xfer
+= oprot
->writeI64(this->traceIdLow
);
836 xfer
+= oprot
->writeFieldEnd();
838 xfer
+= oprot
->writeFieldBegin("traceIdHigh", ::apache::thrift::protocol::T_I64
, 2);
839 xfer
+= oprot
->writeI64(this->traceIdHigh
);
840 xfer
+= oprot
->writeFieldEnd();
842 xfer
+= oprot
->writeFieldBegin("spanId", ::apache::thrift::protocol::T_I64
, 3);
843 xfer
+= oprot
->writeI64(this->spanId
);
844 xfer
+= oprot
->writeFieldEnd();
846 xfer
+= oprot
->writeFieldBegin("parentSpanId", ::apache::thrift::protocol::T_I64
, 4);
847 xfer
+= oprot
->writeI64(this->parentSpanId
);
848 xfer
+= oprot
->writeFieldEnd();
850 xfer
+= oprot
->writeFieldBegin("operationName", ::apache::thrift::protocol::T_STRING
, 5);
851 xfer
+= oprot
->writeString(this->operationName
);
852 xfer
+= oprot
->writeFieldEnd();
854 if (this->__isset
.references
) {
855 xfer
+= oprot
->writeFieldBegin("references", ::apache::thrift::protocol::T_LIST
, 6);
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
)
861 xfer
+= (*_iter29
).write(oprot
);
863 xfer
+= oprot
->writeListEnd();
865 xfer
+= oprot
->writeFieldEnd();
867 xfer
+= oprot
->writeFieldBegin("flags", ::apache::thrift::protocol::T_I32
, 7);
868 xfer
+= oprot
->writeI32(this->flags
);
869 xfer
+= oprot
->writeFieldEnd();
871 xfer
+= oprot
->writeFieldBegin("startTime", ::apache::thrift::protocol::T_I64
, 8);
872 xfer
+= oprot
->writeI64(this->startTime
);
873 xfer
+= oprot
->writeFieldEnd();
875 xfer
+= oprot
->writeFieldBegin("duration", ::apache::thrift::protocol::T_I64
, 9);
876 xfer
+= oprot
->writeI64(this->duration
);
877 xfer
+= oprot
->writeFieldEnd();
879 if (this->__isset
.tags
) {
880 xfer
+= oprot
->writeFieldBegin("tags", ::apache::thrift::protocol::T_LIST
, 10);
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
)
886 xfer
+= (*_iter30
).write(oprot
);
888 xfer
+= oprot
->writeListEnd();
890 xfer
+= oprot
->writeFieldEnd();
892 if (this->__isset
.logs
) {
893 xfer
+= oprot
->writeFieldBegin("logs", ::apache::thrift::protocol::T_LIST
, 11);
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
)
899 xfer
+= (*_iter31
).write(oprot
);
901 xfer
+= oprot
->writeListEnd();
903 xfer
+= oprot
->writeFieldEnd();
905 xfer
+= oprot
->writeFieldStop();
906 xfer
+= oprot
->writeStructEnd();
910 void swap(Span
&a
, Span
&b
) {
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
);
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
;
938 __isset
= other32
.__isset
;
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
;
952 __isset
= other33
.__isset
;
955 void Span::printTo(std::ostream
& out
) const {
956 using ::apache::thrift::to_string
;
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>"));
973 Process::~Process() throw() {
977 void Process::__set_serviceName(const std::string
& val
) {
978 this->serviceName
= val
;
981 void Process::__set_tags(const std::vector
<Tag
> & val
) {
985 std::ostream
& operator<<(std::ostream
& out
, const Process
& obj
)
992 uint32_t Process::read(::apache::thrift::protocol::TProtocol
* iprot
) {
994 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
997 ::apache::thrift::protocol::TType ftype
;
1000 xfer
+= iprot
->readStructBegin(fname
);
1002 using ::apache::thrift::protocol::TProtocolException
;
1004 bool isset_serviceName
= false;
1008 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
1009 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
1015 if (ftype
== ::apache::thrift::protocol::T_STRING
) {
1016 xfer
+= iprot
->readString(this->serviceName
);
1017 isset_serviceName
= true;
1019 xfer
+= iprot
->skip(ftype
);
1023 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
1027 ::apache::thrift::protocol::TType _etype37
;
1028 xfer
+= iprot
->readListBegin(_etype37
, _size34
);
1029 this->tags
.resize(_size34
);
1031 for (_i38
= 0; _i38
< _size34
; ++_i38
)
1033 xfer
+= this->tags
[_i38
].read(iprot
);
1035 xfer
+= iprot
->readListEnd();
1037 this->__isset
.tags
= true;
1039 xfer
+= iprot
->skip(ftype
);
1043 xfer
+= iprot
->skip(ftype
);
1046 xfer
+= iprot
->readFieldEnd();
1049 xfer
+= iprot
->readStructEnd();
1051 if (!isset_serviceName
)
1052 throw TProtocolException(TProtocolException::INVALID_DATA
);
1056 uint32_t Process::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
1058 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
1059 xfer
+= oprot
->writeStructBegin("Process");
1061 xfer
+= oprot
->writeFieldBegin("serviceName", ::apache::thrift::protocol::T_STRING
, 1);
1062 xfer
+= oprot
->writeString(this->serviceName
);
1063 xfer
+= oprot
->writeFieldEnd();
1065 if (this->__isset
.tags
) {
1066 xfer
+= oprot
->writeFieldBegin("tags", ::apache::thrift::protocol::T_LIST
, 2);
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
)
1072 xfer
+= (*_iter39
).write(oprot
);
1074 xfer
+= oprot
->writeListEnd();
1076 xfer
+= oprot
->writeFieldEnd();
1078 xfer
+= oprot
->writeFieldStop();
1079 xfer
+= oprot
->writeStructEnd();
1083 void swap(Process
&a
, Process
&b
) {
1085 swap(a
.serviceName
, b
.serviceName
);
1086 swap(a
.tags
, b
.tags
);
1087 swap(a
.__isset
, b
.__isset
);
1090 Process::Process(const Process
& other40
) {
1091 serviceName
= other40
.serviceName
;
1092 tags
= other40
.tags
;
1093 __isset
= other40
.__isset
;
1095 Process
& Process::operator=(const Process
& other41
) {
1096 serviceName
= other41
.serviceName
;
1097 tags
= other41
.tags
;
1098 __isset
= other41
.__isset
;
1101 void Process::printTo(std::ostream
& out
) const {
1102 using ::apache::thrift::to_string
;
1104 out
<< "serviceName=" << to_string(serviceName
);
1105 out
<< ", " << "tags="; (__isset
.tags
? (out
<< to_string(tags
)) : (out
<< "<null>"));
1110 Batch::~Batch() throw() {
1114 void Batch::__set_process(const Process
& val
) {
1115 this->process
= val
;
1118 void Batch::__set_spans(const std::vector
<Span
> & val
) {
1121 std::ostream
& operator<<(std::ostream
& out
, const Batch
& obj
)
1128 uint32_t Batch::read(::apache::thrift::protocol::TProtocol
* iprot
) {
1130 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
1133 ::apache::thrift::protocol::TType ftype
;
1136 xfer
+= iprot
->readStructBegin(fname
);
1138 using ::apache::thrift::protocol::TProtocolException
;
1140 bool isset_process
= false;
1141 bool isset_spans
= false;
1145 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
1146 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
1152 if (ftype
== ::apache::thrift::protocol::T_STRUCT
) {
1153 xfer
+= this->process
.read(iprot
);
1154 isset_process
= true;
1156 xfer
+= iprot
->skip(ftype
);
1160 if (ftype
== ::apache::thrift::protocol::T_LIST
) {
1162 this->spans
.clear();
1164 ::apache::thrift::protocol::TType _etype45
;
1165 xfer
+= iprot
->readListBegin(_etype45
, _size42
);
1166 this->spans
.resize(_size42
);
1168 for (_i46
= 0; _i46
< _size42
; ++_i46
)
1170 xfer
+= this->spans
[_i46
].read(iprot
);
1172 xfer
+= iprot
->readListEnd();
1176 xfer
+= iprot
->skip(ftype
);
1180 xfer
+= iprot
->skip(ftype
);
1183 xfer
+= iprot
->readFieldEnd();
1186 xfer
+= iprot
->readStructEnd();
1189 throw TProtocolException(TProtocolException::INVALID_DATA
);
1191 throw TProtocolException(TProtocolException::INVALID_DATA
);
1195 uint32_t Batch::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
1197 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
1198 xfer
+= oprot
->writeStructBegin("Batch");
1200 xfer
+= oprot
->writeFieldBegin("process", ::apache::thrift::protocol::T_STRUCT
, 1);
1201 xfer
+= this->process
.write(oprot
);
1202 xfer
+= oprot
->writeFieldEnd();
1204 xfer
+= oprot
->writeFieldBegin("spans", ::apache::thrift::protocol::T_LIST
, 2);
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
)
1210 xfer
+= (*_iter47
).write(oprot
);
1212 xfer
+= oprot
->writeListEnd();
1214 xfer
+= oprot
->writeFieldEnd();
1216 xfer
+= oprot
->writeFieldStop();
1217 xfer
+= oprot
->writeStructEnd();
1221 void swap(Batch
&a
, Batch
&b
) {
1223 swap(a
.process
, b
.process
);
1224 swap(a
.spans
, b
.spans
);
1227 Batch::Batch(const Batch
& other48
) {
1228 process
= other48
.process
;
1229 spans
= other48
.spans
;
1231 Batch
& Batch::operator=(const Batch
& other49
) {
1232 process
= other49
.process
;
1233 spans
= other49
.spans
;
1236 void Batch::printTo(std::ostream
& out
) const {
1237 using ::apache::thrift::to_string
;
1239 out
<< "process=" << to_string(process
);
1240 out
<< ", " << "spans=" << to_string(spans
);
1245 BatchSubmitResponse::~BatchSubmitResponse() throw() {
1249 void BatchSubmitResponse::__set_ok(const bool val
) {
1252 std::ostream
& operator<<(std::ostream
& out
, const BatchSubmitResponse
& obj
)
1259 uint32_t BatchSubmitResponse::read(::apache::thrift::protocol::TProtocol
* iprot
) {
1261 ::apache::thrift::protocol::TInputRecursionTracker
tracker(*iprot
);
1264 ::apache::thrift::protocol::TType ftype
;
1267 xfer
+= iprot
->readStructBegin(fname
);
1269 using ::apache::thrift::protocol::TProtocolException
;
1271 bool isset_ok
= false;
1275 xfer
+= iprot
->readFieldBegin(fname
, ftype
, fid
);
1276 if (ftype
== ::apache::thrift::protocol::T_STOP
) {
1282 if (ftype
== ::apache::thrift::protocol::T_BOOL
) {
1283 xfer
+= iprot
->readBool(this->ok
);
1286 xfer
+= iprot
->skip(ftype
);
1290 xfer
+= iprot
->skip(ftype
);
1293 xfer
+= iprot
->readFieldEnd();
1296 xfer
+= iprot
->readStructEnd();
1299 throw TProtocolException(TProtocolException::INVALID_DATA
);
1303 uint32_t BatchSubmitResponse::write(::apache::thrift::protocol::TProtocol
* oprot
) const {
1305 ::apache::thrift::protocol::TOutputRecursionTracker
tracker(*oprot
);
1306 xfer
+= oprot
->writeStructBegin("BatchSubmitResponse");
1308 xfer
+= oprot
->writeFieldBegin("ok", ::apache::thrift::protocol::T_BOOL
, 1);
1309 xfer
+= oprot
->writeBool(this->ok
);
1310 xfer
+= oprot
->writeFieldEnd();
1312 xfer
+= oprot
->writeFieldStop();
1313 xfer
+= oprot
->writeStructEnd();
1317 void swap(BatchSubmitResponse
&a
, BatchSubmitResponse
&b
) {
1322 BatchSubmitResponse::BatchSubmitResponse(const BatchSubmitResponse
& other50
) {
1325 BatchSubmitResponse
& BatchSubmitResponse::operator=(const BatchSubmitResponse
& other51
) {
1329 void BatchSubmitResponse::printTo(std::ostream
& out
) const {
1330 using ::apache::thrift::to_string
;
1331 out
<< "BatchSubmitResponse(";
1332 out
<< "ok=" << to_string(ok
);