Subversion Repositories SmartDukaan

Rev

Rev 2832 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2821 chandransh 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
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
try:
13
  from thrift.protocol import fastbinary
14
except:
15
  fastbinary = None
16
 
17
 
18
class Iface:
19
  def createPurchaseOrder(self, purchaseOrder):
20
    """
21
    Creates a purchase order based on the data in the given purchase order object.
22
    This method populates a nummber of missing fields
23
 
24
    Parameters:
25
     - purchaseOrder
26
    """
27
    pass
28
 
29
  def getPurchaseOrder(self, id):
30
    """
31
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
32
 
33
    Parameters:
34
     - id
35
    """
36
    pass
37
 
38
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
39
    """
40
    Creates a purchase for the given purchase order.
41
    Throws an exception if no more purchases are allowed against the given purchase order.
42
 
43
    Parameters:
44
     - purchaseOrderId
45
     - invoiceNumber
46
     - freightCharges
47
    """
48
    pass
49
 
50
  def closePurchase(self, purchaseId):
51
    """
52
    Marks a purchase as complete and updates the receivedOn time.
53
    Throws an exception if no such purchase exists.
54
 
55
    Parameters:
56
     - purchaseId
57
    """
58
    pass
59
 
60
  def scanIn(self, purchaseId, itemId, itemNumber, imeiNumber, type):
61
    """
62
    Creates a StockLedger and a Scan object using the given details.
63
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
64
 
65
    Parameters:
66
     - purchaseId
67
     - itemId
68
     - itemNumber
69
     - imeiNumber
70
     - type
71
    """
72
    pass
73
 
74
  def scanOut(self, itemNumber, imeiNumber, type):
75
    """
76
    Marks the StockLedger object with the given details as scanned out. In case, the imeiNumber is not given,
77
    marks the oldest ItemInventory object as being scanned out.
78
    Creats a Scan object for this action.
79
    Raises an exception if:
80
    1. There is no stock present corresponding to the given item details.
81
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
82
 
83
    Parameters:
84
     - itemNumber
85
     - imeiNumber
86
     - type
87
    """
88
    pass
89
 
90
 
91
class Client(Iface):
92
  def __init__(self, iprot, oprot=None):
93
    self._iprot = self._oprot = iprot
94
    if oprot != None:
95
      self._oprot = oprot
96
    self._seqid = 0
97
 
98
  def createPurchaseOrder(self, purchaseOrder):
99
    """
100
    Creates a purchase order based on the data in the given purchase order object.
101
    This method populates a nummber of missing fields
102
 
103
    Parameters:
104
     - purchaseOrder
105
    """
106
    self.send_createPurchaseOrder(purchaseOrder)
107
    return self.recv_createPurchaseOrder()
108
 
109
  def send_createPurchaseOrder(self, purchaseOrder):
110
    self._oprot.writeMessageBegin('createPurchaseOrder', TMessageType.CALL, self._seqid)
111
    args = createPurchaseOrder_args()
112
    args.purchaseOrder = purchaseOrder
113
    args.write(self._oprot)
114
    self._oprot.writeMessageEnd()
115
    self._oprot.trans.flush()
116
 
117
  def recv_createPurchaseOrder(self, ):
118
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
119
    if mtype == TMessageType.EXCEPTION:
120
      x = TApplicationException()
121
      x.read(self._iprot)
122
      self._iprot.readMessageEnd()
123
      raise x
124
    result = createPurchaseOrder_result()
125
    result.read(self._iprot)
126
    self._iprot.readMessageEnd()
127
    if result.success != None:
128
      return result.success
129
    if result.wex != None:
130
      raise result.wex
131
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
132
 
133
  def getPurchaseOrder(self, id):
134
    """
135
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
136
 
137
    Parameters:
138
     - id
139
    """
140
    self.send_getPurchaseOrder(id)
141
    return self.recv_getPurchaseOrder()
142
 
143
  def send_getPurchaseOrder(self, id):
144
    self._oprot.writeMessageBegin('getPurchaseOrder', TMessageType.CALL, self._seqid)
145
    args = getPurchaseOrder_args()
146
    args.id = id
147
    args.write(self._oprot)
148
    self._oprot.writeMessageEnd()
149
    self._oprot.trans.flush()
150
 
151
  def recv_getPurchaseOrder(self, ):
152
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
153
    if mtype == TMessageType.EXCEPTION:
154
      x = TApplicationException()
155
      x.read(self._iprot)
156
      self._iprot.readMessageEnd()
157
      raise x
158
    result = getPurchaseOrder_result()
159
    result.read(self._iprot)
160
    self._iprot.readMessageEnd()
161
    if result.success != None:
162
      return result.success
163
    if result.wex != None:
164
      raise result.wex
165
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
166
 
167
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
168
    """
169
    Creates a purchase for the given purchase order.
170
    Throws an exception if no more purchases are allowed against the given purchase order.
171
 
172
    Parameters:
173
     - purchaseOrderId
174
     - invoiceNumber
175
     - freightCharges
176
    """
