2 * Autogenerated by Thrift Compiler (0.11.0)
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
7 #ifndef zipkincore_TYPES_H
8 #define zipkincore_TYPES_H
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>
21 namespace twitter
{ namespace zipkin
{ namespace thrift
{
23 struct AnnotationType
{
35 extern const std::map
<int, const char*> _AnnotationType_VALUES_TO_NAMES
;
37 std::ostream
& operator<<(std::ostream
& out
, const AnnotationType::type
& val
);
43 class BinaryAnnotation
;
49 typedef struct _Endpoint__isset
{
50 _Endpoint__isset() : ipv4(false), port(false), service_name(false), ipv6(false) {}
57 class Endpoint
: public virtual ::apache::thrift::TBase
{
60 Endpoint(const Endpoint
&);
61 Endpoint
& operator=(const Endpoint
&);
62 Endpoint() : ipv4(0), port(0), service_name(), ipv6() {
65 virtual ~Endpoint() throw();
68 std::string service_name
;
71 _Endpoint__isset __isset
;
73 void __set_ipv4(const int32_t val
);
75 void __set_port(const int16_t val
);
77 void __set_service_name(const std::string
& val
);
79 void __set_ipv6(const std::string
& val
);
81 bool operator == (const Endpoint
& rhs
) const
83 if (!(ipv4
== rhs
.ipv4
))
85 if (!(port
== rhs
.port
))
87 if (!(service_name
== rhs
.service_name
))
89 if (__isset
.ipv6
!= rhs
.__isset
.ipv6
)
91 else if (__isset
.ipv6
&& !(ipv6
== rhs
.ipv6
))
95 bool operator != (const Endpoint
&rhs
) const {
96 return !(*this == rhs
);
99 bool operator < (const Endpoint
& ) const;
101 uint32_t read(::apache::thrift::protocol::TProtocol
* iprot
);
102 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
104 virtual void printTo(std::ostream
& out
) const;
107 void swap(Endpoint
&a
, Endpoint
&b
);
109 std::ostream
& operator<<(std::ostream
& out
, const Endpoint
& obj
);
111 typedef struct _Annotation__isset
{
112 _Annotation__isset() : timestamp(false), value(false), host(false) {}
116 } _Annotation__isset
;
118 class Annotation
: public virtual ::apache::thrift::TBase
{
121 Annotation(const Annotation
&);
122 Annotation
& operator=(const Annotation
&);
123 Annotation() : timestamp(0), value() {
126 virtual ~Annotation() throw();
131 _Annotation__isset __isset
;
133 void __set_timestamp(const int64_t val
);
135 void __set_value(const std::string
& val
);
137 void __set_host(const Endpoint
& val
);
139 bool operator == (const Annotation
& rhs
) const
141 if (!(timestamp
== rhs
.timestamp
))
143 if (!(value
== rhs
.value
))
145 if (__isset
.host
!= rhs
.__isset
.host
)
147 else if (__isset
.host
&& !(host
== rhs
.host
))
151 bool operator != (const Annotation
&rhs
) const {
152 return !(*this == rhs
);
155 bool operator < (const Annotation
& ) const;
157 uint32_t read(::apache::thrift::protocol::TProtocol
* iprot
);
158 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
160 virtual void printTo(std::ostream
& out
) const;
163 void swap(Annotation
&a
, Annotation
&b
);
165 std::ostream
& operator<<(std::ostream
& out
, const Annotation
& obj
);
167 typedef struct _BinaryAnnotation__isset
{
168 _BinaryAnnotation__isset() : key(false), value(false), annotation_type(false), host(false) {}
171 bool annotation_type
:1;
173 } _BinaryAnnotation__isset
;
175 class BinaryAnnotation
: public virtual ::apache::thrift::TBase
{
178 BinaryAnnotation(const BinaryAnnotation
&);
179 BinaryAnnotation
& operator=(const BinaryAnnotation
&);
180 BinaryAnnotation() : key(), value(), annotation_type((AnnotationType::type
)0) {
183 virtual ~BinaryAnnotation() throw();
186 AnnotationType::type annotation_type
;
189 _BinaryAnnotation__isset __isset
;
191 void __set_key(const std::string
& val
);
193 void __set_value(const std::string
& val
);
195 void __set_annotation_type(const AnnotationType::type val
);
197 void __set_host(const Endpoint
& val
);
199 bool operator == (const BinaryAnnotation
& rhs
) const
201 if (!(key
== rhs
.key
))
203 if (!(value
== rhs
.value
))
205 if (!(annotation_type
== rhs
.annotation_type
))
207 if (__isset
.host
!= rhs
.__isset
.host
)
209 else if (__isset
.host
&& !(host
== rhs
.host
))
213 bool operator != (const BinaryAnnotation
&rhs
) const {
214 return !(*this == rhs
);
217 bool operator < (const BinaryAnnotation
& ) const;
219 uint32_t read(::apache::thrift::protocol::TProtocol
* iprot
);
220 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
222 virtual void printTo(std::ostream
& out
) const;
225 void swap(BinaryAnnotation
&a
, BinaryAnnotation
&b
);
227 std::ostream
& operator<<(std::ostream
& out
, const BinaryAnnotation
& obj
);
229 typedef struct _Span__isset
{
230 _Span__isset() : trace_id(false), name(false), id(false), parent_id(false), annotations(false), binary_annotations(false), debug(true), timestamp(false), duration(false), trace_id_high(false) {}
236 bool binary_annotations
:1;
240 bool trace_id_high
:1;
243 class Span
: public virtual ::apache::thrift::TBase
{
247 Span
& operator=(const Span
&);
248 Span() : trace_id(0), name(), id(0), parent_id(0), debug(false), timestamp(0), duration(0), trace_id_high(0) {
251 virtual ~Span() throw();
256 std::vector
<Annotation
> annotations
;
257 std::vector
<BinaryAnnotation
> binary_annotations
;
261 int64_t trace_id_high
;
263 _Span__isset __isset
;
265 void __set_trace_id(const int64_t val
);
267 void __set_name(const std::string
& val
);
269 void __set_id(const int64_t val
);
271 void __set_parent_id(const int64_t val
);
273 void __set_annotations(const std::vector
<Annotation
> & val
);
275 void __set_binary_annotations(const std::vector
<BinaryAnnotation
> & val
);
277 void __set_debug(const bool val
);
279 void __set_timestamp(const int64_t val
);
281 void __set_duration(const int64_t val
);
283 void __set_trace_id_high(const int64_t val
);
285 bool operator == (const Span
& rhs
) const
287 if (!(trace_id
== rhs
.trace_id
))
289 if (!(name
== rhs
.name
))
293 if (__isset
.parent_id
!= rhs
.__isset
.parent_id
)
295 else if (__isset
.parent_id
&& !(parent_id
== rhs
.parent_id
))
297 if (!(annotations
== rhs
.annotations
))
299 if (!(binary_annotations
== rhs
.binary_annotations
))
301 if (__isset
.debug
!= rhs
.__isset
.debug
)
303 else if (__isset
.debug
&& !(debug
== rhs
.debug
))
305 if (__isset
.timestamp
!= rhs
.__isset
.timestamp
)
307 else if (__isset
.timestamp
&& !(timestamp
== rhs
.timestamp
))
309 if (__isset
.duration
!= rhs
.__isset
.duration
)
311 else if (__isset
.duration
&& !(duration
== rhs
.duration
))
313 if (__isset
.trace_id_high
!= rhs
.__isset
.trace_id_high
)
315 else if (__isset
.trace_id_high
&& !(trace_id_high
== rhs
.trace_id_high
))
319 bool operator != (const Span
&rhs
) const {
320 return !(*this == rhs
);
323 bool operator < (const Span
& ) const;
325 uint32_t read(::apache::thrift::protocol::TProtocol
* iprot
);
326 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
328 virtual void printTo(std::ostream
& out
) const;
331 void swap(Span
&a
, Span
&b
);
333 std::ostream
& operator<<(std::ostream
& out
, const Span
& obj
);
336 class Response
: public virtual ::apache::thrift::TBase
{
339 Response(const Response
&);
340 Response
& operator=(const Response
&);
344 virtual ~Response() throw();
347 void __set_ok(const bool val
);
349 bool operator == (const Response
& rhs
) const
355 bool operator != (const Response
&rhs
) const {
356 return !(*this == rhs
);
359 bool operator < (const Response
& ) const;
361 uint32_t read(::apache::thrift::protocol::TProtocol
* iprot
);
362 uint32_t write(::apache::thrift::protocol::TProtocol
* oprot
) const;
364 virtual void printTo(std::ostream
& out
) const;
367 void swap(Response
&a
, Response
&b
);
369 std::ostream
& operator<<(std::ostream
& out
, const Response
& obj
);