Subversion Repositories SmartDukaan

Rev

Rev 3424 | Rev 4501 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2821 chandransh 1
#
3431 rajveer 2
# Autogenerated by Thrift Compiler (0.7.0)
2821 chandransh 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
3431 rajveer 12
from thrift.protocol import TBinaryProtocol, TProtocol
2821 chandransh 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
3431 rajveer 24
 
2821 chandransh 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.
3431 rajveer 33
 
2821 chandransh 34
    Parameters:
35
     - id
36
    """
37
    pass
38
 
3383 chandransh 39
  def getAllPurchaseOrders(self, status):
40
    """
41
    Returns a list of all the purchase orders in the given state
3431 rajveer 42
 
3383 chandransh 43
    Parameters:
44
     - status
45
    """
46
    pass
47
 
2832 chandransh 48
  def getSupplier(self, id):
49
    """
50
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
3431 rajveer 51
 
2832 chandransh 52
    Parameters:
53
     - id
54
    """
55
    pass
56
 
2821 chandransh 57
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
58
    """
59
    Creates a purchase for the given purchase order.
60
    Throws an exception if no more purchases are allowed against the given purchase order.
3431 rajveer 61
 
2821 chandransh 62
    Parameters:
63
     - purchaseOrderId
64
     - invoiceNumber
65
     - freightCharges
66
    """
67
    pass
68
 
69
  def closePurchase(self, purchaseId):
70
    """
71
    Marks a purchase as complete and updates the receivedOn time.
72
    Throws an exception if no such purchase exists.
3431 rajveer 73
 
2821 chandransh 74
    Parameters:
75
     - purchaseId
76
    """
77
    pass
78
 
3383 chandransh 79
  def getAllPurchases(self, purchaseOrderId, open):
2821 chandransh 80
    """
3383 chandransh 81
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
3431 rajveer 82
 
3383 chandransh 83
    Parameters:
84
     - purchaseOrderId
85
     - open
86
    """
87
    pass
88
 
89
  def scanIn(self, purchaseId, itemNumber, imeiNumber, type):
90
    """
91
    Creates a Scan object using the given details.
2821 chandransh 92
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
3431 rajveer 93
 
2821 chandransh 94
    Parameters:
95
     - purchaseId
96
     - itemNumber
97
     - imeiNumber
98
     - type
99
    """
100
    pass
101
 
102
  def scanOut(self, itemNumber, imeiNumber, type):
103
    """
3383 chandransh 104
    Marks the Scan object with the given details as scanned out. In case, the imeiNumber is not given,
2821 chandransh 105
    marks the oldest ItemInventory object as being scanned out.
106
    Raises an exception if:
107
    1. There is no stock present corresponding to the given item details.
108
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
3431 rajveer 109
 
2821 chandransh 110
    Parameters:
111
     - itemNumber
112
     - imeiNumber
113
     - type
114
    """
115
    pass
116
 
117
 
3376 rajveer 118
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2821 chandransh 119
  def __init__(self, iprot, oprot=None):
3376 rajveer 120
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2821 chandransh 121
 
122
  def createPurchaseOrder(self, purchaseOrder):
123
    """
124
    Creates a purchase order based on the data in the given purchase order object.
125
    This method populates a nummber of missing fields
3431 rajveer 126
 
2821 chandransh 127
    Parameters:
128
     - purchaseOrder
129
    """
130
    self.send_createPurchaseOrder(purchaseOrder)
131
    return self.recv_createPurchaseOrder()
132
 
133
  def send_createPurchaseOrder(self, purchaseOrder):
134
    self._oprot.writeMessageBegin('createPurchaseOrder', TMessageType.CALL, self._seqid)
135
    args = createPurchaseOrder_args()
136
    args.purchaseOrder = purchaseOrder
137
    args.write(self._oprot)
138
    self._oprot.writeMessageEnd()
139
    self._oprot.trans.flush()
140
 
141
  def recv_createPurchaseOrder(self, ):
142
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
143
    if mtype == TMessageType.EXCEPTION:
144
      x = TApplicationException()
145
      x.read(self._iprot)
146
      self._iprot.readMessageEnd()
147
      raise x
148
    result = createPurchaseOrder_result()
149
    result.read(self._iprot)
150
    self._iprot.readMessageEnd()
3431 rajveer 151
    if result.success is not None:
2821 chandransh 152
      return result.success
3431 rajveer 153
    if result.wex is not None:
2821 chandransh 154
      raise result.wex
155
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
156
 
157
  def getPurchaseOrder(self, id):
158
    """
159
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
3431 rajveer 160
 
2821 chandransh 161
    Parameters:
162
     - id
163
    """
164
    self.send_getPurchaseOrder(id)
165
    return self.recv_getPurchaseOrder()
166
 
167
  def send_getPurchaseOrder(self, id):
168
    self._oprot.writeMessageBegin('getPurchaseOrder', TMessageType.CALL, self._seqid)
169
    args = getPurchaseOrder_args()
170
    args.id = id
171
    args.write(self._oprot)
172
    self._oprot.writeMessageEnd()
173
    self._oprot.trans.flush()
174
 
175
  def recv_getPurchaseOrder(self, ):
176
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
177
    if mtype == TMessageType.EXCEPTION:
178
      x = TApplicationException()
179
      x.read(self._iprot)
180
      self._iprot.readMessageEnd()
181
      raise x
182
    result = getPurchaseOrder_result()
183
    result.read(self._iprot)
184
    self._iprot.readMessageEnd()
3431 rajveer 185
    if result.success is not None:
2821 chandransh 186
      return result.success
3431 rajveer 187
    if result.wex is not None:
2821 chandransh 188
      raise result.wex
189
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
190
 
3383 chandransh 191
  def getAllPurchaseOrders(self, status):
192
    """
193
    Returns a list of all the purchase orders in the given state
3431 rajveer 194
 
3383 chandransh 195
    Parameters:
196
     - status
197
    """
198
    self.send_getAllPurchaseOrders(status)
199
    return self.recv_getAllPurchaseOrders()
200
 
201
  def send_getAllPurchaseOrders(self, status):
202
    self._oprot.writeMessageBegin('getAllPurchaseOrders', TMessageType.CALL, self._seqid)
203
    args = getAllPurchaseOrders_args()
204
    args.status = status
205
    args.write(self._oprot)
206
    self._oprot.writeMessageEnd()
207
    self._oprot.trans.flush()
208
 
209
  def recv_getAllPurchaseOrders(self, ):
210
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
211
    if mtype == TMessageType.EXCEPTION:
212
      x = TApplicationException()
213
      x.read(self._iprot)
214
      self._iprot.readMessageEnd()
215
      raise x
216
    result = getAllPurchaseOrders_result()
217
    result.read(self._iprot)
218
    self._iprot.readMessageEnd()
3431 rajveer 219
    if result.success is not None:
3383 chandransh 220
      return result.success
3431 rajveer 221
    if result.wex is not None:
3383 chandransh 222
      raise result.wex
223
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
224
 
2832 chandransh 225
  def getSupplier(self, id):
226
    """
227
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
3431 rajveer 228
 
2832 chandransh 229
    Parameters:
230
     - id
231
    """
232
    self.send_getSupplier(id)
233
    return self.recv_getSupplier()
234
 
235
  def send_getSupplier(self, id):
236
    self._oprot.writeMessageBegin('getSupplier', TMessageType.CALL, self._seqid)
237
    args = getSupplier_args()
238
    args.id = id
239
    args.write(self._oprot)
240
    self._oprot.writeMessageEnd()
241
    self._oprot.trans.flush()
242
 
243
  def recv_getSupplier(self, ):
244
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
245
    if mtype == TMessageType.EXCEPTION:
246
      x = TApplicationException()
247
      x.read(self._iprot)
248
      self._iprot.readMessageEnd()
249
      raise x
250
    result = getSupplier_result()
251
    result.read(self._iprot)
252
    self._iprot.readMessageEnd()
3431 rajveer 253
    if result.success is not None:
2832 chandransh 254
      return result.success
3431 rajveer 255
    if result.wex is not None:
2832 chandransh 256
      raise result.wex
257
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
258
 
2821 chandransh 259
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
260
    """
