]>
Commit | Line | Data |
---|---|---|
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 | #ifndef sampling_TYPES_H | |
8 | #define sampling_TYPES_H | |
9 | ||
10 | #include <iosfwd> | |
11 | ||
12 | #include <thrift/Thrift.h> | |
13 | #include <thrift/TApplicationException.h> | |
14 | #include <thrift/TBase.h> | |
15 | #include <thrift/protocol/TProtocol.h> | |
16 | #include <thrift/transport/TTransport.h> | |
17 | ||
18 | ||
19 | ||
20 | ||
21 | namespace jaegertracing { namespace sampling_manager { namespace thrift { | |
22 | ||
23 | struct SamplingStrategyType { | |
24 | enum type { | |
25 | PROBABILISTIC = 0, | |
26 | RATE_LIMITING = 1 | |
27 | }; | |
28 | }; | |
29 | ||
30 | extern const std::map<int, const char*> _SamplingStrategyType_VALUES_TO_NAMES; | |
31 | ||
32 | std::ostream& operator<<(std::ostream& out, const SamplingStrategyType::type& val); | |
33 | ||
34 | class ProbabilisticSamplingStrategy; | |
35 | ||
36 | class RateLimitingSamplingStrategy; | |
37 | ||
38 | class OperationSamplingStrategy; | |
39 | ||
40 | class PerOperationSamplingStrategies; | |
41 | ||
42 | class SamplingStrategyResponse; | |
43 | ||
44 | ||
45 | class ProbabilisticSamplingStrategy : public virtual ::apache::thrift::TBase { | |
46 | public: | |
47 | ||
48 | ProbabilisticSamplingStrategy(const ProbabilisticSamplingStrategy&); | |
49 | ProbabilisticSamplingStrategy& operator=(const ProbabilisticSamplingStrategy&); | |
50 | ProbabilisticSamplingStrategy() : samplingRate(0) { | |
51 | } | |
52 | ||
53 | virtual ~ProbabilisticSamplingStrategy() throw(); | |
54 | double samplingRate; | |
55 | ||
56 | void __set_samplingRate(const double val); | |
57 | ||
58 | bool operator == (const ProbabilisticSamplingStrategy & rhs) const | |
59 | { | |
60 | if (!(samplingRate == rhs.samplingRate)) | |
61 | return false; | |
62 | return true; | |
63 | } | |
64 | bool operator != (const ProbabilisticSamplingStrategy &rhs) const { | |
65 | return !(*this == rhs); | |
66 | } | |
67 | ||
68 | bool operator < (const ProbabilisticSamplingStrategy & ) const; | |
69 | ||
70 | uint32_t read(::apache::thrift::protocol::TProtocol* iprot); | |
71 | uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; | |
72 | ||
73 | virtual void printTo(std::ostream& out) const; | |
74 | }; | |
75 | ||
76 | void swap(ProbabilisticSamplingStrategy &a, ProbabilisticSamplingStrategy &b); | |
77 | ||
78 | std::ostream& operator<<(std::ostream& out, const ProbabilisticSamplingStrategy& obj); | |
79 | ||
80 | ||
81 | class RateLimitingSamplingStrategy : public virtual ::apache::thrift::TBase { | |
82 | public: | |
83 | ||
84 | RateLimitingSamplingStrategy(const RateLimitingSamplingStrategy&); | |
85 | RateLimitingSamplingStrategy& operator=(const RateLimitingSamplingStrategy&); | |
86 | RateLimitingSamplingStrategy() : maxTracesPerSecond(0) { | |
87 | } | |
88 | ||
89 | virtual ~RateLimitingSamplingStrategy() throw(); | |
90 | int16_t maxTracesPerSecond; | |
91 | ||
92 | void __set_maxTracesPerSecond(const int16_t val); | |
93 | ||
94 | bool operator == (const RateLimitingSamplingStrategy & rhs) const | |
95 | { | |
96 | if (!(maxTracesPerSecond == rhs.maxTracesPerSecond)) | |
97 | return false; | |
98 | return true; | |
99 | } | |
100 | bool operator != (const RateLimitingSamplingStrategy &rhs) const { | |
101 | return !(*this == rhs); | |
102 | } | |
103 | ||
104 | bool operator < (const RateLimitingSamplingStrategy & ) const; | |
105 | ||
106 | uint32_t read(::apache::thrift::protocol::TProtocol* iprot); | |
107 | uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; | |
108 | ||
109 | virtual void printTo(std::ostream& out) const; | |
110 | }; | |
111 | ||
112 | void swap(RateLimitingSamplingStrategy &a, RateLimitingSamplingStrategy &b); | |
113 | ||
114 | std::ostream& operator<<(std::ostream& out, const RateLimitingSamplingStrategy& obj); | |
115 | ||
116 | ||
117 | class OperationSamplingStrategy : public virtual ::apache::thrift::TBase { | |
118 | public: | |
119 | ||
120 | OperationSamplingStrategy(const OperationSamplingStrategy&); | |
121 | OperationSamplingStrategy& operator=(const OperationSamplingStrategy&); | |
122 | OperationSamplingStrategy() : operation() { | |
123 | } | |
124 | ||
125 | virtual ~OperationSamplingStrategy() throw(); | |
126 | std::string operation; | |
127 | ProbabilisticSamplingStrategy probabilisticSampling; | |
128 | ||
129 | void __set_operation(const std::string& val); | |
130 | ||
131 | void __set_probabilisticSampling(const ProbabilisticSamplingStrategy& val); | |
132 | ||
133 | bool operator == (const OperationSamplingStrategy & rhs) const | |
134 | { | |
135 | if (!(operation == rhs.operation)) | |
136 | return false; | |
137 | if (!(probabilisticSampling == rhs.probabilisticSampling)) | |
138 | return false; | |
139 | return true; | |
140 | } | |
141 | bool operator != (const OperationSamplingStrategy &rhs) const { | |
142 | return !(*this == rhs); | |
143 | } | |
144 | ||
145 | bool operator < (const OperationSamplingStrategy & ) const; | |
146 | ||
147 | uint32_t read(::apache::thrift::protocol::TProtocol* iprot); | |
148 | uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; | |
149 | ||
150 | virtual void printTo(std::ostream& out) const; | |
151 | }; | |
152 | ||
153 | void swap(OperationSamplingStrategy &a, OperationSamplingStrategy &b); | |
154 | ||
155 | std::ostream& operator<<(std::ostream& out, const OperationSamplingStrategy& obj); | |
156 | ||
157 | typedef struct _PerOperationSamplingStrategies__isset { | |
158 | _PerOperationSamplingStrategies__isset() : defaultUpperBoundTracesPerSecond(false) {} | |
159 | bool defaultUpperBoundTracesPerSecond :1; | |
160 | } _PerOperationSamplingStrategies__isset; | |
161 | ||
162 | class PerOperationSamplingStrategies : public virtual ::apache::thrift::TBase { | |
163 | public: | |
164 | ||
165 | PerOperationSamplingStrategies(const PerOperationSamplingStrategies&); | |
166 | PerOperationSamplingStrategies& operator=(const PerOperationSamplingStrategies&); | |
167 | PerOperationSamplingStrategies() : defaultSamplingProbability(0), defaultLowerBoundTracesPerSecond(0), defaultUpperBoundTracesPerSecond(0) { | |
168 | } | |
169 | ||
170 | virtual ~PerOperationSamplingStrategies() throw(); | |
171 | double defaultSamplingProbability; | |
172 | double defaultLowerBoundTracesPerSecond; | |
173 | std::vector<OperationSamplingStrategy> perOperationStrategies; | |
174 | double defaultUpperBoundTracesPerSecond; | |
175 | ||
176 | _PerOperationSamplingStrategies__isset __isset; | |
177 | ||
178 | void __set_defaultSamplingProbability(const double val); | |
179 | ||
180 | void __set_defaultLowerBoundTracesPerSecond(const double val); | |
181 | ||
182 | void __set_perOperationStrategies(const std::vector<OperationSamplingStrategy> & val); | |
183 | ||
184 | void __set_defaultUpperBoundTracesPerSecond(const double val); | |
185 | ||
186 | bool operator == (const PerOperationSamplingStrategies & rhs) const | |
187 | { | |
188 | if (!(defaultSamplingProbability == rhs.defaultSamplingProbability)) | |
189 | return false; | |
190 | if (!(defaultLowerBoundTracesPerSecond == rhs.defaultLowerBoundTracesPerSecond)) | |
191 | return false; | |
192 | if (!(perOperationStrategies == rhs.perOperationStrategies)) | |
193 | return false; | |
194 | if (__isset.defaultUpperBoundTracesPerSecond != rhs.__isset.defaultUpperBoundTracesPerSecond) | |
195 | return false; | |
196 | else if (__isset.defaultUpperBoundTracesPerSecond && !(defaultUpperBoundTracesPerSecond == rhs.defaultUpperBoundTracesPerSecond)) | |
197 | return false; | |
198 | return true; | |
199 | } | |
200 | bool operator != (const PerOperationSamplingStrategies &rhs) const { | |
201 | return !(*this == rhs); | |
202 | } | |
203 | ||
204 | bool operator < (const PerOperationSamplingStrategies & ) const; | |
205 | ||
206 | uint32_t read(::apache::thrift::protocol::TProtocol* iprot); | |
207 | uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; | |
208 | ||
209 | virtual void printTo(std::ostream& out) const; | |
210 | }; | |
211 | ||
212 | void swap(PerOperationSamplingStrategies &a, PerOperationSamplingStrategies &b); | |
213 | ||
214 | std::ostream& operator<<(std::ostream& out, const PerOperationSamplingStrategies& obj); | |
215 | ||
216 | typedef struct _SamplingStrategyResponse__isset { | |
217 | _SamplingStrategyResponse__isset() : probabilisticSampling(false), rateLimitingSampling(false), operationSampling(false) {} | |
218 | bool probabilisticSampling :1; | |
219 | bool rateLimitingSampling :1; | |
220 | bool operationSampling :1; | |
221 | } _SamplingStrategyResponse__isset; | |
222 | ||
223 | class SamplingStrategyResponse : public virtual ::apache::thrift::TBase { | |
224 | public: | |
225 | ||
226 | SamplingStrategyResponse(const SamplingStrategyResponse&); | |
227 | SamplingStrategyResponse& operator=(const SamplingStrategyResponse&); | |
228 | SamplingStrategyResponse() : strategyType((SamplingStrategyType::type)0) { | |
229 | } | |
230 | ||
231 | virtual ~SamplingStrategyResponse() throw(); | |
232 | SamplingStrategyType::type strategyType; | |
233 | ProbabilisticSamplingStrategy probabilisticSampling; | |
234 | RateLimitingSamplingStrategy rateLimitingSampling; | |
235 | PerOperationSamplingStrategies operationSampling; | |
236 | ||
237 | _SamplingStrategyResponse__isset __isset; | |
238 | ||
239 | void __set_strategyType(const SamplingStrategyType::type val); | |
240 | ||
241 | void __set_probabilisticSampling(const ProbabilisticSamplingStrategy& val); | |
242 | ||
243 | void __set_rateLimitingSampling(const RateLimitingSamplingStrategy& val); | |
244 | ||
245 | void __set_operationSampling(const PerOperationSamplingStrategies& val); | |
246 | ||
247 | bool operator == (const SamplingStrategyResponse & rhs) const | |
248 | { | |
249 | if (!(strategyType == rhs.strategyType)) | |
250 | return false; | |
251 | if (__isset.probabilisticSampling != rhs.__isset.probabilisticSampling) | |
252 | return false; | |
253 | else if (__isset.probabilisticSampling && !(probabilisticSampling == rhs.probabilisticSampling)) | |
254 | return false; | |
255 | if (__isset.rateLimitingSampling != rhs.__isset.rateLimitingSampling) | |
256 | return false; | |
257 | else if (__isset.rateLimitingSampling && !(rateLimitingSampling == rhs.rateLimitingSampling)) | |
258 | return false; | |
259 | if (__isset.operationSampling != rhs.__isset.operationSampling) | |
260 | return false; | |
261 | else if (__isset.operationSampling && !(operationSampling == rhs.operationSampling)) | |
262 | return false; | |
263 | return true; | |
264 | } | |
265 | bool operator != (const SamplingStrategyResponse &rhs) const { | |
266 | return !(*this == rhs); | |
267 | } | |
268 | ||
269 | bool operator < (const SamplingStrategyResponse & ) const; | |
270 | ||
271 | uint32_t read(::apache::thrift::protocol::TProtocol* iprot); | |
272 | uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; | |
273 | ||
274 | virtual void printTo(std::ostream& out) const; | |
275 | }; | |
276 | ||
277 | void swap(SamplingStrategyResponse &a, SamplingStrategyResponse &b); | |
278 | ||
279 | std::ostream& operator<<(std::ostream& out, const SamplingStrategyResponse& obj); | |
280 | ||
281 | }}} // namespace | |
282 | ||
283 | #endif |