Subversion Repositories SmartDukaan

Rev

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