]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/thrift-gen/aggregation_validator_types.cpp
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / jaeger-client-cpp / src / jaegertracing / thrift-gen / aggregation_validator_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 "aggregation_validator_types.h"
8
9 #include <algorithm>
10 #include <ostream>
11
12 #include <thrift/TToString.h>
13
14 namespace jaegertracing { namespace thrift {
15
16
17 ValidateTraceResponse::~ValidateTraceResponse() throw() {
18 }
19
20
21 void ValidateTraceResponse::__set_ok(const bool val) {
22 this->ok = val;
23 }
24
25 void ValidateTraceResponse::__set_traceCount(const int64_t val) {
26 this->traceCount = val;
27 }
28 std::ostream& operator<<(std::ostream& out, const ValidateTraceResponse& obj)
29 {
30 obj.printTo(out);
31 return out;
32 }
33
34
35 uint32_t ValidateTraceResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
36
37 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
38 uint32_t xfer = 0;
39 std::string fname;
40 ::apache::thrift::protocol::TType ftype;
41 int16_t fid;
42
43 xfer += iprot->readStructBegin(fname);
44
45 using ::apache::thrift::protocol::TProtocolException;
46
47 bool isset_ok = false;
48 bool isset_traceCount = false;
49
50 while (true)
51 {
52 xfer += iprot->readFieldBegin(fname, ftype, fid);
53 if (ftype == ::apache::thrift::protocol::T_STOP) {
54 break;
55 }
56 switch (fid)
57 {
58 case 1:
59 if (ftype == ::apache::thrift::protocol::T_BOOL) {
60 xfer += iprot->readBool(this->ok);
61 isset_ok = true;
62 } else {
63 xfer += iprot->skip(ftype);
64 }
65 break;
66 case 2:
67 if (ftype == ::apache::thrift::protocol::T_I64) {
68 xfer += iprot->readI64(this->traceCount);
69 isset_traceCount = true;
70 } else {
71 xfer += iprot->skip(ftype);
72 }
73 break;
74 default:
75 xfer += iprot->skip(ftype);
76 break;
77 }
78 xfer += iprot->readFieldEnd();
79 }
80
81 xfer += iprot->readStructEnd();
82
83 if (!isset_ok)
84 throw TProtocolException(TProtocolException::INVALID_DATA);
85 if (!isset_traceCount)
86 throw TProtocolException(TProtocolException::INVALID_DATA);
87 return xfer;
88 }
89
90 uint32_t ValidateTraceResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
91 uint32_t xfer = 0;
92 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
93 xfer += oprot->writeStructBegin("ValidateTraceResponse");
94
95 xfer += oprot->writeFieldBegin("ok", ::apache::thrift::protocol::T_BOOL, 1);
96 xfer += oprot->writeBool(this->ok);
97 xfer += oprot->writeFieldEnd();
98
99 xfer += oprot->writeFieldBegin("traceCount", ::apache::thrift::protocol::T_I64, 2);
100 xfer += oprot->writeI64(this->traceCount);
101 xfer += oprot->writeFieldEnd();
102
103 xfer += oprot->writeFieldStop();
104 xfer += oprot->writeStructEnd();
105 return xfer;
106 }
107
108 void swap(ValidateTraceResponse &a, ValidateTraceResponse &b) {
109 using ::std::swap;
110 swap(a.ok, b.ok);
111 swap(a.traceCount, b.traceCount);
112 }
113
114 ValidateTraceResponse::ValidateTraceResponse(const ValidateTraceResponse& other0) {
115 ok = other0.ok;
116 traceCount = other0.traceCount;
117 }
118 ValidateTraceResponse& ValidateTraceResponse::operator=(const ValidateTraceResponse& other1) {
119 ok = other1.ok;
120 traceCount = other1.traceCount;
121 return *this;
122 }
123 void ValidateTraceResponse::printTo(std::ostream& out) const {
124 using ::apache::thrift::to_string;
125 out << "ValidateTraceResponse(";
126 out << "ok=" << to_string(ok);
127 out << ", " << "traceCount=" << to_string(traceCount);
128 out << ")";
129 }
130
131 }} // namespace