261
    Creates a purchase for the given purchase order.
262
    Throws an exception if no more purchases are allowed against the given purchase order.
3431 rajveer 263
 
2821 chandransh 264
    Parameters:
265
     - purchaseOrderId
266
     - invoiceNumber
267
     - freightCharges
268
    """
269
    self.send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges)
270
    return self.recv_startPurchase()
271
 
272
  def send_startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
273
    self._oprot.writeMessageBegin('startPurchase', TMessageType.CALL, self._seqid)
274
    args = startPurchase_args()
275
    args.purchaseOrderId = purchaseOrderId
276
    args.invoiceNumber = invoiceNumber
277
    args.freightCharges = freightCharges
278
    args.write(self._oprot)
279
    self._oprot.writeMessageEnd()
280
    self._oprot.trans.flush()
281
 
282
  def recv_startPurchase(self, ):
283
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
284
    if mtype == TMessageType.EXCEPTION:
285
      x = TApplicationException()
286
      x.read(self._iprot)
287
      self._iprot.readMessageEnd()
288
      raise x
289
    result = startPurchase_result()
290
    result.read(self._iprot)
291
    self._iprot.readMessageEnd()
3431 rajveer 292
    if result.success is not None:
2821 chandransh 293
      return result.success
3431 rajveer 294
    if result.wex is not None:
2821 chandransh 295
      raise result.wex
296
    raise TApplicationException(TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
297
 
298
  def closePurchase(self, purchaseId):
299
    """
300
    Marks a purchase as complete and updates the receivedOn time.
301
    Throws an exception if no such purchase exists.
3431 rajveer 302
 
2821 chandransh 303
    Parameters:
304
     - purchaseId
305
    """
306
    self.send_closePurchase(purchaseId)
307
    return self.recv_closePurchase()
308
 
309
  def send_closePurchase(self, purchaseId):
310
    self._oprot.writeMessageBegin('closePurchase', TMessageType.CALL, self._seqid)
311
    args = closePurchase_args()
312
    args.purchaseId = purchaseId
313
    args.write(self._oprot)
314
    self._oprot.writeMessageEnd()
315
    self._oprot.trans.flush()
316
 
317
  def recv_closePurchase(self, ):
318
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
319
    if mtype == TMessageType.EXCEPTION:
320
      x = TApplicationException()
321
      x.read(self._iprot)
322
      self._iprot.readMessageEnd()
323
      raise x
324
    result = closePurchase_result()
325
    result.read(self._iprot)
326
    self._iprot.readMessageEnd()
3431 rajveer 327
    if result.success is not None:
2821 chandransh 328
      return result.success
3431 rajveer 329
    if result.wex is not None:
2821 chandransh 330
      raise result.wex
331
    raise TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
332
 
3383 chandransh 333
  def getAllPurchases(self, purchaseOrderId, open):
2821 chandransh 334
    """
3383 chandransh 335
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
3431 rajveer 336
 
3383 chandransh 337
    Parameters:
338
     - purchaseOrderId
339
     - open
340
    """
341
    self.send_getAllPurchases(purchaseOrderId, open)
342
    return self.recv_getAllPurchases()
343
 
344
  def send_getAllPurchases(self, purchaseOrderId, open):
345
    self._oprot.writeMessageBegin('getAllPurchases', TMessageType.CALL, self._seqid)
346
    args = getAllPurchases_args()
347
    args.purchaseOrderId = purchaseOrderId
348
    args.open = open
349
    args.write(self._oprot)
350
    self._oprot.writeMessageEnd()
351
    self._oprot.trans.flush()
352
 
353
  def recv_getAllPurchases(self, ):
354
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
355
    if mtype == TMessageType.EXCEPTION:
356
      x = TApplicationException()
357
      x.read(self._iprot)
358
      self._iprot.readMessageEnd()
359
      raise x
360
    result = getAllPurchases_result()
361
    result.read(self._iprot)
362
    self._iprot.readMessageEnd()
3431 rajveer 363
    if result.success is not None:
3383 chandransh 364
      return result.success
3431 rajveer 365
    if result.wex is not None:
3383 chandransh 366
      raise result.wex
367
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
368
 
369
  def scanIn(self, purchaseId, itemNumber, imeiNumber, type):
370
    """
371
    Creates a Scan object using the given details.
2821 chandransh 372
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
3431 rajveer 373
 
2821 chandransh 374
    Parameters:
375
     - purchaseId
376
     - itemNumber
377
     - imeiNumber
378
     - type
379
    """
3383 chandransh 380
    self.send_scanIn(purchaseId, itemNumber, imeiNumber, type)
2821 chandransh 381
    self.recv_scanIn()
382
 
3383 chandransh 383
  def send_scanIn(self, purchaseId, itemNumber, imeiNumber, type):
2821 chandransh 384
    self._oprot.writeMessageBegin('scanIn', TMessageType.CALL, self._seqid)
385
    args = scanIn_args()
386
    args.purchaseId = purchaseId
387
    args.itemNumber = itemNumber
388
    args.imeiNumber = imeiNumber
389
    args.type = type
390
    args.write(self._oprot)
391
    self._oprot.writeMessageEnd()
392
    self._oprot.trans.flush()
393
 
394
  def recv_scanIn(self, ):
395
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
396
    if mtype == TMessageType.EXCEPTION:
397
      x = TApplicationException()
398
      x.read(self._iprot)
399
      self._iprot.readMessageEnd()
400
      raise x
401
    result = scanIn_result()
402
    result.read(self._iprot)
403
    self._iprot.readMessageEnd()
3431 rajveer 404
    if result.wex is not None:
2821 chandransh 405
      raise result.wex
406
    return
407
 
408
  def scanOut(self, itemNumber, imeiNumber, type):
409
    """
3383 chandransh 410
    Marks the Scan object with the given details as scanned out. In case, the imeiNumber is not given,
2821 chandransh 411
    marks the oldest ItemInventory object as being scanned out.
412
    Raises an exception if:
413
    1. There is no stock present corresponding to the given item details.
414
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
3431 rajveer 415
 
2821 chandransh 416
    Parameters:
417
     - itemNumber
418
     - imeiNumber
419
     - type
