JIRA DOMINO-22
[domino.git] / lib / dominoCLI / ttypes.py
1 #
2 # Autogenerated by Thrift Compiler (0.9.3)
3 #
4 # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 #
6 #  options string: py
7 #
8
9 from thrift.Thrift import TType, TMessageType, TException, TApplicationException
10
11 from thrift.transport import TTransport
12 from thrift.protocol import TBinaryProtocol, TProtocol
13 try:
14   from thrift.protocol import fastbinary
15 except:
16   fastbinary = None
17
18
19
20 class CLIMessage:
21   """
22   Domino sends periodic heartbeats from
23   Domino Clients and Domino Server echos
24
25   Attributes:
26    - CLI_input
27   """
28
29   thrift_spec = (
30     None, # 0
31     (1, TType.LIST, 'CLI_input', (TType.STRING,None), None, ), # 1
32   )
33
34   def __init__(self, CLI_input=None,):
35     self.CLI_input = CLI_input
36
37   def read(self, iprot):
38     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
39       fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
40       return
41     iprot.readStructBegin()
42     while True:
43       (fname, ftype, fid) = iprot.readFieldBegin()
44       if ftype == TType.STOP:
45         break
46       if fid == 1:
47         if ftype == TType.LIST:
48           self.CLI_input = []
49           (_etype3, _size0) = iprot.readListBegin()
50           for _i4 in xrange(_size0):
51             _elem5 = iprot.readString()
52             self.CLI_input.append(_elem5)
53           iprot.readListEnd()
54         else:
55           iprot.skip(ftype)
56       else:
57         iprot.skip(ftype)
58       iprot.readFieldEnd()
59     iprot.readStructEnd()
60
61   def write(self, oprot):
62     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
63       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
64       return
65     oprot.writeStructBegin('CLIMessage')
66     if self.CLI_input is not None:
67       oprot.writeFieldBegin('CLI_input', TType.LIST, 1)
68       oprot.writeListBegin(TType.STRING, len(self.CLI_input))
69       for iter6 in self.CLI_input:
70         oprot.writeString(iter6)
71       oprot.writeListEnd()
72       oprot.writeFieldEnd()
73     oprot.writeFieldStop()
74     oprot.writeStructEnd()
75
76   def validate(self):
77     return
78
79
80   def __hash__(self):
81     value = 17
82     value = (value * 31) ^ hash(self.CLI_input)
83     return value
84
85   def __repr__(self):
86     L = ['%s=%r' % (key, value)
87       for key, value in self.__dict__.iteritems()]
88     return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
89
90   def __eq__(self, other):
91     return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
92
93   def __ne__(self, other):
94     return not (self == other)
95
96 class CLIResponse:
97   """
98   Attributes:
99    - CLI_response
100   """
101
102   thrift_spec = (
103     None, # 0
104     (1, TType.LIST, 'CLI_response', (TType.STRING,None), None, ), # 1
105   )
106
107   def __init__(self, CLI_response=None,):
108     self.CLI_response = CLI_response
109
110   def read(self, iprot):
111     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
112       fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
113       return
114     iprot.readStructBegin()
115     while True:
116       (fname, ftype, fid) = iprot.readFieldBegin()
117       if ftype == TType.STOP:
118         break
119       if fid == 1:
120         if ftype == TType.LIST:
121           self.CLI_response = []
122           (_etype10, _size7) = iprot.readListBegin()
123           for _i11 in xrange(_size7):
124             _elem12 = iprot.readString()
125             self.CLI_response.append(_elem12)
126           iprot.readListEnd()
127         else:
128           iprot.skip(ftype)
129       else:
130         iprot.skip(ftype)
131       iprot.readFieldEnd()
132     iprot.readStructEnd()
133
134   def write(self, oprot):
135     if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
136       oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
137       return
138     oprot.writeStructBegin('CLIResponse')
139     if self.CLI_response is not None:
140       oprot.writeFieldBegin('CLI_response', TType.LIST, 1)
141       oprot.writeListBegin(TType.STRING, len(self.CLI_response))
142       for iter13 in self.CLI_response:
143         oprot.writeString(iter13)
144       oprot.writeListEnd()
145       oprot.writeFieldEnd()
146     oprot.writeFieldStop()
147     oprot.writeStructEnd()
148
149   def validate(self):
150     return
151
152
153   def __hash__(self):
154     value = 17
155     value = (value * 31) ^ hash(self.CLI_response)
156     return value
157
158   def __repr__(self):
159     L = ['%s=%r' % (key, value)
160       for key, value in self.__dict__.iteritems()]
161     return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
162
163   def __eq__(self, other):
164     return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
165
166   def __ne__(self, other):
167     return not (self == other)