177
    self.send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges)
178
    return self.recv_startPurchase()
179
 
180
  def send_startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
181
    self._oprot.writeMessageBegin('startPurchase', TMessageType.CALL, self._seqid)
182
    args = startPurchase_args()
183
    args.purchaseOrderId = purchaseOrderId
184
    args.invoiceNumber = invoiceNumber
185
    args.freightCharges = freightCharges
186
    args.write(self._oprot)
187
    self._oprot.writeMessageEnd()
188
    self._oprot.trans.flush()
189
 
190
  def recv_startPurchase(self, ):
191
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
192
    if mtype == TMessageType.EXCEPTION:
193
      x = TApplicationException()
194
      x.read(self._iprot)
195
      self._iprot.readMessageEnd()
196
      raise x
197
    result = startPurchase_result()
198
    result.read(self._iprot)
199
    self._iprot.readMessageEnd()
200
    if result.success != None:
201
      return result.success
202
    if result.wex != None:
203
      raise result.wex
204
    raise TApplicationException(TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
205
 
206
  def closePurchase(self, purchaseId):
207
    """
208
    Marks a purchase as complete and updates the receivedOn time.
209
    Throws an exception if no such purchase exists.
210
 
211
    Parameters:
212
     - purchaseId
213
    """
214
    self.send_closePurchase(purchaseId)
215
    return self.recv_closePurchase()
216
 
217
  def send_closePurchase(self, purchaseId):
218
    self._oprot.writeMessageBegin('closePurchase', TMessageType.CALL, self._seqid)
219
    args = closePurchase_args()
220
    args.purchaseId = purchaseId
221
    args.write(self._oprot)
222
    self._oprot.writeMessageEnd()
223
    self._oprot.trans.flush()
224
 
225
  def recv_closePurchase(self, ):
226
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
227
    if mtype == TMessageType.EXCEPTION:
228
      x = TApplicationException()
229
      x.read(self._iprot)
230
      self._iprot.readMessageEnd()
231
      raise x
232
    result = closePurchase_result()
233
    result.read(self._iprot)
234
    self._iprot.readMessageEnd()
235
    if result.success != None:
236
      return result.success
237
    if result.wex != None:
238
      raise result.wex
239
    raise TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
240
 
241
  def scanIn(self, purchaseId, itemId, itemNumber, imeiNumber, type):
242
    """
243
    Creates a StockLedger and a Scan object using the given details.
244
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
245
 
246
    Parameters:
247
     - purchaseId
248
     - itemId
249
     - itemNumber
250
     - imeiNumber
251
     - type
252
    """
253
    self.send_scanIn(purchaseId, itemId, itemNumber, imeiNumber, type)
254
    self.recv_scanIn()
255
 
256
  def send_scanIn(self, purchaseId, itemId, itemNumber, imeiNumber, type):
257
    self._oprot.writeMessageBegin('scanIn', TMessageType.CALL, self._seqid)
258
    args = scanIn_args()
259
    args.purchaseId = purchaseId
260
    args.itemId = itemId
261
    args.itemNumber = itemNumber
262
    args.imeiNumber = imeiNumber
263
    args.type = type
264
    args.write(self._oprot)
265
    self._oprot.writeMessageEnd()
266
    self._oprot.trans.flush()
267
 
268
  def recv_scanIn(self, ):
269
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
270
    if mtype == TMessageType.EXCEPTION:
271
      x = TApplicationException()
272
      x.read(self._iprot)
273
      self._iprot.readMessageEnd()
274
      raise x
275
    result = scanIn_result()
276
    result.read(self._iprot)
277
    self._iprot.readMessageEnd()
278
    if result.wex != None:
279
      raise result.wex
280
    return
281
 
282
  def scanOut(self, itemNumber, imeiNumber, type):
283
    """
284
    Marks the StockLedger object with the given details as scanned out. In case, the imeiNumber is not given,
285
    marks the oldest ItemInventory object as being scanned out.
286
    Creats a Scan object for this action.
287
    Raises an exception if:
288
    1. There is no stock present corresponding to the given item details.
289
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
290
 
291
    Parameters:
292
     - itemNumber
293
     - imeiNumber
294
     - type
295
    """
296
    self.send_scanOut(itemNumber, imeiNumber, type)
297
    self.recv_scanOut()
298
 
299
  def send_scanOut(self, itemNumber, imeiNumber, type):
300
    self._oprot.writeMessageBegin('scanOut', TMessageType.CALL, self._seqid)
301
    args = scanOut_args()
302
    args.itemNumber = itemNumber
303
    args.imeiNumber = imeiNumber
304
    args.type = type
305
    args.write(self._oprot)
306
    self._oprot.writeMessageEnd()
307
    self._oprot.trans.flush()
308
 
309
  def recv_scanOut(self, ):
310
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
311
    if mtype == TMessageType.EXCEPTION:
312
      x = TApplicationException()
313
      x.read(self._iprot)
314
      self._iprot.readMessageEnd()
315
      raise x
316
    result = scanOut_result()
317
    result.read(self._iprot)
318
    self._iprot.readMessageEnd()
319
    if result.wex != None:
320
      raise result.wex
321
    return
322
 
323
 
324
class Processor(Iface, TProcessor):
325
  def __init__(self, handler):
326
    self._handler = handler
327
    self._processMap = {}
328
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
329
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
330
    self._processMap["startPurchase"] = Processor.process_startPurchase
331
    self._processMap["closePurchase"] = Processor.process_closePurchase
332
    self._processMap["scanIn"] = Processor.process_scanIn
333
    self._processMap["scanOut"] = Processor.process_scanOut
334
 
335
  def process(self, iprot, oprot):
336
    (name, type, seqid) = iprot.readMessageBegin()
337
    if name not in self._processMap:
338
      iprot.skip(TType.STRUCT)
339
      iprot.readMessageEnd()
340
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
341
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
342
      x.write(oprot)
343
      oprot.writeMessageEnd()
344
      oprot.trans.flush()
345
      return
346
    else:
347
      self._processMap[name](self, seqid, iprot, oprot)
348
    return True
349
 
350
  def process_createPurchaseOrder(self, seqid, iprot, oprot):
351
    args = createPurchaseOrder_args()
352
    args.read(iprot)
353
    iprot.readMessageEnd()
354
    result = createPurchaseOrder_result()
355
    try:
356
      result.success = self._handler.createPurchaseOrder(args.purchaseOrder)
357
    except WarehouseServiceException, wex:
358
      result.wex = wex
359
    oprot.writeMessageBegin("createPurchaseOrder", TMessageType.REPLY, seqid)
360
    result.write(oprot)
361
    oprot.writeMessageEnd()
362
    oprot.trans.flush()
363
 
364
  def process_getPurchaseOrder(self, seqid, iprot, oprot):
365
    args = getPurchaseOrder_args()
366
    args.read(iprot)
367
    iprot.readMessageEnd()
368
    result = getPurchaseOrder_result()
369
    try:
370
      result.success = self._handler.getPurchaseOrder(args.id)
371
    except WarehouseServiceException, wex:
372
      result.wex = wex
373
    oprot.writeMessageBegin("getPurchaseOrder", TMessageType.REPLY, seqid)
374
    result.write(oprot)
375
    oprot.writeMessageEnd()
376
    oprot.trans.flush()
377
 
378
  def process_startPurchase(self, seqid, iprot, oprot):
379
    args = startPurchase_args()
380
    args.read(iprot)
381
    iprot.readMessageEnd()
382
    result = startPurchase_result()
383
    try:
384
      result.success = self._handler.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges)