420
    """
421
    self.send_scanOut(itemNumber, imeiNumber, type)
422
    self.recv_scanOut()
423
 
424
  def send_scanOut(self, itemNumber, imeiNumber, type):
425
    self._oprot.writeMessageBegin('scanOut', TMessageType.CALL, self._seqid)
426
    args = scanOut_args()
427
    args.itemNumber = itemNumber
428
    args.imeiNumber = imeiNumber
429
    args.type = type
430
    args.write(self._oprot)
431
    self._oprot.writeMessageEnd()
432
    self._oprot.trans.flush()
433
 
434
  def recv_scanOut(self, ):
435
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
436
    if mtype == TMessageType.EXCEPTION:
437
      x = TApplicationException()
438
      x.read(self._iprot)
439
      self._iprot.readMessageEnd()
440
      raise x
441
    result = scanOut_result()
442
    result.read(self._iprot)
443
    self._iprot.readMessageEnd()
3431 rajveer 444
    if result.wex is not None:
2821 chandransh 445
      raise result.wex
446
    return
447
 
448
 
3376 rajveer 449
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2821 chandransh 450
  def __init__(self, handler):
3376 rajveer 451
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2821 chandransh 452
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
453
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
3383 chandransh 454
    self._processMap["getAllPurchaseOrders"] = Processor.process_getAllPurchaseOrders
2832 chandransh 455
    self._processMap["getSupplier"] = Processor.process_getSupplier
2821 chandransh 456
    self._processMap["startPurchase"] = Processor.process_startPurchase
457
    self._processMap["closePurchase"] = Processor.process_closePurchase
3383 chandransh 458
    self._processMap["getAllPurchases"] = Processor.process_getAllPurchases
2821 chandransh 459
    self._processMap["scanIn"] = Processor.process_scanIn
460
    self._processMap["scanOut"] = Processor.process_scanOut
461
 
462
  def process(self, iprot, oprot):
463
    (name, type, seqid) = iprot.readMessageBegin()
464
    if name not in self._processMap:
465
      iprot.skip(TType.STRUCT)
466
      iprot.readMessageEnd()
467
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
468
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
469
      x.write(oprot)
470
      oprot.writeMessageEnd()
471
      oprot.trans.flush()
472
      return
473
    else:
474
      self._processMap[name](self, seqid, iprot, oprot)
475
    return True
476
 
477
  def process_createPurchaseOrder(self, seqid, iprot, oprot):
478
    args = createPurchaseOrder_args()
479
    args.read(iprot)
480
    iprot.readMessageEnd()
481
    result = createPurchaseOrder_result()
482
    try:
483
      result.success = self._handler.createPurchaseOrder(args.purchaseOrder)
484
    except WarehouseServiceException, wex:
485
      result.wex = wex
486
    oprot.writeMessageBegin("createPurchaseOrder", TMessageType.REPLY, seqid)
487
    result.write(oprot)
488
    oprot.writeMessageEnd()
489
    oprot.trans.flush()
490
 
491
  def process_getPurchaseOrder(self, seqid, iprot, oprot):
492
    args = getPurchaseOrder_args()
493
    args.read(iprot)
494
    iprot.readMessageEnd()
495
    result = getPurchaseOrder_result()
496
    try:
497
      result.success = self._handler.getPurchaseOrder(args.id)
498
    except WarehouseServiceException, wex:
499
      result.wex = wex
500
    oprot.writeMessageBegin("getPurchaseOrder", TMessageType.REPLY, seqid)
501
    result.write(oprot)
502
    oprot.writeMessageEnd()
503
    oprot.trans.flush()
504
 
3383 chandransh 505
  def process_getAllPurchaseOrders(self, seqid, iprot, oprot):
506
    args = getAllPurchaseOrders_args()
507
    args.read(iprot)
508
    iprot.readMessageEnd()
509
    result = getAllPurchaseOrders_result()
510
    try:
511
      result.success = self._handler.getAllPurchaseOrders(args.status)
512
    except WarehouseServiceException, wex:
513
      result.wex = wex
514
    oprot.writeMessageBegin("getAllPurchaseOrders", TMessageType.REPLY, seqid)
515
    result.write(oprot)
516
    oprot.writeMessageEnd()
517
    oprot.trans.flush()
518
 
2832 chandransh 519
  def process_getSupplier(self, seqid, iprot, oprot):
520
    args = getSupplier_args()
521
    args.read(iprot)
522
    iprot.readMessageEnd()
523
    result = getSupplier_result()
524
    try:
525
      result.success = self._handler.getSupplier(args.id)
526
    except WarehouseServiceException, wex:
527
      result.wex = wex
528
    oprot.writeMessageBegin("getSupplier", TMessageType.REPLY, seqid)
529
    result.write(oprot)
530
    oprot.writeMessageEnd()
531
    oprot.trans.flush()
532
 
2821 chandransh 533
  def process_startPurchase(self, seqid, iprot, oprot):
534
    args = startPurchase_args()
535
    args.read(iprot)
536
    iprot.readMessageEnd()
537
    result = startPurchase_result()
538
    try:
539
      result.success = self._handler.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges)
540
    except WarehouseServiceException, wex:
541
      result.wex = wex
542
    oprot.writeMessageBegin("startPurchase", TMessageType.REPLY, seqid)
543
    result.write(oprot)
544
    oprot.writeMessageEnd()
545
    oprot.trans.flush()
546
 
547
  def process_closePurchase(self, seqid, iprot, oprot):
548
    args = closePurchase_args()
549
    args.read(iprot)
550
    iprot.readMessageEnd()
551
    result = closePurchase_result()
552
    try:
553
      result.success = self._handler.closePurchase(args.purchaseId)
554
    except WarehouseServiceException, wex:
555
      result.wex = wex
556
    oprot.writeMessageBegin("closePurchase", TMessageType.REPLY, seqid)
557
    result.write(oprot)
558
    oprot.writeMessageEnd()
559
    oprot.trans.flush()
560
 
3383 chandransh 561
  def process_getAllPurchases(self, seqid, iprot, oprot):
562
    args = getAllPurchases_args()
563
    args.read(iprot)
564
    iprot.readMessageEnd()
565
    result = getAllPurchases_result()
566
    try:
567
      result.success = self._handler.getAllPurchases(args.purchaseOrderId, args.open)
568
    except WarehouseServiceException, wex:
569
      result.wex = wex
570
    oprot.writeMessageBegin("getAllPurchases", TMessageType.REPLY, seqid)
571
    result.write(oprot)
572
    oprot.writeMessageEnd()
573
    oprot.trans.flush()
574
 
2821 chandransh 575
  def process_scanIn(self, seqid, iprot, oprot):
576
    args = scanIn_args()
577
    args.read(iprot)
578
    iprot.readMessageEnd()
579
    result = scanIn_result()
580
    try:
3383 chandransh 581
      self._handler.scanIn(args.purchaseId, args.itemNumber, args.imeiNumber, args.type)
2821 chandransh 582
    except WarehouseServiceException, wex:
583
      result.wex = wex
584
    oprot.writeMessageBegin("scanIn", TMessageType.REPLY, seqid)
585
    result.write(oprot)
586
    oprot.writeMessageEnd()
587
    oprot.trans.flush()
588
 
589
  def process_scanOut(self, seqid, iprot, oprot):
590
    args = scanOut_args()
591
    args.read(iprot)
592
    iprot.readMessageEnd()
593
    result = scanOut_result()
594
    try:
595
      self._handler.scanOut(args.itemNumber, args.imeiNumber, args.type)
596
    except WarehouseServiceException, wex:
597
      result.wex = wex
598
    oprot.writeMessageBegin("scanOut", TMessageType.REPLY, seqid)
599
    result.write(oprot)
600
    oprot.writeMessageEnd()
601
    oprot.trans.flush()
602
 
603
 
604
# HELPER FUNCTIONS AND STRUCTURES
605
 
606
class createPurchaseOrder_args:
607
  """
608
  Attributes:
609
   - purchaseOrder
610
  """
611
 
612
  thrift_spec = (
613
    None, # 0
614
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
615
  )
616
 
617
  def __init__(self, purchaseOrder=None,):
618
    self.purchaseOrder = purchaseOrder
619
 
620
  def read(self, iprot):
621
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
622
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
623
      return
624
    iprot.readStructBegin()
625
    while True:
626
      (fname, ftype, fid) = iprot.readFieldBegin()
627
      if ftype == TType.STOP:
628
        break
629
      if fid == 1:
630
        if ftype == TType.STRUCT:
631
          self.purchaseOrder = PurchaseOrder()
632
          self.purchaseOrder.read(iprot)
633
        else:
634
          iprot.skip(ftype)
635
      else:
636
        iprot.skip(ftype)
637
      iprot.readFieldEnd()
638
    iprot.readStructEnd()
639
 
640
  def write(self, oprot):
641
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
642
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
643
      return
644
    oprot.writeStructBegin('createPurchaseOrder_args')
3431 rajveer 645
    if self.purchaseOrder is not None:
2821 chandransh 646
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
647
      self.purchaseOrder.write(oprot)
648
      oprot.writeFieldEnd()
649
    oprot.writeFieldStop()
650
    oprot.writeStructEnd()
651
 
3431 rajveer 652
  def validate(self):
653
    return
654
 
655
 
2821 chandransh 656
  def __repr__(self):
657
    L = ['%s=%r' % (key, value)
658
      for key, value in self.__dict__.iteritems()]
659
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
660
 
661
  def __eq__(self, other):
662
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
663
 
664
  def __ne__(self, other):
665
    return not (self == other)
666
 
667
class createPurchaseOrder_result:
668
  """
