| 301 |
ashish |
1 |
#
|
|
|
2 |
# Autogenerated by Thrift
|
|
|
3 |
#
|
|
|
4 |
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
#
|
|
|
6 |
|
|
|
7 |
from thrift.Thrift import *
|
|
|
8 |
import fb303.ttypes
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
from thrift.transport import TTransport
|
|
|
12 |
from thrift.protocol import TBinaryProtocol
|
|
|
13 |
try:
|
|
|
14 |
from thrift.protocol import fastbinary
|
|
|
15 |
except:
|
|
|
16 |
fastbinary = None
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
class ResultCode:
|
|
|
20 |
OK = 0
|
|
|
21 |
TRY_LATER = 1
|
|
|
22 |
|
|
|
23 |
_VALUES_TO_NAMES = {
|
|
|
24 |
0: "OK",
|
|
|
25 |
1: "TRY_LATER",
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
_NAMES_TO_VALUES = {
|
|
|
29 |
"OK": 0,
|
|
|
30 |
"TRY_LATER": 1,
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
class LogEntry:
|
|
|
34 |
"""
|
|
|
35 |
Attributes:
|
|
|
36 |
- category
|
|
|
37 |
- message
|
|
|
38 |
"""
|
|
|
39 |
|
|
|
40 |
thrift_spec = (
|
|
|
41 |
None, # 0
|
|
|
42 |
(1, TType.STRING, 'category', None, None, ), # 1
|
|
|
43 |
(2, TType.STRING, 'message', None, None, ), # 2
|
|
|
44 |
)
|
|
|
45 |
|
|
|
46 |
def __init__(self, category=None, message=None,):
|
|
|
47 |
self.category = category
|
|
|
48 |
self.message = message
|
|
|
49 |
|
|
|
50 |
def read(self, iprot):
|
|
|
51 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
52 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
53 |
return
|
|
|
54 |
iprot.readStructBegin()
|
|
|
55 |
while True:
|
|
|
56 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
57 |
if ftype == TType.STOP:
|
|
|
58 |
break
|
|
|
59 |
if fid == 1:
|
|
|
60 |
if ftype == TType.STRING:
|
|
|
61 |
self.category = iprot.readString();
|
|
|
62 |
else:
|
|
|
63 |
iprot.skip(ftype)
|
|
|
64 |
elif fid == 2:
|
|
|
65 |
if ftype == TType.STRING:
|
|
|
66 |
self.message = iprot.readString();
|
|
|
67 |
else:
|
|
|
68 |
iprot.skip(ftype)
|
|
|
69 |
else:
|
|
|
70 |
iprot.skip(ftype)
|
|
|
71 |
iprot.readFieldEnd()
|
|
|
72 |
iprot.readStructEnd()
|
|
|
73 |
|
|
|
74 |
def write(self, oprot):
|
|
|
75 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
76 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
77 |
return
|
|
|
78 |
oprot.writeStructBegin('LogEntry')
|
|
|
79 |
if self.category != None:
|
|
|
80 |
oprot.writeFieldBegin('category', TType.STRING, 1)
|
|
|
81 |
oprot.writeString(self.category)
|
|
|
82 |
oprot.writeFieldEnd()
|
|
|
83 |
if self.message != None:
|
|
|
84 |
oprot.writeFieldBegin('message', TType.STRING, 2)
|
|
|
85 |
oprot.writeString(self.message)
|
|
|
86 |
oprot.writeFieldEnd()
|
|
|
87 |
oprot.writeFieldStop()
|
|
|
88 |
oprot.writeStructEnd()
|
|
|
89 |
|
|
|
90 |
def __repr__(self):
|
|
|
91 |
L = ['%s=%r' % (key, value)
|
|
|
92 |
for key, value in self.__dict__.iteritems()]
|
|
|
93 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
94 |
|
|
|
95 |
def __eq__(self, other):
|
|
|
96 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
97 |
|
|
|
98 |
def __ne__(self, other):
|
|
|
99 |
return not (self == other)
|
|
|
100 |
|