385
    except WarehouseServiceException, wex:
386
      result.wex = wex
387
    oprot.writeMessageBegin("startPurchase", TMessageType.REPLY, seqid)
388
    result.write(oprot)
389
    oprot.writeMessageEnd()
390
    oprot.trans.flush()
391
 
392
  def process_closePurchase(self, seqid, iprot, oprot):
393
    args = closePurchase_args()
394
    args.read(iprot)
395
    iprot.readMessageEnd()
396
    result = closePurchase_result()
397
    try:
398
      result.success = self._handler.closePurchase(args.purchaseId)
399
    except WarehouseServiceException, wex:
400
      result.wex = wex
401
    oprot.writeMessageBegin("closePurchase", TMessageType.REPLY, seqid)
402
    result.write(oprot)
403
    oprot.writeMessageEnd()
404
    oprot.trans.flush()
405
 
406
  def process_scanIn(self, seqid, iprot, oprot):
407
    args = scanIn_args()
408
    args.read(iprot)
409
    iprot.readMessageEnd()
410
    result = scanIn_result()
411
    try:
412
      self._handler.scanIn(args.purchaseId, args.itemId, args.itemNumber, args.imeiNumber, args.type)
413
    except WarehouseServiceException, wex:
414
      result.wex = wex
415
    oprot.writeMessageBegin("scanIn", TMessageType.REPLY, seqid)
416
    result.write(oprot)
417
    oprot.writeMessageEnd()
418
    oprot.trans.flush()
419
 
420
  def process_scanOut(self, seqid, iprot, oprot):
421
    args = scanOut_args()
422
    args.read(iprot)
423
    iprot.readMessageEnd()
424
    result = scanOut_result()
425
    try:
426
      self._handler.scanOut(args.itemNumber, args.imeiNumber, args.type)
427
    except WarehouseServiceException, wex:
428
      result.wex = wex
429
    oprot.writeMessageBegin("scanOut", TMessageType.REPLY, seqid)
430
    result.write(oprot)
431
    oprot.writeMessageEnd()
432
    oprot.trans.flush()
433
 
434
 
435
# HELPER FUNCTIONS AND STRUCTURES
436
 
437
class createPurchaseOrder_args:
438
  """
439
  Attributes:
440
   - purchaseOrder
441
  """
