]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/jaeger-client-cpp/src/jaegertracing/thrift-gen/baggage_types.cpp
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / jaeger-client-cpp / src / jaegertracing / thrift-gen / baggage_types.cpp
CommitLineData
f67539c2
TL
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 "baggage_types.h"
8
9#include <algorithm>
10#include <ostream>
11
12#include <thrift/TToString.h>
13
14namespace jaegertracing { namespace thrift {
15
16
17BaggageRestriction::~BaggageRestriction() throw() {
18}
19
20
21void BaggageRestriction::__set_baggageKey(const std::string& val) {
22 this->baggageKey = val;
23}
24
25void BaggageRestriction::__set_maxValueLength(const int32_t val) {
26 this->maxValueLength = val;
27}
28std::ostream& operator<<(std::ostream& out, const BaggageRestriction& obj)
29{
30 obj.printTo(out);
31 return out;
32}
33
34
35uint32_t BaggageRestriction::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_baggageKey = false;
48 bool isset_maxValueLength = 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_STRING) {
60 xfer += iprot->readString(this->baggageKey);
61 isset_baggageKey = true;
62 } else {
63 xfer += iprot->skip(ftype);
64 }
65 break;
66 case 2:
67 if (ftype == ::apache::thrift::protocol::T_I32) {
68 xfer += iprot->readI32(this->maxValueLength);
69 isset_maxValueLength = 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_baggageKey)
84 throw TProtocolException(TProtocolException::INVALID_DATA);
85 if (!isset_maxValueLength)
86 throw TProtocolException(TProtocolException::INVALID_DATA);
87 return xfer;
88}
89
90uint32_t BaggageRestriction::write(::apache::thrift::protocol::TProtocol* oprot) const {
91 uint32_t xfer = 0;
92 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
93 xfer += oprot->writeStructBegin("BaggageRestriction");
94
95 xfer += oprot->writeFieldBegin("baggageKey", ::apache::thrift::protocol::T_STRING, 1);
96 xfer += oprot->writeString(this->baggageKey);
97 xfer += oprot->writeFieldEnd();
98
99 xfer += oprot->writeFieldBegin("maxValueLength", ::apache::thrift::protocol::T_I32, 2);
100 xfer += oprot->writeI32(this->maxValueLength);
101 xfer += oprot->writeFieldEnd();
102
103 xfer += oprot->writeFieldStop();
104 xfer += oprot->writeStructEnd();
105 return xfer;
106}
107
108void swap(BaggageRestriction &a, BaggageRestriction &b) {
109 using ::std::swap;
110 swap(a.baggageKey, b.baggageKey);
111 swap(a.maxValueLength, b.maxValueLength);
112}
113
114BaggageRestriction::BaggageRestriction(const BaggageRestriction& other0) {
115 baggageKey = other0.baggageKey;
116 maxValueLength = other0.maxValueLength;
117}
118BaggageRestriction& BaggageRestriction::operator=(const BaggageRestriction& other1) {
119 baggageKey = other1.baggageKey;
120 maxValueLength = other1.maxValueLength;
121 return *this;
122}
123void BaggageRestriction::printTo(std::ostream& out) const {
124 using ::apache::thrift::to_string;
125 out << "BaggageRestriction(";
126 out << "baggageKey=" << to_string(baggageKey);
127 out << ", " << "maxValueLength=" << to_string(maxValueLength);
128 out << ")";
129}
130
131}} // namespace