669
  Attributes:
670
   - success
671
   - wex
672
  """
673
 
674
  thrift_spec = (
675
    (0, TType.I64, 'success', None, None, ), # 0
676
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
677
  )
678
 
679
  def __init__(self, success=None, wex=None,):
680
    self.success = success
681
    self.wex = wex
682
 
683
  def read(self, iprot):
684
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
685
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
686
      return
687
    iprot.readStructBegin()
688
    while True:
689
      (fname, ftype, fid) = iprot.readFieldBegin()
690
      if ftype == TType.STOP:
691
        break
692
      if fid == 0:
693
        if ftype == TType.I64:
694
          self.success = iprot.readI64();
695
        else:
696
          iprot.skip(ftype)
697
      elif fid == 1:
698
        if ftype == TType.STRUCT:
699
          self.wex = WarehouseServiceException()
700
          self.wex.read(iprot)
701
        else:
702
          iprot.skip(ftype)
703
      else:
704
        iprot.skip(ftype)
705
      iprot.readFieldEnd()
706
    iprot.readStructEnd()
707
 
708
  def write(self, oprot):
709
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
710
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
711
      return
712
    oprot.writeStructBegin('createPurchaseOrder_result')
3431 rajveer 713
    if self.success is not None:
2821 chandransh 714
      oprot.writeFieldBegin('success', TType.I64, 0)
715
      oprot.writeI64(self.success)
716
      oprot.writeFieldEnd()
3431 rajveer 717
    if self.wex is not None:
2821 chandransh 718
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
719
      self.wex.write(oprot)
720
      oprot.writeFieldEnd()
721
    oprot.writeFieldStop()
722
    oprot.writeStructEnd()
723
 
3431 rajveer 724
  def validate(self):
725
    return
726
 
727
 
2821 chandransh 728
  def __repr__(self):
729
    L = ['%s=%r' % (key, value)
730
      for key, value in self.__dict__.iteritems()]
731
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
732
 
733
  def __eq__(self, other):
734
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
735
 
736
  def __ne__(self, other):
737
    return not (self == other)
738
 
739
class getPurchaseOrder_args:
740
  """
741
  Attributes:
742
   - id
743
  """
744
 
745
  thrift_spec = (
746
    None, # 0
747
    (1, TType.I64, 'id', None, None, ), # 1
748
  )
749
 
750
  def __init__(self, id=None,):
751
    self.id = id
752
 
753
  def read(self, iprot):
754
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
755
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
756
      return
757
    iprot.readStructBegin()
758
    while True:
759
      (fname, ftype, fid) = iprot.readFieldBegin()
760
      if ftype == TType.STOP:
761
        break
762
      if fid == 1:
763
        if ftype == TType.I64:
764
          self.id = iprot.readI64();
765
        else:
766
          iprot.skip(ftype)
767
      else:
768
        iprot.skip(ftype)
769
      iprot.readFieldEnd()
770
    iprot.readStructEnd()
771
 
772
  def write(self, oprot):
773
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
774
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
775
      return
776
    oprot.writeStructBegin('getPurchaseOrder_args')
3431 rajveer 777
    if self.id is not None:
2821 chandransh 778
      oprot.writeFieldBegin('id', TType.I64, 1)
779
      oprot.writeI64(self.id)
780
      oprot.writeFieldEnd()
781
    oprot.writeFieldStop()
782
    oprot.writeStructEnd()
783
 
3431 rajveer 784
  def validate(self):
785
    return
786
 
787
 
2821 chandransh 788
  def __repr__(self):
789
    L = ['%s=%r' % (key, value)
790
      for key, value in self.__dict__.iteritems()]
791
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
792
 
793
  def __eq__(self, other):
794
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
795
 
796
  def __ne__(self, other):
797
    return not (self == other)
798
 
799
class getPurchaseOrder_result:
800
  """
801
  Attributes:
802
   - success
803
   - wex
804
  """
805
 
806
  thrift_spec = (
807
    (0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
808
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
809
  )
810
 
811
  def __init__(self, success=None, wex=None,):
812
    self.success = success
813
    self.wex = wex
814
 
815
  def read(self, iprot):
816
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
817
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
818
      return
819
    iprot.readStructBegin()
820
    while True:
821
      (fname, ftype, fid) = iprot.readFieldBegin()
822
      if ftype == TType.STOP:
823
        break
824
      if fid == 0:
825
        if ftype == TType.STRUCT:
826
          self.success = PurchaseOrder()
827
          self.success.read(iprot)
828
        else:
829
          iprot.skip(ftype)
830
      elif fid == 1:
831
        if ftype == TType.STRUCT:
832
          self.wex = WarehouseServiceException()
833
          self.wex.read(iprot)
834
        else:
835
          iprot.skip(ftype)
836
      else:
837
        iprot.skip(ftype)
838
      iprot.readFieldEnd()
839
    iprot.readStructEnd()
840
 
841
  def write(self, oprot):
842
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
843
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
844
      return
845
    oprot.writeStructBegin('getPurchaseOrder_result')
3431 rajveer 846
    if self.success is not None:
2821 chandransh 847
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
848
      self.success.write(oprot)
849
      oprot.writeFieldEnd()
3431 rajveer 850
    if self.wex is not None:
2821 chandransh 851
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
852
      self.wex.write(oprot)
853
      oprot.writeFieldEnd()
854
    oprot.writeFieldStop()
855
    oprot.writeStructEnd()
856
 
3431 rajveer 857
  def validate(self):
858
    return
859
 
860
 
2821 chandransh 861
  def __repr__(self):
862
    L = ['%s=%r' % (key, value)
863
      for key, value in self.__dict__.iteritems()]
864
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
865
 
866
  def __eq__(self, other):
867
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
868
 
869
  def __ne__(self, other):
870
    return not (self == other)
871
 
3383 chandransh 872
class getAllPurchaseOrders_args:
873
  """
874
  Attributes:
875
   - status
876
  """
877
 
878
  thrift_spec = (
879
    None, # 0
880
    (1, TType.I32, 'status', None, None, ), # 1
881
  )
882
 
883
  def __init__(self, status=None,):
884
    self.status = status
885
 
886
  def read(self, iprot):
887
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
888
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
889
      return
890
    iprot.readStructBegin()
891
    while True:
892
      (fname, ftype, fid) = iprot.readFieldBegin()
893
      if ftype == TType.STOP:
894
        break
895
      if fid == 1:
896
        if ftype == TType.I32:
897
          self.status = iprot.readI32();
898
        else:
899
          iprot.skip(ftype)
900
      else:
901
        iprot.skip(ftype)
902
      iprot.readFieldEnd()
903
    iprot.readStructEnd()
904
 
905
  def write(self, oprot):
906
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
907
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
908
      return
909
    oprot.writeStructBegin('getAllPurchaseOrders_args')
3431 rajveer 910
    if self.status is not None:
3383 chandransh 911
      oprot.writeFieldBegin('status', TType.I32, 1)
912
      oprot.writeI32(self.status)
913
      oprot.writeFieldEnd()
914
    oprot.writeFieldStop()
915
    oprot.writeStructEnd()
916
 
3431 rajveer 917
  def validate(self):
918
    return
919
 
920
 
3383 chandransh 921
  def __repr__(self):
922
    L = ['%s=%r' % (key, value)
923
      for key, value in self.__dict__.iteritems()]
924
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
925
 
926
  def __eq__(self, other):
927
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
928
 
929
  def __ne__(self, other):
930
    return not (self == other)
931
 
932
class getAllPurchaseOrders_result:
933
  """