442
 
443
  thrift_spec = (
444
    None, # 0
445
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
446
  )
447
 
448
  def __init__(self, purchaseOrder=None,):
449
    self.purchaseOrder = purchaseOrder
450
 
451
  def read(self, iprot):
452
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
453
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
454
      return
455
    iprot.readStructBegin()
456
    while True:
457
      (fname, ftype, fid) = iprot.readFieldBegin()
458
      if ftype == TType.STOP:
459
        break
460
      if fid == 1:
461
        if ftype == TType.STRUCT:
462
          self.purchaseOrder = PurchaseOrder()
463
          self.purchaseOrder.read(iprot)
464
        else:
465
          iprot.skip(ftype)
466
      else:
467
        iprot.skip(ftype)
468
      iprot.readFieldEnd()
469
    iprot.readStructEnd()
470
 
471
  def write(self, oprot):
472
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
473
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
474
      return
475
    oprot.writeStructBegin('createPurchaseOrder_args')
476
    if self.purchaseOrder != None:
477
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
478
      self.purchaseOrder.write(oprot)
479
      oprot.writeFieldEnd()
480
    oprot.writeFieldStop()
481
    oprot.writeStructEnd()
482
 
483
  def __repr__(self):
484
    L = ['%s=%r' % (key, value)
485
      for key, value in self.__dict__.iteritems()]
486
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
487
 
488
  def __eq__(self, other):
489
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
490
 
491
  def __ne__(self, other):
492
    return not (self == other)
493
 
494
class createPurchaseOrder_result:
495
  """
496
  Attributes:
497
   - success
498
   - wex
499
  """
500
 
501
  thrift_spec = (
502
    (0, TType.I64, 'success', None, None, ), # 0
503
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
504
  )
505
 
506
  def __init__(self, success=None, wex=None,):
507
    self.success = success
508
    self.wex = wex
509
 
510
  def read(self, iprot):
511
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
512
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
513
      return
514
    iprot.readStructBegin()
515
    while True:
516
      (fname, ftype, fid) = iprot.readFieldBegin()
517
      if ftype == TType.STOP:
518
        break
519
      if fid == 0:
520
        if ftype == TType.I64:
521
          self.success = iprot.readI64();
522
        else:
523
          iprot.skip(ftype)
524
      elif fid == 1:
525
        if ftype == TType.STRUCT:
526
          self.wex = WarehouseServiceException()
527
          self.wex.read(iprot)
528
        else:
529
          iprot.skip(ftype)
530
      else:
531
        iprot.skip(ftype)
532
      iprot.readFieldEnd()
533
    iprot.readStructEnd()
534
 
535
  def write(self, oprot):
536
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
537
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
538
      return
539
    oprot.writeStructBegin('createPurchaseOrder_result')
540
    if self.success != None:
541
      oprot.writeFieldBegin('success', TType.I64, 0)
542
      oprot.writeI64(self.success)
543
      oprot.writeFieldEnd()
544
    if self.wex != None:
545
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
546
      self.wex.write(oprot)
547
      oprot.writeFieldEnd()
548
    oprot.writeFieldStop()
549
    oprot.writeStructEnd()
550
 
551
  def __repr__(self):
552
    L = ['%s=%r' % (key, value)
553
      for key, value in self.__dict__.iteritems()]
554
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
555
 
556
  def __eq__(self, other):
557
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
558
 
559
  def __ne__(self, other):
560
    return not (self == other)
561
 
562
class getPurchaseOrder_args:
563
  """
564
  Attributes:
565
   - id
566
  """
567
 
568
  thrift_spec = (
569
    None, # 0
570
    (1, TType.I64, 'id', None, None, ), # 1
571
  )
572
 
573
  def __init__(self, id=None,):
574
    self.id = id
575
 
576
  def read(self, iprot):
577
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
578
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
579
      return
580
    iprot.readStructBegin()
581
    while True:
582
      (fname, ftype, fid) = iprot.readFieldBegin()
583
      if ftype == TType.STOP:
584
        break
585
      if fid == 1:
586
        if ftype == TType.I64:
587
          self.id = iprot.readI64();
588
        else:
589
          iprot.skip(ftype)
590
      else:
591
        iprot.skip(ftype)
592
      iprot.readFieldEnd()
593
    iprot.readStructEnd()
594
 
595
  def write(self, oprot):
596
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
597
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
598
      return
599
    oprot.writeStructBegin('getPurchaseOrder_args')
600
    if self.id != None:
601
      oprot.writeFieldBegin('id', TType.I64, 1)
602
      oprot.writeI64(self.id)
603
      oprot.writeFieldEnd()
604
    oprot.writeFieldStop()
605
    oprot.writeStructEnd()
606
 
607
  def __repr__(self):
608
    L = ['%s=%r' % (key, value)
609
      for key, value in self.__dict__.iteritems()]
610
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
611
 
612
  def __eq__(self, other):
613
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
614
 
