]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/thrift-gen/tracetest_types.cpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / jaegertracing / jaeger-client-cpp / src / jaegertracing / thrift-gen / tracetest_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 "tracetest_types.h"
8
9 #include <algorithm>
10 #include <ostream>
11
12 #include <thrift/TToString.h>
13
14 namespace jaegertracing { namespace crossdock { namespace thrift {
15
16 int _kTransportValues[] = {
17 Transport::HTTP,
18 Transport::TCHANNEL,
19 Transport::DUMMY
20 };
21 const char* _kTransportNames[] = {
22 "HTTP",
23 "TCHANNEL",
24 "DUMMY"
25 };
26 const std::map<int, const char*> _Transport_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kTransportValues, _kTransportNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
27
28 std::ostream& operator<<(std::ostream& out, const Transport::type& val) {
29 std::map<int, const char*>::const_iterator it = _Transport_VALUES_TO_NAMES.find(val);
30 if (it != _Transport_VALUES_TO_NAMES.end()) {
31 out << it->second;
32 } else {
33 out << static_cast<int>(val);
34 }
35 return out;
36 }
37
38
39 Downstream::~Downstream() throw() {
40 }
41
42
43 void Downstream::__set_serviceName(const std::string& val) {
44 this->serviceName = val;
45 }
46
47 void Downstream::__set_serverRole(const std::string& val) {
48 this->serverRole = val;
49 }
50
51 void Downstream::__set_host(const std::string& val) {
52 this->host = val;
53 }
54
55 void Downstream::__set_port(const std::string& val) {
56 this->port = val;
57 }
58
59 void Downstream::__set_transport(const Transport::type val) {
60 this->transport = val;
61 }
62
63 void Downstream::__set_downstream(const std::shared_ptr<Downstream>& val) {
64 this->downstream = val;
65 __isset.downstream = true;
66 }
67 std::ostream& operator<<(std::ostream& out, const Downstream& obj)
68 {
69 obj.printTo(out);
70 return out;
71 }
72
73
74 uint32_t Downstream::read(::apache::thrift::protocol::TProtocol* iprot) {
75
76 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
77 uint32_t xfer = 0;
78 std::string fname;
79 ::apache::thrift::protocol::TType ftype;
80 int16_t fid;
81
82 xfer += iprot->readStructBegin(fname);
83
84 using ::apache::thrift::protocol::TProtocolException;
85
86 bool isset_serviceName = false;
87 bool isset_serverRole = false;
88 bool isset_host = false;
89 bool isset_port = false;
90 bool isset_transport = false;
91
92 while (true)
93 {
94 xfer += iprot->readFieldBegin(fname, ftype, fid);
95 if (ftype == ::apache::thrift::protocol::T_STOP) {
96 break;
97 }
98 switch (fid)
99 {
100 case 1:
101 if (ftype == ::apache::thrift::protocol::T_STRING) {
102 xfer += iprot->readString(this->serviceName);
103 isset_serviceName = true;
104 } else {
105 xfer += iprot->skip(ftype);
106 }
107 break;
108 case 2:
109 if (ftype == ::apache::thrift::protocol::T_STRING) {
110 xfer += iprot->readString(this->serverRole);
111 isset_serverRole = true;
112 } else {
113 xfer += iprot->skip(ftype);
114 }
115 break;
116 case 3:
117 if (ftype == ::apache::thrift::protocol::T_STRING) {
118 xfer += iprot->readString(this->host);
119 isset_host = true;
120 } else {
121 xfer += iprot->skip(ftype);
122 }
123 break;
124 case 4:
125 if (ftype == ::apache::thrift::protocol::T_STRING) {
126 xfer += iprot->readString(this->port);
127 isset_port = true;
128 } else {
129 xfer += iprot->skip(ftype);
130 }
131 break;
132 case 5:
133 if (ftype == ::apache::thrift::protocol::T_I32) {
134 int32_t ecast0;
135 xfer += iprot->readI32(ecast0);
136 this->transport = (Transport::type)ecast0;
137 isset_transport = true;
138 } else {
139 xfer += iprot->skip(ftype);
140 }
141 break;
142 case 6:
143 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
144 xfer += this->downstream->read(iprot);
145 this->__isset.downstream = true;
146 } else {
147 xfer += iprot->skip(ftype);
148 }
149 break;
150 default:
151 xfer += iprot->skip(ftype);
152 break;
153 }
154 xfer += iprot->readFieldEnd();
155 }
156
157 xfer += iprot->readStructEnd();
158
159 if (!isset_serviceName)
160 throw TProtocolException(TProtocolException::INVALID_DATA);
161 if (!isset_serverRole)
162 throw TProtocolException(TProtocolException::INVALID_DATA);
163 if (!isset_host)
164 throw TProtocolException(TProtocolException::INVALID_DATA);
165 if (!isset_port)
166 throw TProtocolException(TProtocolException::INVALID_DATA);
167 if (!isset_transport)
168 throw TProtocolException(TProtocolException::INVALID_DATA);
169 return xfer;
170 }
171
172 uint32_t Downstream::write(::apache::thrift::protocol::TProtocol* oprot) const {
173 uint32_t xfer = 0;
174 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
175 xfer += oprot->writeStructBegin("Downstream");
176
177 xfer += oprot->writeFieldBegin("serviceName", ::apache::thrift::protocol::T_STRING, 1);
178 xfer += oprot->writeString(this->serviceName);
179 xfer += oprot->writeFieldEnd();
180
181 xfer += oprot->writeFieldBegin("serverRole", ::apache::thrift::protocol::T_STRING, 2);
182 xfer += oprot->writeString(this->serverRole);
183 xfer += oprot->writeFieldEnd();
184
185 xfer += oprot->writeFieldBegin("host", ::apache::thrift::protocol::T_STRING, 3);
186 xfer += oprot->writeString(this->host);
187 xfer += oprot->writeFieldEnd();
188
189 xfer += oprot->writeFieldBegin("port", ::apache::thrift::protocol::T_STRING, 4);
190 xfer += oprot->writeString(this->port);
191 xfer += oprot->writeFieldEnd();
192
193 xfer += oprot->writeFieldBegin("transport", ::apache::thrift::protocol::T_I32, 5);
194 xfer += oprot->writeI32((int32_t)this->transport);
195 xfer += oprot->writeFieldEnd();
196
197 if (this->__isset.downstream) {
198 xfer += oprot->writeFieldBegin("downstream", ::apache::thrift::protocol::T_STRUCT, 6);
199 xfer += this->downstream->write(oprot);
200 xfer += oprot->writeFieldEnd();
201 }
202 xfer += oprot->writeFieldStop();
203 xfer += oprot->writeStructEnd();
204 return xfer;
205 }
206
207 void swap(Downstream &a, Downstream &b) {
208 using ::std::swap;
209 swap(a.serviceName, b.serviceName);
210 swap(a.serverRole, b.serverRole);
211 swap(a.host, b.host);
212 swap(a.port, b.port);
213 swap(a.transport, b.transport);
214 swap(a.downstream, b.downstream);
215 swap(a.__isset, b.__isset);
216 }
217
218 Downstream::Downstream(const Downstream& other1) {
219 serviceName = other1.serviceName;
220 serverRole = other1.serverRole;
221 host = other1.host;
222 port = other1.port;
223 transport = other1.transport;
224 downstream = other1.downstream;
225 __isset = other1.__isset;
226 }
227 Downstream& Downstream::operator=(const Downstream& other2) {
228 serviceName = other2.serviceName;
229 serverRole = other2.serverRole;
230 host = other2.host;
231 port = other2.port;
232 transport = other2.transport;
233 downstream = other2.downstream;
234 __isset = other2.__isset;
235 return *this;
236 }
237 void Downstream::printTo(std::ostream& out) const {
238 using ::apache::thrift::to_string;
239 out << "Downstream(";
240 out << "serviceName=" << to_string(serviceName);
241 out << ", " << "serverRole=" << to_string(serverRole);
242 out << ", " << "host=" << to_string(host);
243 out << ", " << "port=" << to_string(port);
244 out << ", " << "transport=" << to_string(transport);
245 out << ", " << "downstream="; (__isset.downstream ? (out << to_string(downstream)) : (out << "<null>"));
246 out << ")";
247 }
248
249
250 StartTraceRequest::~StartTraceRequest() throw() {
251 }
252
253
254 void StartTraceRequest::__set_serverRole(const std::string& val) {
255 this->serverRole = val;
256 }
257
258 void StartTraceRequest::__set_sampled(const bool val) {
259 this->sampled = val;
260 }
261
262 void StartTraceRequest::__set_baggage(const std::string& val) {
263 this->baggage = val;
264 }
265
266 void StartTraceRequest::__set_downstream(const Downstream& val) {
267 this->downstream = val;
268 }
269 std::ostream& operator<<(std::ostream& out, const StartTraceRequest& obj)
270 {
271 obj.printTo(out);
272 return out;
273 }
274
275
276 uint32_t StartTraceRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
277
278 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
279 uint32_t xfer = 0;
280 std::string fname;
281 ::apache::thrift::protocol::TType ftype;
282 int16_t fid;
283
284 xfer += iprot->readStructBegin(fname);
285
286 using ::apache::thrift::protocol::TProtocolException;
287
288 bool isset_serverRole = false;
289 bool isset_sampled = false;
290 bool isset_baggage = false;
291 bool isset_downstream = false;
292
293 while (true)
294 {
295 xfer += iprot->readFieldBegin(fname, ftype, fid);
296 if (ftype == ::apache::thrift::protocol::T_STOP) {
297 break;
298 }
299 switch (fid)
300 {
301 case 1:
302 if (ftype == ::apache::thrift::protocol::T_STRING) {
303 xfer += iprot->readString(this->serverRole);
304 isset_serverRole = true;
305 } else {
306 xfer += iprot->skip(ftype);
307 }
308 break;
309 case 2:
310 if (ftype == ::apache::thrift::protocol::T_BOOL) {
311 xfer += iprot->readBool(this->sampled);
312 isset_sampled = true;
313 } else {
314 xfer += iprot->skip(ftype);
315 }
316 break;
317 case 3:
318 if (ftype == ::apache::thrift::protocol::T_STRING) {
319 xfer += iprot->readString(this->baggage);
320 isset_baggage = true;
321 } else {
322 xfer += iprot->skip(ftype);
323 }
324 break;
325 case 4:
326 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
327 xfer += this->downstream.read(iprot);
328 isset_downstream = true;
329 } else {
330 xfer += iprot->skip(ftype);
331 }
332 break;
333 default:
334 xfer += iprot->skip(ftype);
335 break;
336 }
337 xfer += iprot->readFieldEnd();
338 }
339
340 xfer += iprot->readStructEnd();
341
342 if (!isset_serverRole)
343 throw TProtocolException(TProtocolException::INVALID_DATA);
344 if (!isset_sampled)
345 throw TProtocolException(TProtocolException::INVALID_DATA);
346 if (!isset_baggage)
347 throw TProtocolException(TProtocolException::INVALID_DATA);
348 if (!isset_downstream)
349 throw TProtocolException(TProtocolException::INVALID_DATA);
350 return xfer;
351 }
352
353 uint32_t StartTraceRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
354 uint32_t xfer = 0;
355 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
356 xfer += oprot->writeStructBegin("StartTraceRequest");
357
358 xfer += oprot->writeFieldBegin("serverRole", ::apache::thrift::protocol::T_STRING, 1);
359 xfer += oprot->writeString(this->serverRole);
360 xfer += oprot->writeFieldEnd();
361
362 xfer += oprot->writeFieldBegin("sampled", ::apache::thrift::protocol::T_BOOL, 2);
363 xfer += oprot->writeBool(this->sampled);
364 xfer += oprot->writeFieldEnd();
365
366 xfer += oprot->writeFieldBegin("baggage", ::apache::thrift::protocol::T_STRING, 3);
367 xfer += oprot->writeString(this->baggage);
368 xfer += oprot->writeFieldEnd();
369
370 xfer += oprot->writeFieldBegin("downstream", ::apache::thrift::protocol::T_STRUCT, 4);
371 xfer += this->downstream.write(oprot);
372 xfer += oprot->writeFieldEnd();
373
374 xfer += oprot->writeFieldStop();
375 xfer += oprot->writeStructEnd();
376 return xfer;
377 }
378
379 void swap(StartTraceRequest &a, StartTraceRequest &b) {
380 using ::std::swap;
381 swap(a.serverRole, b.serverRole);
382 swap(a.sampled, b.sampled);
383 swap(a.baggage, b.baggage);
384 swap(a.downstream, b.downstream);
385 }
386
387 StartTraceRequest::StartTraceRequest(const StartTraceRequest& other3) {
388 serverRole = other3.serverRole;
389 sampled = other3.sampled;
390 baggage = other3.baggage;
391 downstream = other3.downstream;
392 }
393 StartTraceRequest& StartTraceRequest::operator=(const StartTraceRequest& other4) {
394 serverRole = other4.serverRole;
395 sampled = other4.sampled;
396 baggage = other4.baggage;
397 downstream = other4.downstream;
398 return *this;
399 }
400 void StartTraceRequest::printTo(std::ostream& out) const {
401 using ::apache::thrift::to_string;
402 out << "StartTraceRequest(";
403 out << "serverRole=" << to_string(serverRole);
404 out << ", " << "sampled=" << to_string(sampled);
405 out << ", " << "baggage=" << to_string(baggage);
406 out << ", " << "downstream=" << to_string(downstream);
407 out << ")";
408 }
409
410
411 JoinTraceRequest::~JoinTraceRequest() throw() {
412 }
413
414
415 void JoinTraceRequest::__set_serverRole(const std::string& val) {
416 this->serverRole = val;
417 }
418
419 void JoinTraceRequest::__set_downstream(const Downstream& val) {
420 this->downstream = val;
421 __isset.downstream = true;
422 }
423 std::ostream& operator<<(std::ostream& out, const JoinTraceRequest& obj)
424 {
425 obj.printTo(out);
426 return out;
427 }
428
429
430 uint32_t JoinTraceRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
431
432 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
433 uint32_t xfer = 0;
434 std::string fname;
435 ::apache::thrift::protocol::TType ftype;
436 int16_t fid;
437
438 xfer += iprot->readStructBegin(fname);
439
440 using ::apache::thrift::protocol::TProtocolException;
441
442 bool isset_serverRole = false;
443
444 while (true)
445 {
446 xfer += iprot->readFieldBegin(fname, ftype, fid);
447 if (ftype == ::apache::thrift::protocol::T_STOP) {
448 break;
449 }
450 switch (fid)
451 {
452 case 1:
453 if (ftype == ::apache::thrift::protocol::T_STRING) {
454 xfer += iprot->readString(this->serverRole);
455 isset_serverRole = true;
456 } else {
457 xfer += iprot->skip(ftype);
458 }
459 break;
460 case 2:
461 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
462 xfer += this->downstream.read(iprot);
463 this->__isset.downstream = true;
464 } else {
465 xfer += iprot->skip(ftype);
466 }
467 break;
468 default:
469 xfer += iprot->skip(ftype);
470 break;
471 }
472 xfer += iprot->readFieldEnd();
473 }
474
475 xfer += iprot->readStructEnd();
476
477 if (!isset_serverRole)
478 throw TProtocolException(TProtocolException::INVALID_DATA);
479 return xfer;
480 }
481
482 uint32_t JoinTraceRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
483 uint32_t xfer = 0;
484 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
485 xfer += oprot->writeStructBegin("JoinTraceRequest");
486
487 xfer += oprot->writeFieldBegin("serverRole", ::apache::thrift::protocol::T_STRING, 1);
488 xfer += oprot->writeString(this->serverRole);
489 xfer += oprot->writeFieldEnd();
490
491 if (this->__isset.downstream) {
492 xfer += oprot->writeFieldBegin("downstream", ::apache::thrift::protocol::T_STRUCT, 2);
493 xfer += this->downstream.write(oprot);
494 xfer += oprot->writeFieldEnd();
495 }
496 xfer += oprot->writeFieldStop();
497 xfer += oprot->writeStructEnd();
498 return xfer;
499 }
500
501 void swap(JoinTraceRequest &a, JoinTraceRequest &b) {
502 using ::std::swap;
503 swap(a.serverRole, b.serverRole);
504 swap(a.downstream, b.downstream);
505 swap(a.__isset, b.__isset);
506 }
507
508 JoinTraceRequest::JoinTraceRequest(const JoinTraceRequest& other5) {
509 serverRole = other5.serverRole;
510 downstream = other5.downstream;
511 __isset = other5.__isset;
512 }
513 JoinTraceRequest& JoinTraceRequest::operator=(const JoinTraceRequest& other6) {
514 serverRole = other6.serverRole;
515 downstream = other6.downstream;
516 __isset = other6.__isset;
517 return *this;
518 }
519 void JoinTraceRequest::printTo(std::ostream& out) const {
520 using ::apache::thrift::to_string;
521 out << "JoinTraceRequest(";
522 out << "serverRole=" << to_string(serverRole);
523 out << ", " << "downstream="; (__isset.downstream ? (out << to_string(downstream)) : (out << "<null>"));
524 out << ")";
525 }
526
527
528 ObservedSpan::~ObservedSpan() throw() {
529 }
530
531
532 void ObservedSpan::__set_traceId(const std::string& val) {
533 this->traceId = val;
534 }
535
536 void ObservedSpan::__set_sampled(const bool val) {
537 this->sampled = val;
538 }
539
540 void ObservedSpan::__set_baggage(const std::string& val) {
541 this->baggage = val;
542 }
543 std::ostream& operator<<(std::ostream& out, const ObservedSpan& obj)
544 {
545 obj.printTo(out);
546 return out;
547 }
548
549
550 uint32_t ObservedSpan::read(::apache::thrift::protocol::TProtocol* iprot) {
551
552 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
553 uint32_t xfer = 0;
554 std::string fname;
555 ::apache::thrift::protocol::TType ftype;
556 int16_t fid;
557
558 xfer += iprot->readStructBegin(fname);
559
560 using ::apache::thrift::protocol::TProtocolException;
561
562 bool isset_traceId = false;
563 bool isset_sampled = false;
564 bool isset_baggage = false;
565
566 while (true)
567 {
568 xfer += iprot->readFieldBegin(fname, ftype, fid);
569 if (ftype == ::apache::thrift::protocol::T_STOP) {
570 break;
571 }
572 switch (fid)
573 {
574 case 1:
575 if (ftype == ::apache::thrift::protocol::T_STRING) {
576 xfer += iprot->readString(this->traceId);
577 isset_traceId = true;
578 } else {
579 xfer += iprot->skip(ftype);
580 }
581 break;
582 case 2:
583 if (ftype == ::apache::thrift::protocol::T_BOOL) {
584 xfer += iprot->readBool(this->sampled);
585 isset_sampled = true;
586 } else {
587 xfer += iprot->skip(ftype);
588 }
589 break;
590 case 3:
591 if (ftype == ::apache::thrift::protocol::T_STRING) {
592 xfer += iprot->readString(this->baggage);
593 isset_baggage = true;
594 } else {
595 xfer += iprot->skip(ftype);
596 }
597 break;
598 default:
599 xfer += iprot->skip(ftype);
600 break;
601 }
602 xfer += iprot->readFieldEnd();
603 }
604
605 xfer += iprot->readStructEnd();
606
607 if (!isset_traceId)
608 throw TProtocolException(TProtocolException::INVALID_DATA);
609 if (!isset_sampled)
610 throw TProtocolException(TProtocolException::INVALID_DATA);
611 if (!isset_baggage)
612 throw TProtocolException(TProtocolException::INVALID_DATA);
613 return xfer;
614 }
615
616 uint32_t ObservedSpan::write(::apache::thrift::protocol::TProtocol* oprot) const {
617 uint32_t xfer = 0;
618 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
619 xfer += oprot->writeStructBegin("ObservedSpan");
620
621 xfer += oprot->writeFieldBegin("traceId", ::apache::thrift::protocol::T_STRING, 1);
622 xfer += oprot->writeString(this->traceId);
623 xfer += oprot->writeFieldEnd();
624
625 xfer += oprot->writeFieldBegin("sampled", ::apache::thrift::protocol::T_BOOL, 2);
626 xfer += oprot->writeBool(this->sampled);
627 xfer += oprot->writeFieldEnd();
628
629 xfer += oprot->writeFieldBegin("baggage", ::apache::thrift::protocol::T_STRING, 3);
630 xfer += oprot->writeString(this->baggage);
631 xfer += oprot->writeFieldEnd();
632
633 xfer += oprot->writeFieldStop();
634 xfer += oprot->writeStructEnd();
635 return xfer;
636 }
637
638 void swap(ObservedSpan &a, ObservedSpan &b) {
639 using ::std::swap;
640 swap(a.traceId, b.traceId);
641 swap(a.sampled, b.sampled);
642 swap(a.baggage, b.baggage);
643 }
644
645 ObservedSpan::ObservedSpan(const ObservedSpan& other7) {
646 traceId = other7.traceId;
647 sampled = other7.sampled;
648 baggage = other7.baggage;
649 }
650 ObservedSpan& ObservedSpan::operator=(const ObservedSpan& other8) {
651 traceId = other8.traceId;
652 sampled = other8.sampled;
653 baggage = other8.baggage;
654 return *this;
655 }
656 void ObservedSpan::printTo(std::ostream& out) const {
657 using ::apache::thrift::to_string;
658 out << "ObservedSpan(";
659 out << "traceId=" << to_string(traceId);
660 out << ", " << "sampled=" << to_string(sampled);
661 out << ", " << "baggage=" << to_string(baggage);
662 out << ")";
663 }
664
665
666 TraceResponse::~TraceResponse() throw() {
667 }
668
669
670 void TraceResponse::__set_span(const ObservedSpan& val) {
671 this->span = val;
672 __isset.span = true;
673 }
674
675 void TraceResponse::__set_downstream(const std::shared_ptr<TraceResponse>& val) {
676 this->downstream = val;
677 __isset.downstream = true;
678 }
679
680 void TraceResponse::__set_notImplementedError(const std::string& val) {
681 this->notImplementedError = val;
682 }
683 std::ostream& operator<<(std::ostream& out, const TraceResponse& obj)
684 {
685 obj.printTo(out);
686 return out;
687 }
688
689
690 uint32_t TraceResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
691
692 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
693 uint32_t xfer = 0;
694 std::string fname;
695 ::apache::thrift::protocol::TType ftype;
696 int16_t fid;
697
698 xfer += iprot->readStructBegin(fname);
699
700 using ::apache::thrift::protocol::TProtocolException;
701
702 bool isset_notImplementedError = false;
703
704 while (true)
705 {
706 xfer += iprot->readFieldBegin(fname, ftype, fid);
707 if (ftype == ::apache::thrift::protocol::T_STOP) {
708 break;
709 }
710 switch (fid)
711 {
712 case 1:
713 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
714 xfer += this->span.read(iprot);
715 this->__isset.span = true;
716 } else {
717 xfer += iprot->skip(ftype);
718 }
719 break;
720 case 2:
721 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
722 xfer += this->downstream->read(iprot);
723 this->__isset.downstream = true;
724 } else {
725 xfer += iprot->skip(ftype);
726 }
727 break;
728 case 3:
729 if (ftype == ::apache::thrift::protocol::T_STRING) {
730 xfer += iprot->readString(this->notImplementedError);
731 isset_notImplementedError = true;
732 } else {
733 xfer += iprot->skip(ftype);
734 }
735 break;
736 default:
737 xfer += iprot->skip(ftype);
738 break;
739 }
740 xfer += iprot->readFieldEnd();
741 }
742
743 xfer += iprot->readStructEnd();
744
745 if (!isset_notImplementedError)
746 throw TProtocolException(TProtocolException::INVALID_DATA);
747 return xfer;
748 }
749
750 uint32_t TraceResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
751 uint32_t xfer = 0;
752 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
753 xfer += oprot->writeStructBegin("TraceResponse");
754
755 if (this->__isset.span) {
756 xfer += oprot->writeFieldBegin("span", ::apache::thrift::protocol::T_STRUCT, 1);
757 xfer += this->span.write(oprot);
758 xfer += oprot->writeFieldEnd();
759 }
760 if (this->__isset.downstream) {
761 xfer += oprot->writeFieldBegin("downstream", ::apache::thrift::protocol::T_STRUCT, 2);
762 xfer += this->downstream->write(oprot);
763 xfer += oprot->writeFieldEnd();
764 }
765 xfer += oprot->writeFieldBegin("notImplementedError", ::apache::thrift::protocol::T_STRING, 3);
766 xfer += oprot->writeString(this->notImplementedError);
767 xfer += oprot->writeFieldEnd();
768
769 xfer += oprot->writeFieldStop();
770 xfer += oprot->writeStructEnd();
771 return xfer;
772 }
773
774 void swap(TraceResponse &a, TraceResponse &b) {
775 using ::std::swap;
776 swap(a.span, b.span);
777 swap(a.downstream, b.downstream);
778 swap(a.notImplementedError, b.notImplementedError);
779 swap(a.__isset, b.__isset);
780 }
781
782 TraceResponse::TraceResponse(const TraceResponse& other9) {
783 span = other9.span;
784 downstream = other9.downstream;
785 notImplementedError = other9.notImplementedError;
786 __isset = other9.__isset;
787 }
788 TraceResponse& TraceResponse::operator=(const TraceResponse& other10) {
789 span = other10.span;
790 downstream = other10.downstream;
791 notImplementedError = other10.notImplementedError;
792 __isset = other10.__isset;
793 return *this;
794 }
795 void TraceResponse::printTo(std::ostream& out) const {
796 using ::apache::thrift::to_string;
797 out << "TraceResponse(";
798 out << "span="; (__isset.span ? (out << to_string(span)) : (out << "<null>"));
799 out << ", " << "downstream="; (__isset.downstream ? (out << to_string(downstream)) : (out << "<null>"));
800 out << ", " << "notImplementedError=" << to_string(notImplementedError);
801 out << ")";
802 }
803
804 }}} // namespace