934
  Attributes:
935
   - success
936
   - wex
937
  """
938
 
939
  thrift_spec = (
940
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
941
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
942
  )
943
 
944
  def __init__(self, success=None, wex=None,):
945
    self.success = success
946
    self.wex = wex
947
 
948
  def read(self, iprot):
949
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
950
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
951
      return
952
    iprot.readStructBegin()
953
    while True:
954
      (fname, ftype, fid) = iprot.readFieldBegin()
955
      if ftype == TType.STOP:
956
        break
957
      if fid == 0:
958
        if ftype == TType.LIST:
959
          self.success = []
960
          (_etype10, _size7) = iprot.readListBegin()
961
          for _i11 in xrange(_size7):
962
            _elem12 = PurchaseOrder()
963
            _elem12.read(iprot)
964
            self.success.append(_elem12)
965
          iprot.readListEnd()
966
        else:
967
          iprot.skip(ftype)
968
      elif fid == 1:
969
        if ftype == TType.STRUCT:
970
          self.wex = WarehouseServiceException()
971
          self.wex.read(iprot)
972
        else:
973
          iprot.skip(ftype)
974
      else:
975
        iprot.skip(ftype)
976
      iprot.readFieldEnd()
977
    iprot.readStructEnd()
978
 
979
  def write(self, oprot):
980
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
981
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
982
      return
983
    oprot.writeStructBegin('getAllPurchaseOrders_result')
3431 rajveer 984
    if self.success is not None:
3383 chandransh 985
      oprot.writeFieldBegin('success', TType.LIST, 0)
986
      oprot.writeListBegin(TType.STRUCT, len(self.success))
987
      for iter13 in self.success:
988
        iter13.write(oprot)
989
      oprot.writeListEnd()
990
      oprot.writeFieldEnd()
3431 rajveer 991
    if self.wex is not None:
3383 chandransh 992
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
993
      self.wex.write(oprot)
994
      oprot.writeFieldEnd()
995
    oprot.writeFieldStop()
996
    oprot.writeStructEnd()
997
 
3431 rajveer 998
  def validate(self):
999
    return
1000
 
1001
 
3383 chandransh 1002
  def __repr__(self):
1003
    L = ['%s=%r' % (key, value)
1004
      for key, value in self.__dict__.iteritems()]
1005
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1006
 
1007
  def __eq__(self, other):
1008
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1009
 
1010
  def __ne__(self, other):
1011
    return not (self == other)
1012
 
2832 chandransh 1013
class getSupplier_args:
1014
  """
1015
  Attributes:
1016
   - id
1017
  """
1018
 
1019
  thrift_spec = (
1020
    None, # 0
1021
    (1, TType.I64, 'id', None, None, ), # 1
1022
  )
1023
 
1024
  def __init__(self, id=None,):
1025
    self.id = id
1026
 
1027
  def read(self, iprot):
1028
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1029
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1030
      return
1031
    iprot.readStructBegin()
1032
    while True:
1033
      (fname, ftype, fid) = iprot.readFieldBegin()
1034
      if ftype == TType.STOP:
1035
        break
1036
      if fid == 1:
1037
        if ftype == TType.I64:
1038
          self.id = iprot.readI64();
1039
        else:
1040
          iprot.skip(ftype)
1041
      else:
1042
        iprot.skip(ftype)
1043
      iprot.readFieldEnd()
1044
    iprot.readStructEnd()
1045
 
1046
  def write(self, oprot):
1047
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1048
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1049
      return
1050
    oprot.writeStructBegin('getSupplier_args')
3431 rajveer 1051
    if self.id is not None:
2832 chandransh 1052
      oprot.writeFieldBegin('id', TType.I64, 1)
1053
      oprot.writeI64(self.id)
1054
      oprot.writeFieldEnd()
1055
    oprot.writeFieldStop()
1056
    oprot.writeStructEnd()
1057
 
3431 rajveer 1058
  def validate(self):
1059
    return
1060
 
1061
 
2832 chandransh 1062
  def __repr__(self):
1063
    L = ['%s=%r' % (key, value)
1064
      for key, value in self.__dict__.iteritems()]
1065
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1066
 
1067
  def __eq__(self, other):
1068
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1069
 
1070
  def __ne__(self, other):
1071
    return not (self == other)
1072
 
1073
class getSupplier_result:
1074
  """
1075
  Attributes:
1076
   - success
1077
   - wex
1078
  """
1079
 
1080
  thrift_spec = (
1081
    (0, TType.STRUCT, 'success', (Supplier, Supplier.thrift_spec), None, ), # 0
1082
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1083
  )
1084
 
1085
  def __init__(self, success=None, wex=None,):
1086
    self.success = success
1087
    self.wex = wex
1088
 
1089
  def read(self, iprot):
1090
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1091
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1092
      return
1093
    iprot.readStructBegin()
1094
    while True:
1095
      (fname, ftype, fid) = iprot.readFieldBegin()
1096
      if ftype == TType.STOP:
1097
        break
1098
      if fid == 0:
1099
        if ftype == TType.STRUCT:
1100
          self.success = Supplier()
1101
          self.success.read(iprot)
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('getSupplier_result')
3431 rajveer 1120
    if self.success is not None:
2832 chandransh 1121
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1122
      self.success.write(oprot)
1123
      oprot.writeFieldEnd()
3431 rajveer 1124
    if self.wex is not None:
2832 chandransh 1125
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1126
      self.wex.write(oprot)
1127
      oprot.writeFieldEnd()
1128
    oprot.writeFieldStop()
1129
    oprot.writeStructEnd()
1130
 
3431 rajveer 1131
  def validate(self):
1132
    return
1133
 
1134
 
2832 chandransh 1135
  def __repr__(self):
1136
    L = ['%s=%r' % (key, value)
1137
      for key, value in self.__dict__.iteritems()]
1138
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1139
 
1140
  def __eq__(self, other):
1141
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1142
 
1143
  def __ne__(self, other):
1144
    return not (self == other)
1145
 
2821 chandransh 1146
class startPurchase_args:
1147
  """
1148
  Attributes:
1149
   - purchaseOrderId
1150
   - invoiceNumber
1151
   - freightCharges