615
  def __ne__(self, other):
616
    return not (self == other)
617
 
618
class getPurchaseOrder_result:
619
  """
620
  Attributes:
621
   - success
622
   - wex
623
  """
624
 
625
  thrift_spec = (
626
    (0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
627
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
628
  )
629
 
630
  def __init__(self, success=None, wex=None,):
631
    self.success = success
632
    self.wex = wex
633
 
634
  def read(self, iprot):
635
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
636
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
637
      return
638
    iprot.readStructBegin()
639
    while True:
640
      (fname, ftype, fid) = iprot.readFieldBegin()
641
      if ftype == TType.STOP:
642
        break
643
      if fid == 0:
644
        if ftype == TType.STRUCT:
645
          self.success = PurchaseOrder()
646
          self.success.read(iprot)
647
        else:
648
          iprot.skip(ftype)
649
      elif fid == 1:
650
        if ftype == TType.STRUCT:
651
          self.wex = WarehouseServiceException()
652
          self.wex.read(iprot)
653
        else:
654
          iprot.skip(ftype)
655
      else:
656
        iprot.skip(ftype)
657
      iprot.readFieldEnd()
658
    iprot.readStructEnd()
659
 
660
  def write(self, oprot):
661
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
662
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
663
      return
664
    oprot.writeStructBegin('getPurchaseOrder_result')
665
    if self.success != None:
666
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
667
      self.success.write(oprot)
668
      oprot.writeFieldEnd()
669
    if self.wex != None:
670
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
671
      self.wex.write(oprot)
672
      oprot.writeFieldEnd()
673
    oprot.writeFieldStop()
674
    oprot.writeStructEnd()
675
 
676
  def __repr__(self):
677
    L = ['%s=%r' % (key, value)
678
      for key, value in self.__dict__.iteritems()]
679
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
680
 
681
  def __eq__(self, other):
682
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
683
 
684
  def __ne__(self, other):
685
    return not (self == other)
686
 
687
class startPurchase_args:
688
  """
689
  Attributes:
690
   - purchaseOrderId
691
   - invoiceNumber
692
   - freightCharges
693
  """
694
 
695
  thrift_spec = (
696
    None, # 0
697
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
698
    (2, TType.STRING, 'invoiceNumber', None, None, ), # 2
699
    (3, TType.DOUBLE, 'freightCharges', None, None, ), # 3
700
  )
701
 
702
  def __init__(self, purchaseOrderId=None, invoiceNumber=None, freightCharges=None,):
703
    self.purchaseOrderId = purchaseOrderId
704
    self.invoiceNumber = invoiceNumber
705
    self.freightCharges = freightCharges
706
 
707
  def read(self, iprot):
708
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
709
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
710
      return
711
    iprot.readStructBegin()
712
    while True:
713
      (fname, ftype, fid) = iprot.readFieldBegin()
714
      if ftype == TType.STOP:
715
        break
716
      if fid == 1:
717
        if ftype == TType.I64:
718
          self.purchaseOrderId = iprot.readI64();
719
        else:
720
          iprot.skip(ftype)
721
      elif fid == 2:
722
        if ftype == TType.STRING:
723
          self.invoiceNumber = iprot.readString();
724
        else:
725
          iprot.skip(ftype)
726
      elif fid == 3:
727
        if ftype == TType.DOUBLE:
728
          self.freightCharges = iprot.readDouble();
729
        else:
730
          iprot.skip(ftype)
731
      else:
732
        iprot.skip(ftype)
733
      iprot.readFieldEnd()
734
    iprot.readStructEnd()
735
 
736
  def write(self, oprot):
737
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
738
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
739
      return
740
    oprot.writeStructBegin('startPurchase_args')
741
    if self.purchaseOrderId != None:
742
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
743
      oprot.writeI64(self.purchaseOrderId)
744
      oprot.writeFieldEnd()
745
    if self.invoiceNumber != None:
746
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 2)
747
      oprot.writeString(self.invoiceNumber)
748
      oprot.writeFieldEnd()
749
    if self.freightCharges != None:
750
      oprot.writeFieldBegin('freightCharges', TType.DOUBLE, 3)
751
      oprot.writeDouble(self.freightCharges)
752
      oprot.writeFieldEnd()
753
    oprot.writeFieldStop()
754
    oprot.writeStructEnd()
755
 
756
  def __repr__(self):
757
    L = ['%s=%r' % (key, value)
758
      for key, value in self.__dict__.iteritems()]
759
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
760
 
761
  def __eq__(self, other):
762
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
763
 
764
  def __ne__(self, other):
765
    return not (self == other)
766
 
767
class startPurchase_result:
768
  """
769
  Attributes:
770
   - success
771
   - wex
772
  """
773
 
774
  thrift_spec = (
775
    (0, TType.I64, 'success', None, None, ), # 0
776
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
777
  )
778
 
779
  def __init__(self, success=None, wex=None,):
780
    self.success = success
781
    self.wex = wex
782
 
