Subversion Repositories SmartDukaan

Rev

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