1152
  """
1153
 
1154
  thrift_spec = (
1155
    None, # 0
1156
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
1157
    (2, TType.STRING, 'invoiceNumber', None, None, ), # 2
1158
    (3, TType.DOUBLE, 'freightCharges', None, None, ), # 3
1159
  )
1160
 
1161
  def __init__(self, purchaseOrderId=None, invoiceNumber=None, freightCharges=None,):
1162
    self.purchaseOrderId = purchaseOrderId
1163
    self.invoiceNumber = invoiceNumber
1164
    self.freightCharges = freightCharges
1165
 
1166
  def read(self, iprot):
1167
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1168
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1169
      return
1170
    iprot.readStructBegin()
1171
    while True:
1172
      (fname, ftype, fid) = iprot.readFieldBegin()
1173
      if ftype == TType.STOP:
1174
        break
1175
      if fid == 1:
1176
        if ftype == TType.I64:
1177
          self.purchaseOrderId = iprot.readI64();
1178
        else:
1179
          iprot.skip(ftype)
1180
      elif fid == 2:
1181
        if ftype == TType.STRING:
1182
          self.invoiceNumber = iprot.readString();
1183
        else:
1184
          iprot.skip(ftype)
1185
      elif fid == 3:
1186
        if ftype == TType.DOUBLE:
1187
          self.freightCharges = iprot.readDouble();
1188
        else:
1189
          iprot.skip(ftype)
1190
      else:
1191
        iprot.skip(ftype)
1192
      iprot.readFieldEnd()
1193
    iprot.readStructEnd()
1194
 
1195
  def write(self, oprot):
1196
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1197
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1198
      return
1199
    oprot.writeStructBegin('startPurchase_args')
3431 rajveer 1200
    if self.purchaseOrderId is not None:
2821 chandransh 1201
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
1202
      oprot.writeI64(self.purchaseOrderId)
1203
      oprot.writeFieldEnd()
3431 rajveer 1204
    if self.invoiceNumber is not None:
2821 chandransh 1205
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 2)
1206
      oprot.writeString(self.invoiceNumber)
1207
      oprot.writeFieldEnd()
3431 rajveer 1208
    if self.freightCharges is not None:
2821 chandransh 1209
      oprot.writeFieldBegin('freightCharges', TType.DOUBLE, 3)
1210
      oprot.writeDouble(self.freightCharges)
1211
      oprot.writeFieldEnd()
1212
    oprot.writeFieldStop()
1213
    oprot.writeStructEnd()
1214
 
3431 rajveer 1215
  def validate(self):
1216
    return
1217
 
1218
 
2821 chandransh 1219
  def __repr__(self):
1220
    L = ['%s=%r' % (key, value)
1221
      for key, value in self.__dict__.iteritems()]
1222
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1223
 
1224
  def __eq__(self, other):
1225
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1226
 
1227
  def __ne__(self, other):
1228
    return not (self == other)
1229
 
1230
class startPurchase_result:
1231
  """
1232
  Attributes:
1233
   - success
1234
   - wex
1235
  """
1236
 
1237
  thrift_spec = (
1238
    (0, TType.I64, 'success', None, None, ), # 0
1239
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1240
  )
1241
 
1242
  def __init__(self, success=None, wex=None,):
1243
    self.success = success
1244
    self.wex = wex
1245
 
1246
  def read(self, iprot):
1247
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1248
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1249
      return
1250
    iprot.readStructBegin()
1251
    while True:
1252
      (fname, ftype, fid) = iprot.readFieldBegin()
1253
      if ftype == TType.STOP:
1254
        break
1255
      if fid == 0:
1256
        if ftype == TType.I64:
1257
          self.success = iprot.readI64();
1258
        else:
1259
          iprot.skip(ftype)
1260
      elif fid == 1:
1261
        if ftype == TType.STRUCT:
1262
          self.wex = WarehouseServiceException()
1263
          self.wex.read(iprot)
1264
        else:
1265
          iprot.skip(ftype)
1266
      else:
1267
        iprot.skip(ftype)
1268
      iprot.readFieldEnd()
1269
    iprot.readStructEnd()
1270
 
1271
  def write(self, oprot):
1272
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1273
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1274
      return
1275
    oprot.writeStructBegin('startPurchase_result')
3431 rajveer 1276
    if self.success is not None:
2821 chandransh 1277
      oprot.writeFieldBegin('success', TType.I64, 0)
1278
      oprot.writeI64(self.success)
1279
      oprot.writeFieldEnd()
3431 rajveer 1280
    if self.wex is not None:
2821 chandransh 1281
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1282
      self.wex.write(oprot)
1283
      oprot.writeFieldEnd()
1284
    oprot.writeFieldStop()
1285
    oprot.writeStructEnd()
1286
 
3431 rajveer 1287
  def validate(self):
1288
    return
1289
 
1290
 
2821 chandransh 1291
  def __repr__(self):
1292
    L = ['%s=%r' % (key, value)
1293
      for key, value in self.__dict__.iteritems()]
1294
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1295
 
1296
  def __eq__(self, other):
1297
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1298
 
1299
  def __ne__(self, other):
1300
    return not (self == other)
1301
 
1302
class closePurchase_args:
1303
  """
1304
  Attributes:
1305
   - purchaseId
1306
  """
1307
 
1308
  thrift_spec = (
1309
    None, # 0
1310
    (1, TType.I64, 'purchaseId', None, None, ), # 1
1311
  )
1312
 
1313
  def __init__(self, purchaseId=None,):
1314
    self.purchaseId = purchaseId
1315
 
1316
  def read(self, iprot):
1317
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1318
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1319
      return
1320
    iprot.readStructBegin()
1321
    while True:
1322
      (fname, ftype, fid) = iprot.readFieldBegin()
1323
      if ftype == TType.STOP:
1324
        break
1325
      if fid == 1:
1326
        if ftype == TType.I64:
1327
          self.purchaseId = iprot.readI64();
1328
        else:
1329
          iprot.skip(ftype)
1330
      else:
1331
        iprot.skip(ftype)
1332
      iprot.readFieldEnd()
1333
    iprot.readStructEnd()
1334
 
1335
  def write(self, oprot):
1336
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1337
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1338
      return
1339
    oprot.writeStructBegin('closePurchase_args')
3431 rajveer 1340
    if self.purchaseId is not None:
2821 chandransh 1341
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
1342
      oprot.writeI64(self.purchaseId)
1343
      oprot.writeFieldEnd()
1344
    oprot.writeFieldStop()
1345
    oprot.writeStructEnd()
1346
 
3431 rajveer 1347
  def validate(self):
1348
    return
1349
 
1350
 
2821 chandransh 1351
  def __repr__(self):
1352
    L = ['%s=%r' % (key, value)
1353
      for key, value in self.__dict__.iteritems()]
1354
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1355
 
1356
  def __eq__(self, other):
1357
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1358
 
1359
  def __ne__(self, other):
1360
    return not (self == other)
1361
 
1362
class closePurchase_result:
1363
  """
1364
  Attributes:
1365
   - success
1366
   - wex
1367
  """
1368
 
1369
  thrift_spec = (
1370
    (0, TType.I64, 'success', None, None, ), # 0
1371
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1372
  )
1373
 
1374
  def __init__(self, success=None, wex=None,):
1375
    self.success = success
1376
    self.wex = wex
1377
 
1378
  def read(self, iprot):
1379
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1380
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1381
      return
1382
    iprot.readStructBegin()
1383
    while True:
1384
      (fname, ftype, fid) = iprot.readFieldBegin()
1385
      if ftype == TType.STOP:
1386
        break
1387
      if fid == 0:
1388
        if ftype == TType.I64:
1389
          self.success = iprot.readI64();
1390
        else:
1391
          iprot.skip(ftype)
1392
      elif fid == 1:
1393
        if ftype == TType.STRUCT:
1394
          self.wex = WarehouseServiceException()
1395
          self.wex.read(iprot)
1396
        else:
1397
          iprot.skip(ftype)
1398
      else:
1399
        iprot.skip(ftype)
1400
      iprot.readFieldEnd()
1401
    iprot.readStructEnd()
1402
 
1403
  def write(self, oprot):
1404
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1405
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1406
      return
1407
    oprot.writeStructBegin('closePurchase_result')
3431 rajveer 1408
    if self.success is not None:
2821 chandransh 1409
      oprot.writeFieldBegin('success', TType.I64, 0)
1410
      oprot.writeI64(self.success)
1411
      oprot.writeFieldEnd()
3431 rajveer 1412
    if self.wex is not None:
2821 chandransh 1413
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1414
      self.wex.write(oprot)
1415
      oprot.writeFieldEnd()
1416
    oprot.writeFieldStop()
1417
    oprot.writeStructEnd()
1418
 
3431 rajveer 1419
  def validate(self):
1420
    return
1421
 
1422
 
2821 chandransh 1423
  def __repr__(self):
1424
    L = ['%s=%r' % (key, value)
1425
      for key, value in self.__dict__.iteritems()]
1426
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1427
 
1428
  def __eq__(self, other):
1429
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1430
 
1431
  def __ne__(self, other):
1432
    return not (self == other)
1433
 
3383 chandransh 1434
class getAllPurchases_args:
1435
  """