783
  def read(self, iprot):
784
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
785
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
786
      return
787
    iprot.readStructBegin()
788
    while True:
789
      (fname, ftype, fid) = iprot.readFieldBegin()
790
      if ftype == TType.STOP:
791
        break
792
      if fid == 0:
793
        if ftype == TType.I64:
794
          self.success = iprot.readI64();
795
        else:
796
          iprot.skip(ftype)
797
      elif fid == 1:
798
        if ftype == TType.STRUCT:
799
          self.wex = WarehouseServiceException()
800
          self.wex.read(iprot)
801
        else:
802
          iprot.skip(ftype)
803
      else:
804
        iprot.skip(ftype)
805
      iprot.readFieldEnd()
806
    iprot.readStructEnd()
807
 
808
  def write(self, oprot):
809
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
810
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
811
      return
812
    oprot.writeStructBegin('startPurchase_result')
813
    if self.success != None:
814
      oprot.writeFieldBegin('success', TType.I64, 0)
815
      oprot.writeI64(self.success)
816
      oprot.writeFieldEnd()
817
    if self.wex != None:
818
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
819
      self.wex.write(oprot)
820
      oprot.writeFieldEnd()
821
    oprot.writeFieldStop()
822
    oprot.writeStructEnd()
823
 
824
  def __repr__(self):
825
    L = ['%s=%r' % (key, value)
826
      for key, value in self.__dict__.iteritems()]
827
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
828
 
829
  def __eq__(self, other):
830
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
831
 
832
  def __ne__(self, other):
833
    return not (self == other)
834
 
835
class closePurchase_args:
836
  """
837
  Attributes:
838
   - purchaseId
839
  """
840
 
841
  thrift_spec = (
842
    None, # 0
843
    (1, TType.I64, 'purchaseId', None, None, ), # 1
844
  )
845
 
846
  def __init__(self, purchaseId=None,):
847
    self.purchaseId = purchaseId
848
 
849
  def read(self, iprot):
850
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
851
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
852
      return
853
    iprot.readStructBegin()
854
    while True:
855
      (fname, ftype, fid) = iprot.readFieldBegin()
856
      if ftype == TType.STOP:
857
        break
858
      if fid == 1:
859
        if ftype == TType.I64:
860
          self.purchaseId = iprot.readI64();
861
        else:
862
          iprot.skip(ftype)
863
      else:
864
        iprot.skip(ftype)
865
      iprot.readFieldEnd()
866
    iprot.readStructEnd()
867
 
868
  def write(self, oprot):
869
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
870
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
871
      return
872
    oprot.writeStructBegin('closePurchase_args')
873
    if self.purchaseId != None:
874
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
875
      oprot.writeI64(self.purchaseId)
876
      oprot.writeFieldEnd()
877
    oprot.writeFieldStop()
878
    oprot.writeStructEnd()
879
 
880
  def __repr__(self):
881
    L = ['%s=%r' % (key, value)
882
      for key, value in self.__dict__.iteritems()]
883
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
884
 
885
  def __eq__(self, other):
886
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
887
 
888
  def __ne__(self, other):
889
    return not (self == other)
890
 
891
class closePurchase_result:
892
  """
893
  Attributes:
894
   - success
895
   - wex
896
  """
897
 
898
  thrift_spec = (
899
    (0, TType.I64, 'success', None, None, ), # 0
900
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
901
  )
902
 
903
  def __init__(self, success=None, wex=None,):
904
    self.success = success
905
    self.wex = wex
906
 
907
  def read(self, iprot):
908
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
909
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
910
      return
911
    iprot.readStructBegin()
912
    while True:
913
      (fname, ftype, fid) = iprot.readFieldBegin()
914
      if ftype == TType.STOP:
915
        break
916
      if fid == 0:
917
        if ftype == TType.I64:
918
          self.success = iprot.readI64();
919
        else:
920
          iprot.skip(ftype)
921
      elif fid == 1:
922
        if ftype == TType.STRUCT:
923
          self.wex = WarehouseServiceException()
924
          self.wex.read(iprot)
925
        else:
926
          iprot.skip(ftype)
927
      else:
928
        iprot.skip(ftype)
929
      iprot.readFieldEnd()
930
    iprot.readStructEnd()
931
 
932
  def write(self, oprot):
933
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
934
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
935
      return
936
    oprot.writeStructBegin('closePurchase_result')
937
    if self.success != None:
938
      oprot.writeFieldBegin('success', TType.I64, 0)
939
      oprot.writeI64(self.success)
940
      oprot.writeFieldEnd()
941
    if self.wex != None:
942
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
943
      self.wex.write(oprot)
944
      oprot.writeFieldEnd()
945
    oprot.writeFieldStop()
946
    oprot.writeStructEnd()
947
 
948
  def __repr__(self):
949
    L = ['%s=%r' % (key, value)
950
      for key, value in self.__dict__.iteritems()]
951
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
952
 
953
  def __eq__(self, other):
954
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
955
 