1436
  Attributes:
1437
   - purchaseOrderId
1438
   - open
1439
  """
1440
 
1441
  thrift_spec = (
1442
    None, # 0
1443
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
1444
    (2, TType.BOOL, 'open', None, None, ), # 2
1445
  )
1446
 
1447
  def __init__(self, purchaseOrderId=None, open=None,):
1448
    self.purchaseOrderId = purchaseOrderId
1449
    self.open = open
1450
 
1451
  def read(self, iprot):
1452
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1453
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1454
      return
1455
    iprot.readStructBegin()
1456
    while True:
1457
      (fname, ftype, fid) = iprot.readFieldBegin()
1458
      if ftype == TType.STOP:
1459
        break
1460
      if fid == 1:
1461
        if ftype == TType.I64:
1462
          self.purchaseOrderId = iprot.readI64();
1463
        else:
1464
          iprot.skip(ftype)
1465
      elif fid == 2:
1466
        if ftype == TType.BOOL:
1467
          self.open = iprot.readBool();
1468
        else:
1469
          iprot.skip(ftype)
1470
      else:
1471
        iprot.skip(ftype)
1472
      iprot.readFieldEnd()
1473
    iprot.readStructEnd()
1474
 
1475
  def write(self, oprot):
1476
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1477
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1478
      return
1479
    oprot.writeStructBegin('getAllPurchases_args')
3431 rajveer 1480
    if self.purchaseOrderId is not None:
3383 chandransh 1481
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
1482
      oprot.writeI64(self.purchaseOrderId)
1483
      oprot.writeFieldEnd()
3431 rajveer 1484
    if self.open is not None:
3383 chandransh 1485
      oprot.writeFieldBegin('open', TType.BOOL, 2)
1486
      oprot.writeBool(self.open)
1487
      oprot.writeFieldEnd()
1488
    oprot.writeFieldStop()
1489
    oprot.writeStructEnd()
1490
 
3431 rajveer 1491
  def validate(self):
1492
    return
1493
 
1494
 
3383 chandransh 1495
  def __repr__(self):
1496
    L = ['%s=%r' % (key, value)
1497
      for key, value in self.__dict__.iteritems()]
1498
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1499
 
1500
  def __eq__(self, other):
1501
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1502
 
1503
  def __ne__(self, other):
1504
    return not (self == other)
1505
 
1506
class getAllPurchases_result:
1507
  """
1508
  Attributes:
1509
   - success
1510
   - wex
1511
  """
1512
 
1513
  thrift_spec = (
1514
    (0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
1515
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1516
  )
1517
 
1518
  def __init__(self, success=None, wex=None,):
1519
    self.success = success
1520
    self.wex = wex
1521
 
1522
  def read(self, iprot):
1523
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1524
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1525
      return
1526
    iprot.readStructBegin()
1527
    while True:
1528
      (fname, ftype, fid) = iprot.readFieldBegin()
1529
      if ftype == TType.STOP:
1530
        break
1531
      if fid == 0:
1532
        if ftype == TType.LIST:
1533
          self.success = []
1534
          (_etype17, _size14) = iprot.readListBegin()
1535
          for _i18 in xrange(_size14):
1536
            _elem19 = Purchase()
1537
            _elem19.read(iprot)
1538
            self.success.append(_elem19)
1539
          iprot.readListEnd()
1540
        else:
1541
          iprot.skip(ftype)
1542
      elif fid == 1:
1543
        if ftype == TType.STRUCT:
1544
          self.wex = WarehouseServiceException()
1545
          self.wex.read(iprot)
1546
        else:
1547
          iprot.skip(ftype)
1548
      else:
1549
        iprot.skip(ftype)
1550
      iprot.readFieldEnd()
1551
    iprot.readStructEnd()
1552
 
1553
  def write(self, oprot):
1554
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1555
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1556
      return
1557
    oprot.writeStructBegin('getAllPurchases_result')
3431 rajveer 1558
    if self.success is not None:
3383 chandransh 1559
      oprot.writeFieldBegin('success', TType.LIST, 0)
1560
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1561
      for iter20 in self.success:
1562
        iter20.write(oprot)
1563
      oprot.writeListEnd()
1564
      oprot.writeFieldEnd()
3431 rajveer 1565
    if self.wex is not None:
3383 chandransh 1566
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1567
      self.wex.write(oprot)
1568
      oprot.writeFieldEnd()
1569
    oprot.writeFieldStop()
1570
    oprot.writeStructEnd()
1571
 
3431 rajveer 1572
  def validate(self):
1573
    return
1574
 
1575
 
3383 chandransh 1576
  def __repr__(self):
1577
    L = ['%s=%r' % (key, value)
1578
      for key, value in self.__dict__.iteritems()]
1579
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1580
 
1581
  def __eq__(self, other):
1582
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1583
 
1584
  def __ne__(self, other):
1585
    return not (self == other)
1586
 
2821 chandransh 1587
class scanIn_args:
1588
  """
1589
  Attributes:
1590
   - purchaseId
1591
   - itemNumber
1592
   - imeiNumber
1593
   - type
1594
  """
1595
 
1596
  thrift_spec = (
1597
    None, # 0
1598
    (1, TType.I64, 'purchaseId', None, None, ), # 1
3383 chandransh 1599
    (2, TType.STRING, 'itemNumber', None, None, ), # 2
1600
    (3, TType.STRING, 'imeiNumber', None, None, ), # 3
1601
    (4, TType.I32, 'type', None, None, ), # 4
2821 chandransh 1602
  )
1603
 
3383 chandransh 1604
  def __init__(self, purchaseId=None, itemNumber=None, imeiNumber=None, type=None,):
2821 chandransh 1605
    self.purchaseId = purchaseId
1606
    self.itemNumber = itemNumber
1607
    self.imeiNumber = imeiNumber
1608
    self.type = type
1609
 
1610
  def read(self, iprot):
1611
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1612
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1613
      return
1614
    iprot.readStructBegin()
1615
    while True:
1616
      (fname, ftype, fid) = iprot.readFieldBegin()
1617
      if ftype == TType.STOP:
1618
        break
1619
      if fid == 1:
1620
        if ftype == TType.I64:
1621
          self.purchaseId = iprot.readI64();
1622
        else:
1623
          iprot.skip(ftype)
1624
      elif fid == 2:
1625
        if ftype == TType.STRING:
1626
          self.itemNumber = iprot.readString();
1627
        else:
1628
          iprot.skip(ftype)
3383 chandransh 1629
      elif fid == 3:
2821 chandransh 1630
        if ftype == TType.STRING:
1631
          self.imeiNumber = iprot.readString();
1632
        else:
1633
          iprot.skip(ftype)
3383 chandransh 1634
      elif fid == 4:
2821 chandransh 1635
        if ftype == TType.I32:
1636
          self.type = iprot.readI32();
1637
        else:
1638
          iprot.skip(ftype)
1639
      else:
1640
        iprot.skip(ftype)
1641
      iprot.readFieldEnd()
1642
    iprot.readStructEnd()
1643
 
1644
  def write(self, oprot):
1645
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1646
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1647
      return
1648
    oprot.writeStructBegin('scanIn_args')
3431 rajveer 1649
    if self.purchaseId is not None:
2821 chandransh 1650
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
1651
      oprot.writeI64(self.purchaseId)
1652
      oprot.writeFieldEnd()
3431 rajveer 1653
    if self.itemNumber is not None:
3383 chandransh 1654
      oprot.writeFieldBegin('itemNumber', TType.STRING, 2)
2821 chandransh 1655
      oprot.writeString(self.itemNumber)
1656
      oprot.writeFieldEnd()
3431 rajveer 1657
    if self.imeiNumber is not None:
3383 chandransh 1658
      oprot.writeFieldBegin('imeiNumber', TType.STRING, 3)
2821 chandransh 1659
      oprot.writeString(self.imeiNumber)
1660
      oprot.writeFieldEnd()
3431 rajveer 1661
    if self.type is not None:
3383 chandransh 1662
      oprot.writeFieldBegin('type', TType.I32, 4)
2821 chandransh 1663
      oprot.writeI32(self.type)
1664
      oprot.writeFieldEnd()
1665
    oprot.writeFieldStop()
1666
    oprot.writeStructEnd()
1667
 
3431 rajveer 1668
  def validate(self):
1669
    return
1670
 
1671
 
2821 chandransh 1672
  def __repr__(self):
1673
    L = ['%s=%r' % (key, value)
1674
      for key, value in self.__dict__.iteritems()]
1675
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1676
 
1677
  def __eq__(self, other):
1678
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1679
 
1680
  def __ne__(self, other):
1681
    return not (self == other)
1682
 
1683
class scanIn_result:
1684
  """