956
  def __ne__(self, other):
957
    return not (self == other)
958
 
959
class scanIn_args:
960
  """
961
  Attributes:
962
   - purchaseId
963
   - itemId
964
   - itemNumber
965
   - imeiNumber
966
   - type
967
  """
968
 
969
  thrift_spec = (
970
    None, # 0
971
    (1, TType.I64, 'purchaseId', None, None, ), # 1
972
    (2, TType.I64, 'itemId', None, None, ), # 2
973
    (3, TType.STRING, 'itemNumber', None, None, ), # 3
974
    (4, TType.STRING, 'imeiNumber', None, None, ), # 4
975
    (5, TType.I32, 'type', None, None, ), # 5
976
  )
977
 
978
  def __init__(self, purchaseId=None, itemId=None, itemNumber=None, imeiNumber=None, type=None,):
979
    self.purchaseId = purchaseId
980
    self.itemId = itemId
981
    self.itemNumber = itemNumber
982
    self.imeiNumber = imeiNumber
983
    self.type = type
984
 
985
  def read(self, iprot):
986
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
987
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
988
      return
989
    iprot.readStructBegin()
990
    while True:
991
      (fname, ftype, fid) = iprot.readFieldBegin()
992
      if ftype == TType.STOP:
993
        break
994
      if fid == 1:
995
        if ftype == TType.I64:
996
          self.purchaseId = iprot.readI64();
997
        else:
998
          iprot.skip(ftype)
999
      elif fid == 2:
1000
        if ftype == TType.I64:
1001
          self.itemId = iprot.readI64();
1002
        else:
1003
          iprot.skip(ftype)
1004
      elif fid == 3:
1005
        if ftype == TType.STRING:
1006
          self.itemNumber = iprot.readString();
1007
        else:
1008
          iprot.skip(ftype)
1009
      elif fid == 4:
1010
        if ftype == TType.STRING:
1011
          self.imeiNumber = iprot.readString();
1012
        else:
1013
          iprot.skip(ftype)
1014
      elif fid == 5:
1015
        if ftype == TType.I32:
1016
          self.type = iprot.readI32();
1017
        else:
1018
          iprot.skip(ftype)
1019
      else:
1020
        iprot.skip(ftype)
1021
      iprot.readFieldEnd()
1022
    iprot.readStructEnd()
1023
 
1024
  def write(self, oprot):
1025
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1026
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1027
      return
1028
    oprot.writeStructBegin('scanIn_args')
1029
    if self.purchaseId != None:
1030
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
1031
      oprot.writeI64(self.purchaseId)
1032
      oprot.writeFieldEnd()
1033
    if self.itemId != None:
1034
      oprot.writeFieldBegin('itemId', TType.I64, 2)
1035
      oprot.writeI64(self.itemId)
1036
      oprot.writeFieldEnd()
1037
    if self.itemNumber != None:
1038
      oprot.writeFieldBegin('itemNumber', TType.STRING, 3)
1039
      oprot.writeString(self.itemNumber)
1040
      oprot.writeFieldEnd()
1041
    if self.imeiNumber != None:
1042
      oprot.writeFieldBegin('imeiNumber', TType.STRING, 4)
1043
      oprot.writeString(self.imeiNumber)
1044
      oprot.writeFieldEnd()
1045
    if self.type != None:
1046
      oprot.writeFieldBegin('type', TType.I32, 5)
1047
      oprot.writeI32(self.type)
1048
      oprot.writeFieldEnd()
1049
    oprot.writeFieldStop()
1050
    oprot.writeStructEnd()
1051
 
1052
  def __repr__(self):
1053
    L = ['%s=%r' % (key, value)
1054
      for key, value in self.__dict__.iteritems()]
1055
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1056
 
1057
  def __eq__(self, other):
1058
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1059
 
1060
  def __ne__(self, other):
1061
    return not (self == other)
1062
 
1063
class scanIn_result:
1064
  """
1065
  Attributes:
1066
   - wex
1067
  """
1068
 
1069
  thrift_spec = (
1070
    None, # 0
1071
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1072
  )
1073
 
1074
  def __init__(self, wex=None,):
1075
    self.wex = wex
1076
 
1077
  def read(self, iprot):
1078
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1079
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1080
      return
1081
    iprot.readStructBegin()
1082
    while True:
1083
      (fname, ftype, fid) = iprot.readFieldBegin()
1084
      if ftype == TType.STOP:
1085
        break
1086
      if fid == 1:
1087
        if ftype == TType.STRUCT:
1088
          self.wex = WarehouseServiceException()
1089
          self.wex.read(iprot)
1090
        else:
1091
          iprot.skip(ftype)
1092
      else:
1093
        iprot.skip(ftype)
1094
      iprot.readFieldEnd()
1095
    iprot.readStructEnd()
1096
 
1097
  def write(self, oprot):
1098
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1099
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1100
      return
1101
    oprot.writeStructBegin('scanIn_result')
1102
    if self.wex != None:
1103
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1104
      self.wex.write(oprot)
1105
      oprot.writeFieldEnd()
1106
    oprot.writeFieldStop()
1107
    oprot.writeStructEnd()
1108
 
1109
  def __repr__(self):
1110
    L = ['%s=%r' % (key, value)
1111
      for key, value in self.__dict__.iteritems()]
1112
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1113
 
1114
  def __eq__(self, other):
1115
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1116
 
1117
  def __ne__(self, other):
1118
    return not (self == other)
1119
 
1120
class scanOut_args:
1121
  """
1122
  Attributes:
1123
   - itemNumber
1124
   - imeiNumber
1125
   - type
1126
  """
1127
 
1128
  thrift_spec = (
1129
    None, # 0
1130
    (1, TType.I64, 'itemNumber', None, None, ), # 1
1131
    (2, TType.I64, 'imeiNumber', None, None, ), # 2
1132
    (3, TType.I32, 'type', None, None, ), # 3
1133
  )
1134
 
1135
  def __init__(self, itemNumber=None, imeiNumber=None, type=None,):
1136
    self.itemNumber = itemNumber
1137
    self.imeiNumber = imeiNumber
1138
    self.type = type
1139
 
1140
  def read(self, iprot):
1141
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1142
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1143
      return
1144
    iprot.readStructBegin()
1145
    while True:
1146
      (fname, ftype, fid) = iprot.readFieldBegin()
1147
      if ftype == TType.STOP:
1148
        break
1149
      if fid == 1:
1150
        if ftype == TType.I64:
1151
          self.itemNumber = iprot.readI64();
1152
        else:
1153
          iprot.skip(ftype)
1154
      elif fid == 2:
1155
        if ftype == TType.I64:
1156
          self.imeiNumber = iprot.readI64();
1157
        else:
1158
          iprot.skip(ftype)
1159
      elif fid == 3:
1160
        if ftype == TType.I32:
1161
          self.type = iprot.readI32();
1162
        else:
1163
          iprot.skip(ftype)
1164
      else:
1165
        iprot.skip(ftype)
1166
      iprot.readFieldEnd()
1167
    iprot.readStructEnd()
1168
 
1169
  def write(self, oprot):
1170
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1171
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1172
      return
1173
    oprot.writeStructBegin('scanOut_args')
1174
    if self.itemNumber != None:
1175
      oprot.writeFieldBegin('itemNumber', TType.I64, 1)
1176
      oprot.writeI64(self.itemNumber)
1177
      oprot.writeFieldEnd()
1178
    if self.imeiNumber != None:
1179
      oprot.writeFieldBegin('imeiNumber', TType.I64, 2)
1180
      oprot.writeI64(self.imeiNumber)
1181
      oprot.writeFieldEnd()
1182
    if self.type != None:
1183
      oprot.writeFieldBegin('type', TType.I32, 3)
1184
      oprot.writeI32(self.type)
1185
      oprot.writeFieldEnd()
1186
    oprot.writeFieldStop()
1187
    oprot.writeStructEnd()
1188
 
1189
  def __repr__(self):
1190
    L = ['%s=%r' % (key, value)
1191
      for key, value in self.__dict__.iteritems()]
1192
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1193
 
1194
  def __eq__(self, other):
1195
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1196
 
1197
  def __ne__(self, other):
1198
    return not (self == other)
1199
 
1200
class scanOut_result:
1201
  """
1202
  Attributes:
1203
   - wex
1204
  """
1205
 
1206
  thrift_spec = (
1207
    None, # 0
1208
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1209
  )
1210
 
1211
  def __init__(self, wex=None,):
1212
    self.wex = wex
1213
 
1214
  def read(self, iprot):
1215
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1216
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1217
      return
1218
    iprot.readStructBegin()
1219
    while True:
1220
      (fname, ftype, fid) = iprot.readFieldBegin()
1221
      if ftype == TType.STOP:
1222
        break
1223
      if fid == 1:
1224
        if ftype == TType.STRUCT:
1225
          self.wex = WarehouseServiceException()
1226
          self.wex.read(iprot)
1227
        else:
1228
          iprot.skip(ftype)
1229
      else:
1230
        iprot.skip(ftype)
1231
      iprot.readFieldEnd()
1232
    iprot.readStructEnd()
1233
 
1234
  def write(self, oprot):
1235
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1236
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1237
      return
1238
    oprot.writeStructBegin('scanOut_result')
1239
    if self.wex != None:
1240
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1241
      self.wex.write(oprot)
1242
      oprot.writeFieldEnd()
1243
    oprot.writeFieldStop()
1244
    oprot.writeStructEnd()
1245
 
1246
  def __repr__(self):
1247
    L = ['%s=%r' % (key, value)
1248
      for key, value in self.__dict__.iteritems()]
1249
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1250
 
1251
  def __eq__(self, other):
1252
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1253
 
1254
  def __ne__(self, other):
1255
    return not (self == other)
1256
 
1257