1685
  Attributes:
1686
   - wex
1687
  """
1688
 
1689
  thrift_spec = (
1690
    None, # 0
1691
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1692
  )
1693
 
1694
  def __init__(self, wex=None,):
1695
    self.wex = wex
1696
 
1697
  def read(self, iprot):
1698
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1699
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1700
      return
1701
    iprot.readStructBegin()
1702
    while True:
1703
      (fname, ftype, fid) = iprot.readFieldBegin()
1704
      if ftype == TType.STOP:
1705
        break
1706
      if fid == 1:
1707
        if ftype == TType.STRUCT:
1708
          self.wex = WarehouseServiceException()
1709
          self.wex.read(iprot)
1710
        else:
1711
          iprot.skip(ftype)
1712
      else:
1713
        iprot.skip(ftype)
1714
      iprot.readFieldEnd()
1715
    iprot.readStructEnd()
1716
 
1717
  def write(self, oprot):
1718
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1719
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1720
      return
1721
    oprot.writeStructBegin('scanIn_result')
3431 rajveer 1722
    if self.wex is not None:
2821 chandransh 1723
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1724
      self.wex.write(oprot)
1725
      oprot.writeFieldEnd()
1726
    oprot.writeFieldStop()
1727
    oprot.writeStructEnd()
1728
 
3431 rajveer 1729
  def validate(self):
1730
    return
1731
 
1732
 
2821 chandransh 1733
  def __repr__(self):
1734
    L = ['%s=%r' % (key, value)
1735
      for key, value in self.__dict__.iteritems()]
1736
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1737
 
1738
  def __eq__(self, other):
1739
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1740
 
1741
  def __ne__(self, other):
1742
    return not (self == other)
1743
 
1744
class scanOut_args:
1745
  """
1746
  Attributes:
1747
   - itemNumber
1748
   - imeiNumber
1749
   - type
1750
  """
1751
 
1752
  thrift_spec = (
1753
    None, # 0
3424 chandransh 1754
    (1, TType.STRING, 'itemNumber', None, None, ), # 1
1755
    (2, TType.STRING, 'imeiNumber', None, None, ), # 2
2821 chandransh 1756
    (3, TType.I32, 'type', None, None, ), # 3
1757
  )
1758
 
1759
  def __init__(self, itemNumber=None, imeiNumber=None, type=None,):
1760
    self.itemNumber = itemNumber
1761
    self.imeiNumber = imeiNumber
1762
    self.type = type
1763
 
1764
  def read(self, iprot):
1765
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1766
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1767
      return
1768
    iprot.readStructBegin()
1769
    while True:
1770
      (fname, ftype, fid) = iprot.readFieldBegin()
1771
      if ftype == TType.STOP:
1772
        break
1773
      if fid == 1:
3424 chandransh 1774
        if ftype == TType.STRING:
1775
          self.itemNumber = iprot.readString();
2821 chandransh 1776
        else:
1777
          iprot.skip(ftype)
1778
      elif fid == 2:
3424 chandransh 1779
        if ftype == TType.STRING:
1780
          self.imeiNumber = iprot.readString();
2821 chandransh 1781
        else:
1782
          iprot.skip(ftype)
1783
      elif fid == 3:
1784
        if ftype == TType.I32:
1785
          self.type = iprot.readI32();
1786
        else:
1787
          iprot.skip(ftype)
1788
      else:
1789
        iprot.skip(ftype)
1790
      iprot.readFieldEnd()
1791
    iprot.readStructEnd()
1792
 
1793
  def write(self, oprot):
1794
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1795
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1796
      return
1797
    oprot.writeStructBegin('scanOut_args')
3431 rajveer 1798
    if self.itemNumber is not None:
3424 chandransh 1799
      oprot.writeFieldBegin('itemNumber', TType.STRING, 1)
1800
      oprot.writeString(self.itemNumber)
2821 chandransh 1801
      oprot.writeFieldEnd()
3431 rajveer 1802
    if self.imeiNumber is not None:
3424 chandransh 1803
      oprot.writeFieldBegin('imeiNumber', TType.STRING, 2)
1804
      oprot.writeString(self.imeiNumber)
2821 chandransh 1805
      oprot.writeFieldEnd()
3431 rajveer 1806
    if self.type is not None:
2821 chandransh 1807
      oprot.writeFieldBegin('type', TType.I32, 3)
1808
      oprot.writeI32(self.type)
1809
      oprot.writeFieldEnd()
1810
    oprot.writeFieldStop()
1811
    oprot.writeStructEnd()
1812
 
3431 rajveer 1813
  def validate(self):
1814
    return
1815
 
1816
 
2821 chandransh 1817
  def __repr__(self):
1818
    L = ['%s=%r' % (key, value)
1819
      for key, value in self.__dict__.iteritems()]
1820
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1821
 
1822
  def __eq__(self, other):
1823
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1824
 
1825
  def __ne__(self, other):
1826
    return not (self == other)
1827
 
1828
class scanOut_result:
1829
  """
1830
  Attributes:
1831
   - wex
1832
  """
1833
 
1834
  thrift_spec = (
1835
    None, # 0
1836
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1837
  )
1838
 
1839
  def __init__(self, wex=None,):
1840
    self.wex = wex
1841
 
1842
  def read(self, iprot):
1843
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1844
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1845
      return
1846
    iprot.readStructBegin()
1847
    while True:
1848
      (fname, ftype, fid) = iprot.readFieldBegin()
1849
      if ftype == TType.STOP:
1850
        break
1851
      if fid == 1:
1852
        if ftype == TType.STRUCT:
1853
          self.wex = WarehouseServiceException()
1854
          self.wex.read(iprot)
1855
        else:
1856
          iprot.skip(ftype)
1857
      else:
1858
        iprot.skip(ftype)
1859
      iprot.readFieldEnd()
1860
    iprot.readStructEnd()
1861
 
1862
  def write(self, oprot):
1863
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1864
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1865
      return
1866
    oprot.writeStructBegin('scanOut_result')
3431 rajveer 1867
    if self.wex is not None:
2821 chandransh 1868
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1869
      self.wex.write(oprot)
1870
      oprot.writeFieldEnd()
1871
    oprot.writeFieldStop()
1872
    oprot.writeStructEnd()
1873
 
3431 rajveer 1874
  def validate(self):
1875
    return
1876
 
1877
 
2821 chandransh 1878
  def __repr__(self):
1879
    L = ['%s=%r' % (key, value)
1880
      for key, value in self.__dict__.iteritems()]
1881
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1882
 
1883
  def __eq__(self, other):
1884
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1885
 
1886
  def __ne__(self, other):
1887
    return not (self == other)