Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
5944 mandeep.dh 1
#
2
# Autogenerated by Thrift Compiler (0.7.0)
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
import shop2020.thriftpy.generic.GenericService
9
from ttypes import *
10
from thrift.Thrift import TProcessor
11
from thrift.transport import TTransport
12
from thrift.protocol import TBinaryProtocol, TProtocol
13
try:
14
  from thrift.protocol import fastbinary
15
except:
16
  fastbinary = None
17
 
18
 
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
20
  def addWarehouse(self, warehouse):
21
    """
22
    Parameters:
23
     - warehouse
24
    """
25
    pass
26
 
27
  def addVendor(self, vendor):
28
    """
29
    add a new vendor
30
 
31
    Parameters:
32
     - vendor
33
    """
34
    pass
35
 
36
  def updateInventoryHistory(self, warehouse_id, timestamp, availability):
37
    """
38
    Stores the incremental warehouse updates of items.
39
 
40
    Parameters:
41
     - warehouse_id
42
     - timestamp
43
     - availability
44
    """
45
    pass
46
 
47
  def updateInventory(self, warehouse_id, timestamp, availability):
48
    """
49
    Stores the final inventory stocks of items.
50
 
51
    Parameters:
52
     - warehouse_id
53
     - timestamp
54
     - availability
55
    """
56
    pass
57
 
58
  def addInventory(self, itemId, warehouseId, quantity):
59
    """
60
    Add the inventory to existing stock.
61
 
62
    Parameters:
63
     - itemId
64
     - warehouseId
65
     - quantity
66
    """
67
    pass
68
 
69
  def retireWarehouse(self, warehouse_id):
70
    """
71
    Parameters:
72
     - warehouse_id
73
    """
74
    pass
75
 
76
  def getItemInventoryByItemId(self, item_id):
77
    """
78
    Parameters:
79
     - item_id
80
    """
81
    pass
82
 
83
  def getItemAvailibilityAtWarehouse(self, warehouse_id, item_id):
84
    """
85
    Parameters:
86
     - warehouse_id
87
     - item_id
88
    """
89
    pass
90
 
91
  def getItemAvailabilityAtLocation(self, itemId):
92
    """
93
    Determines the warehouse that should be used to fulfil an order for the given item.
94
    It first checks all the warehouses which are in the logistics location given by the
95
    warehouse_loc parameter. If none of the warehouses there have any inventory, then the
96
    preferred warehouse for the item is used.
97
 
98
    Returns an ordered list of size 4 with following elements in the given order:
99
    1. Id of the fulfillment warehouse which was finally picked up.
100
    2. Expected delay added by the category manager.
101
    3. Id of the billing warehouse which was finally picked up.
102
 
103
    Parameters:
104
     - itemId
105
    """
106
    pass
107
 
108
  def getAllWarehouses(self, isActive):
109
    """
110
    Parameters:
111
     - isActive
112
    """
113
    pass
114
 
115
  def getWarehouse(self, warehouse_id):
116
    """
117
    Returns the warehouse with the given id.
118
 
119
    Parameters:
120
     - warehouse_id
121
    """
122
    pass
123
 
124
  def getAllItemsForWarehouse(self, warehouse_id):
125
    """
126
    Parameters:
127
     - warehouse_id
128
    """
129
    pass
130
 
5966 rajveer 131
  def isOrderBillable(self, itemId, warehouseId, sourceId, orderId):
5944 mandeep.dh 132
    """
5966 rajveer 133
    Depending on reservation in the table, verify if we can bill this order or not.
134
 
135
    Parameters:
136
     - itemId
137
     - warehouseId
138
     - sourceId
139
     - orderId
140
    """
141
    pass
142
 
143
  def reserveItemInWarehouse(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
144
    """
5944 mandeep.dh 145
    Increases the reservation count for an item in a warehouse. Should always succeed normally.
146
 
147
    Parameters:
148
     - itemId
149
     - warehouseId
5966 rajveer 150
     - sourceId
151
     - orderId
152
     - createdTimestamp
153
     - promisedShippingTimestamp
5944 mandeep.dh 154
     - quantity
155
    """
156
    pass
157
 
5966 rajveer 158
  def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
5944 mandeep.dh 159
    """
160
    Decreases the reservation count for an item in a warehouse. Should always succeed normally.
161
 
162
    Parameters:
163
     - itemId
164
     - warehouseId
5966 rajveer 165
     - sourceId
166
     - orderId
5944 mandeep.dh 167
     - quantity
168
    """
169
    pass
170
 
171
  def getItemPricing(self, itemId, vendorId):
172
    """
173
    Returns the pricing information of an item associated with the vendor of the given warehouse.
174
    Raises an exception if either the item, vendor or the associated pricing information can't be found.
175
 
176
    Parameters:
177
     - itemId
178
     - vendorId
179
    """
180
    pass
181
 
182
  def getAllItemPricing(self, itemId):
183
    """
184
    Returns the list of vendor pricing information of an item.
185
    Raises an exception if item not found corresponding to itemId
186
 
187
    Parameters:
188
     - itemId
189
    """
190
    pass
191
 
192
  def addVendorItemPricing(self, vendorItemPricing):
193
    """
194
    Adds vendor prices corresponding to the item. If pricing already exists then updates the prices.
195
    Raises an exception if either the item or vendor can't be found corresponding to their ids.
196
 
197
    Parameters:
198
     - vendorItemPricing
199
    """
200
    pass
201
 
202
  def getVendor(self, vendorId):
203
    """
204
    Returns a vendor given its id
205
 
206
    Parameters:
207
     - vendorId
208
    """
209
    pass
210
 
211
  def getAllVendors(self, ):
212
    """
213
    Return list of all vendors
214
    """
215
    pass
216
 
217
  def addVendorItemMapping(self, key, vendorItemMapping):
218
    """
219
    Adds VendorItemMapping. Updates VendorItemMapping if exists corresponding to the item key.
220
 
221
    Parameters:
222
     - key
223
     - vendorItemMapping
224
    """
225
    pass
226
 
227
  def getVendorItemMappings(self, itemId):
228
    """
229
    Returns the list of vendor item mapping corresponding to itemId passed as parameter.
230
    Raises an exception if item not found corresponding to itemId
231
 
232
    Parameters:
233
     - itemId
234
    """
235
    pass
236
 
237
  def getPendingOrdersInventory(self, vendorid):
238
    """
239
    Returns a list of inventory stock for items for which there are pending orders for the given vendor.
240
 
241
    Parameters:
242
     - vendorid
243
    """
244
    pass
245
 
246
  def getWarehouses(self, warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId):
247
    """
248
    This method returns all warehouses for a given warehosueType, inventoryType, vendor, billingWarehouse and shippingWarehouse.
249
    getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 1 for billing warehouse 7 and shipping warehouse 7
250
    getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
251
       getWarehouses(null, null, 3, 7, 7) would return all type warehouses with all type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
252
       getWarehouses(null, null, 0, 0, 7) would return all type warehouses with all type inventory for all vendors for all billing warehouses at shipping warehouse 7
253
 
254
    Parameters:
255
     - warehouseType
256
     - inventoryType
257
     - vendorId
258
     - billingWarehouseId
259
     - shippingWarehouseId
260
    """
261
    pass
262
 
263
  def resetAvailability(self, itemKey, vendorId, quantity, warehouseId):
264
    """
265
    Resets availability of an item to the quantity mentioned in a warehouse.
266
 
267
    Parameters:
268
     - itemKey
269
     - vendorId
270
     - quantity
271
     - warehouseId
272
    """
273
    pass
274
 
275
  def resetAvailabilityForWarehouse(self, warehouseId):
276
    """
277
    Resets availability of a warehouse to zero.
278
 
279
    Parameters:
280
     - warehouseId
281
    """
282
    pass
283
 
284
  def getItemKeysToBeProcessed(self, warehouseId):
285
    """
286
    Returns the list of item keys which need to be processed for a given warehouse.
287
    This is currently used by Support application to send item keys whose inventory needs
288
    to be updated from PLB
289
 
290
    Parameters:
291
     - warehouseId
292
    """
293
    pass
294
 
295
  def markMissedInventoryUpdatesAsProcessed(self, itemKey, warehouseId):
296
    """
297
    Marks/Deletes missed inventory updates for a given key and warehouse.
298
    This generally happens when updates from PLB are applied on the currentinventorysnapshot for an item
299
 
300
    Parameters:
301
     - itemKey
302
     - warehouseId
303
    """
304
    pass
305
 
306
  def getIgnoredItemKeys(self, ):
307
    """
308
    Returns all the item key mappings that have been ignored until date. Value of map has the warehouse id
309
    and the timestamp from where alert was raised.
310
    """
311
    pass
312
 
313
  def addBadInventory(self, itemId, warehouseId, quantity):
314
    """
315
    Add the BAD type inventory to existing stock.
316
 
317
    Parameters:
318
     - itemId
319
     - warehouseId
320
     - quantity
321
    """
322
    pass
323
 
324
  def getShippingLocations(self, ):
325
    """
326
    Returns all shipping locations
327
    """
328
    pass
329
 
330
  def getAllVendorItemMappings(self, ):
331
    """
332
    Fetches all the vendor item mappings present.
333
    """
334
    pass
335
 
336
  def getInventorySnapshot(self, warehouseId):
337
    """
338
    Gets items' inventory for a warehouse
339
    If warehouse is passed as zero, items' inventory across all warehouses is sent
340
 
341
    Parameters:
342
     - warehouseId
343
    """
344
    pass
345
 
346
  def clearItemAvailabilityCache(self, ):
347
    """
348
    Clear item availability cache.
349
    """
350
    pass
351
 
352
  def updateVendorString(self, warehouseId, vendorString):
353
    """
354
    Parameters:
355
     - warehouseId
356
     - vendorString
357
    """
358
    pass
359
 
360
 
361
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
362
  def __init__(self, iprot, oprot=None):
363
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
364
 
365
  def addWarehouse(self, warehouse):
366
    """
367
    Parameters:
368
     - warehouse
369
    """
370
    self.send_addWarehouse(warehouse)
371
    return self.recv_addWarehouse()
372
 
373
  def send_addWarehouse(self, warehouse):
374
    self._oprot.writeMessageBegin('addWarehouse', TMessageType.CALL, self._seqid)
375
    args = addWarehouse_args()
376
    args.warehouse = warehouse
377
    args.write(self._oprot)
378
    self._oprot.writeMessageEnd()
379
    self._oprot.trans.flush()
380
 
381
  def recv_addWarehouse(self, ):
382
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
383
    if mtype == TMessageType.EXCEPTION:
384
      x = TApplicationException()
385
      x.read(self._iprot)
386
      self._iprot.readMessageEnd()
387
      raise x
388
    result = addWarehouse_result()
389
    result.read(self._iprot)
390
    self._iprot.readMessageEnd()
391
    if result.success is not None:
392
      return result.success
393
    if result.cex is not None:
394
      raise result.cex
395
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addWarehouse failed: unknown result");
396
 
397
  def addVendor(self, vendor):
398
    """
399
    add a new vendor
400
 
401
    Parameters:
402
     - vendor
403
    """
404
    self.send_addVendor(vendor)
405
    return self.recv_addVendor()
406
 
407
  def send_addVendor(self, vendor):
408
    self._oprot.writeMessageBegin('addVendor', TMessageType.CALL, self._seqid)
409
    args = addVendor_args()
410
    args.vendor = vendor
411
    args.write(self._oprot)
412
    self._oprot.writeMessageEnd()
413
    self._oprot.trans.flush()
414
 
415
  def recv_addVendor(self, ):
416
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
417
    if mtype == TMessageType.EXCEPTION:
418
      x = TApplicationException()
419
      x.read(self._iprot)
420
      self._iprot.readMessageEnd()
421
      raise x
422
    result = addVendor_result()
423
    result.read(self._iprot)
424
    self._iprot.readMessageEnd()
425
    if result.success is not None:
426
      return result.success
427
    if result.cex is not None:
428
      raise result.cex
429
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addVendor failed: unknown result");
430
 
431
  def updateInventoryHistory(self, warehouse_id, timestamp, availability):
432
    """
433
    Stores the incremental warehouse updates of items.
434
 
435
    Parameters:
436
     - warehouse_id
437
     - timestamp
438
     - availability
439
    """
440
    self.send_updateInventoryHistory(warehouse_id, timestamp, availability)
441
    self.recv_updateInventoryHistory()
442
 
443
  def send_updateInventoryHistory(self, warehouse_id, timestamp, availability):
444
    self._oprot.writeMessageBegin('updateInventoryHistory', TMessageType.CALL, self._seqid)
445
    args = updateInventoryHistory_args()
446
    args.warehouse_id = warehouse_id
447
    args.timestamp = timestamp
448
    args.availability = availability
449
    args.write(self._oprot)
450
    self._oprot.writeMessageEnd()
451
    self._oprot.trans.flush()
452
 
453
  def recv_updateInventoryHistory(self, ):
454
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
455
    if mtype == TMessageType.EXCEPTION:
456
      x = TApplicationException()
457
      x.read(self._iprot)
458
      self._iprot.readMessageEnd()
459
      raise x
460
    result = updateInventoryHistory_result()
461
    result.read(self._iprot)
462
    self._iprot.readMessageEnd()
463
    if result.cex is not None:
464
      raise result.cex
465
    return
466
 
467
  def updateInventory(self, warehouse_id, timestamp, availability):
468
    """
469
    Stores the final inventory stocks of items.
470
 
471
    Parameters:
472
     - warehouse_id
473
     - timestamp
474
     - availability
475
    """
476
    self.send_updateInventory(warehouse_id, timestamp, availability)
477
    self.recv_updateInventory()
478
 
479
  def send_updateInventory(self, warehouse_id, timestamp, availability):
480
    self._oprot.writeMessageBegin('updateInventory', TMessageType.CALL, self._seqid)
481
    args = updateInventory_args()
482
    args.warehouse_id = warehouse_id
483
    args.timestamp = timestamp
484
    args.availability = availability
485
    args.write(self._oprot)
486
    self._oprot.writeMessageEnd()
487
    self._oprot.trans.flush()
488
 
489
  def recv_updateInventory(self, ):
490
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
491
    if mtype == TMessageType.EXCEPTION:
492
      x = TApplicationException()
493
      x.read(self._iprot)
494
      self._iprot.readMessageEnd()
495
      raise x
496
    result = updateInventory_result()
497
    result.read(self._iprot)
498
    self._iprot.readMessageEnd()
499
    if result.cex is not None:
500
      raise result.cex
501
    return
502
 
503
  def addInventory(self, itemId, warehouseId, quantity):
504
    """
505
    Add the inventory to existing stock.
506
 
507
    Parameters:
508
     - itemId
509
     - warehouseId
510
     - quantity
511
    """
512
    self.send_addInventory(itemId, warehouseId, quantity)
513
    self.recv_addInventory()
514
 
515
  def send_addInventory(self, itemId, warehouseId, quantity):
516
    self._oprot.writeMessageBegin('addInventory', TMessageType.CALL, self._seqid)
517
    args = addInventory_args()
518
    args.itemId = itemId
519
    args.warehouseId = warehouseId
520
    args.quantity = quantity
521
    args.write(self._oprot)
522
    self._oprot.writeMessageEnd()
523
    self._oprot.trans.flush()
524
 
525
  def recv_addInventory(self, ):
526
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
527
    if mtype == TMessageType.EXCEPTION:
528
      x = TApplicationException()
529
      x.read(self._iprot)
530
      self._iprot.readMessageEnd()
531
      raise x
532
    result = addInventory_result()
533
    result.read(self._iprot)
534
    self._iprot.readMessageEnd()
535
    if result.cex is not None:
536
      raise result.cex
537
    return
538
 
539
  def retireWarehouse(self, warehouse_id):
540
    """
541
    Parameters:
542
     - warehouse_id
543
    """
544
    self.send_retireWarehouse(warehouse_id)
545
    self.recv_retireWarehouse()
546
 
547
  def send_retireWarehouse(self, warehouse_id):
548
    self._oprot.writeMessageBegin('retireWarehouse', TMessageType.CALL, self._seqid)
549
    args = retireWarehouse_args()
550
    args.warehouse_id = warehouse_id
551
    args.write(self._oprot)
552
    self._oprot.writeMessageEnd()
553
    self._oprot.trans.flush()
554
 
555
  def recv_retireWarehouse(self, ):
556
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
557
    if mtype == TMessageType.EXCEPTION:
558
      x = TApplicationException()
559
      x.read(self._iprot)
560
      self._iprot.readMessageEnd()
561
      raise x
562
    result = retireWarehouse_result()
563
    result.read(self._iprot)
564
    self._iprot.readMessageEnd()
565
    if result.cex is not None:
566
      raise result.cex
567
    return
568
 
569
  def getItemInventoryByItemId(self, item_id):
570
    """
571
    Parameters:
572
     - item_id
573
    """
574
    self.send_getItemInventoryByItemId(item_id)
575
    return self.recv_getItemInventoryByItemId()
576
 
577
  def send_getItemInventoryByItemId(self, item_id):
578
    self._oprot.writeMessageBegin('getItemInventoryByItemId', TMessageType.CALL, self._seqid)
579
    args = getItemInventoryByItemId_args()
580
    args.item_id = item_id
581
    args.write(self._oprot)
582
    self._oprot.writeMessageEnd()
583
    self._oprot.trans.flush()
584
 
585
  def recv_getItemInventoryByItemId(self, ):
586
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
587
    if mtype == TMessageType.EXCEPTION:
588
      x = TApplicationException()
589
      x.read(self._iprot)
590
      self._iprot.readMessageEnd()
591
      raise x
592
    result = getItemInventoryByItemId_result()
593
    result.read(self._iprot)
594
    self._iprot.readMessageEnd()
595
    if result.success is not None:
596
      return result.success
597
    if result.cex is not None:
598
      raise result.cex
599
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemInventoryByItemId failed: unknown result");
600
 
601
  def getItemAvailibilityAtWarehouse(self, warehouse_id, item_id):
602
    """
603
    Parameters:
604
     - warehouse_id
605
     - item_id
606
    """
607
    self.send_getItemAvailibilityAtWarehouse(warehouse_id, item_id)
608
    return self.recv_getItemAvailibilityAtWarehouse()
609
 
610
  def send_getItemAvailibilityAtWarehouse(self, warehouse_id, item_id):
611
    self._oprot.writeMessageBegin('getItemAvailibilityAtWarehouse', TMessageType.CALL, self._seqid)
612
    args = getItemAvailibilityAtWarehouse_args()
613
    args.warehouse_id = warehouse_id
614
    args.item_id = item_id
615
    args.write(self._oprot)
616
    self._oprot.writeMessageEnd()
617
    self._oprot.trans.flush()
618
 
619
  def recv_getItemAvailibilityAtWarehouse(self, ):
620
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
621
    if mtype == TMessageType.EXCEPTION:
622
      x = TApplicationException()
623
      x.read(self._iprot)
624
      self._iprot.readMessageEnd()
625
      raise x
626
    result = getItemAvailibilityAtWarehouse_result()
627
    result.read(self._iprot)
628
    self._iprot.readMessageEnd()
629
    if result.success is not None:
630
      return result.success
631
    if result.cex is not None:
632
      raise result.cex
633
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemAvailibilityAtWarehouse failed: unknown result");
634
 
635
  def getItemAvailabilityAtLocation(self, itemId):
636
    """
637
    Determines the warehouse that should be used to fulfil an order for the given item.
638
    It first checks all the warehouses which are in the logistics location given by the
639
    warehouse_loc parameter. If none of the warehouses there have any inventory, then the
640
    preferred warehouse for the item is used.
641
 
642
    Returns an ordered list of size 4 with following elements in the given order:
643
    1. Id of the fulfillment warehouse which was finally picked up.
644
    2. Expected delay added by the category manager.
645
    3. Id of the billing warehouse which was finally picked up.
646
 
647
    Parameters:
648
     - itemId
649
    """
650
    self.send_getItemAvailabilityAtLocation(itemId)
651
    return self.recv_getItemAvailabilityAtLocation()
652
 
653
  def send_getItemAvailabilityAtLocation(self, itemId):
654
    self._oprot.writeMessageBegin('getItemAvailabilityAtLocation', TMessageType.CALL, self._seqid)
655
    args = getItemAvailabilityAtLocation_args()
656
    args.itemId = itemId
657
    args.write(self._oprot)
658
    self._oprot.writeMessageEnd()
659
    self._oprot.trans.flush()
660
 
661
  def recv_getItemAvailabilityAtLocation(self, ):
662
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
663
    if mtype == TMessageType.EXCEPTION:
664
      x = TApplicationException()
665
      x.read(self._iprot)
666
      self._iprot.readMessageEnd()
667
      raise x
668
    result = getItemAvailabilityAtLocation_result()
669
    result.read(self._iprot)
670
    self._iprot.readMessageEnd()
671
    if result.success is not None:
672
      return result.success
673
    if result.isex is not None:
674
      raise result.isex
675
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemAvailabilityAtLocation failed: unknown result");
676
 
677
  def getAllWarehouses(self, isActive):
678
    """
679
    Parameters:
680
     - isActive
681
    """
682
    self.send_getAllWarehouses(isActive)
683
    return self.recv_getAllWarehouses()
684
 
685
  def send_getAllWarehouses(self, isActive):
686
    self._oprot.writeMessageBegin('getAllWarehouses', TMessageType.CALL, self._seqid)
687
    args = getAllWarehouses_args()
688
    args.isActive = isActive
689
    args.write(self._oprot)
690
    self._oprot.writeMessageEnd()
691
    self._oprot.trans.flush()
692
 
693
  def recv_getAllWarehouses(self, ):
694
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
695
    if mtype == TMessageType.EXCEPTION:
696
      x = TApplicationException()
697
      x.read(self._iprot)
698
      self._iprot.readMessageEnd()
699
      raise x
700
    result = getAllWarehouses_result()
701
    result.read(self._iprot)
702
    self._iprot.readMessageEnd()
703
    if result.success is not None:
704
      return result.success
705
    if result.cex is not None:
706
      raise result.cex
707
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllWarehouses failed: unknown result");
708
 
709
  def getWarehouse(self, warehouse_id):
710
    """
711
    Returns the warehouse with the given id.
712
 
713
    Parameters:
714
     - warehouse_id
715
    """
716
    self.send_getWarehouse(warehouse_id)
717
    return self.recv_getWarehouse()
718
 
719
  def send_getWarehouse(self, warehouse_id):
720
    self._oprot.writeMessageBegin('getWarehouse', TMessageType.CALL, self._seqid)
721
    args = getWarehouse_args()
722
    args.warehouse_id = warehouse_id
723
    args.write(self._oprot)
724
    self._oprot.writeMessageEnd()
725
    self._oprot.trans.flush()
726
 
727
  def recv_getWarehouse(self, ):
728
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
729
    if mtype == TMessageType.EXCEPTION:
730
      x = TApplicationException()
731
      x.read(self._iprot)
732
      self._iprot.readMessageEnd()
733
      raise x
734
    result = getWarehouse_result()
735
    result.read(self._iprot)
736
    self._iprot.readMessageEnd()
737
    if result.success is not None:
738
      return result.success
739
    if result.cex is not None:
740
      raise result.cex
741
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getWarehouse failed: unknown result");
742
 
743
  def getAllItemsForWarehouse(self, warehouse_id):
744
    """
745
    Parameters:
746
     - warehouse_id
747
    """
748
    self.send_getAllItemsForWarehouse(warehouse_id)
749
    return self.recv_getAllItemsForWarehouse()
750
 
751
  def send_getAllItemsForWarehouse(self, warehouse_id):
752
    self._oprot.writeMessageBegin('getAllItemsForWarehouse', TMessageType.CALL, self._seqid)
753
    args = getAllItemsForWarehouse_args()
754
    args.warehouse_id = warehouse_id
755
    args.write(self._oprot)
756
    self._oprot.writeMessageEnd()
757
    self._oprot.trans.flush()
758
 
759
  def recv_getAllItemsForWarehouse(self, ):
760
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
761
    if mtype == TMessageType.EXCEPTION:
762
      x = TApplicationException()
763
      x.read(self._iprot)
764
      self._iprot.readMessageEnd()
765
      raise x
766
    result = getAllItemsForWarehouse_result()
767
    result.read(self._iprot)
768
    self._iprot.readMessageEnd()
769
    if result.success is not None:
770
      return result.success
771
    if result.cex is not None:
772
      raise result.cex
773
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllItemsForWarehouse failed: unknown result");
774
 
5966 rajveer 775
  def isOrderBillable(self, itemId, warehouseId, sourceId, orderId):
5944 mandeep.dh 776
    """
5966 rajveer 777
    Depending on reservation in the table, verify wether we can bill this order or not.
778
 
779
    Parameters:
780
     - itemId
781
     - warehouseId
782
     - sourceId
783
     - orderId
784
    """
785
    self.send_isOrderBillable(itemId, warehouseId, sourceId, orderId)
786
    return self.recv_isOrderBillable()
787
 
788
  def send_isOrderBillable(self, itemId, warehouseId, sourceId, orderId):
789
    self._oprot.writeMessageBegin('isOrderBillable', TMessageType.CALL, self._seqid)
790
    args = isOrderBillable_args()
791
    args.itemId = itemId
792
    args.warehouseId = warehouseId
793
    args.sourceId = sourceId
794
    args.orderId = orderId
795
    args.write(self._oprot)
796
    self._oprot.writeMessageEnd()
797
    self._oprot.trans.flush()
798
 
799
  def recv_isOrderBillable(self, ):
800
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
801
    if mtype == TMessageType.EXCEPTION:
802
      x = TApplicationException()
803
      x.read(self._iprot)
804
      self._iprot.readMessageEnd()
805
      raise x
806
    result = isOrderBillable_result()
807
    result.read(self._iprot)
808
    self._iprot.readMessageEnd()
809
    if result.success is not None:
810
      return result.success
811
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isOrderBillable failed: unknown result");
812
 
813
  def reserveItemInWarehouse(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
814
    """
5944 mandeep.dh 815
    Increases the reservation count for an item in a warehouse. Should always succeed normally.
816
 
817
    Parameters:
818
     - itemId
819
     - warehouseId
5966 rajveer 820
     - sourceId
821
     - orderId
822
     - createdTimestamp
823
     - promisedShippingTimestamp
5944 mandeep.dh 824
     - quantity
825
    """
5966 rajveer 826
    self.send_reserveItemInWarehouse(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity)
5944 mandeep.dh 827
    return self.recv_reserveItemInWarehouse()
828
 
5966 rajveer 829
  def send_reserveItemInWarehouse(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
5944 mandeep.dh 830
    self._oprot.writeMessageBegin('reserveItemInWarehouse', TMessageType.CALL, self._seqid)
831
    args = reserveItemInWarehouse_args()
832
    args.itemId = itemId
833
    args.warehouseId = warehouseId
5966 rajveer 834
    args.sourceId = sourceId
835
    args.orderId = orderId
836
    args.createdTimestamp = createdTimestamp
837
    args.promisedShippingTimestamp = promisedShippingTimestamp
5944 mandeep.dh 838
    args.quantity = quantity
839
    args.write(self._oprot)
840
    self._oprot.writeMessageEnd()
841
    self._oprot.trans.flush()
842
 
843
  def recv_reserveItemInWarehouse(self, ):
844
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
845
    if mtype == TMessageType.EXCEPTION:
846
      x = TApplicationException()
847
      x.read(self._iprot)
848
      self._iprot.readMessageEnd()
849
      raise x
850
    result = reserveItemInWarehouse_result()
851
    result.read(self._iprot)
852
    self._iprot.readMessageEnd()
853
    if result.success is not None:
854
      return result.success
855
    if result.cex is not None:
856
      raise result.cex
857
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reserveItemInWarehouse failed: unknown result");
858
 
5966 rajveer 859
  def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
5944 mandeep.dh 860
    """
861
    Decreases the reservation count for an item in a warehouse. Should always succeed normally.
862
 
863
    Parameters:
864
     - itemId
865
     - warehouseId
5966 rajveer 866
     - sourceId
867
     - orderId
5944 mandeep.dh 868
     - quantity
869
    """
5966 rajveer 870
    self.send_reduceReservationCount(itemId, warehouseId, sourceId, orderId, quantity)
5944 mandeep.dh 871
    return self.recv_reduceReservationCount()
872
 
5966 rajveer 873
  def send_reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
5944 mandeep.dh 874
    self._oprot.writeMessageBegin('reduceReservationCount', TMessageType.CALL, self._seqid)
875
    args = reduceReservationCount_args()
876
    args.itemId = itemId
877
    args.warehouseId = warehouseId
5966 rajveer 878
    args.sourceId = sourceId
879
    args.orderId = orderId
5944 mandeep.dh 880
    args.quantity = quantity
881
    args.write(self._oprot)
882
    self._oprot.writeMessageEnd()
883
    self._oprot.trans.flush()
884
 
885
  def recv_reduceReservationCount(self, ):
886
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
887
    if mtype == TMessageType.EXCEPTION:
888
      x = TApplicationException()
889
      x.read(self._iprot)
890
      self._iprot.readMessageEnd()
891
      raise x
892
    result = reduceReservationCount_result()
893
    result.read(self._iprot)
894
    self._iprot.readMessageEnd()
895
    if result.success is not None:
896
      return result.success
897
    if result.cex is not None:
898
      raise result.cex
899
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reduceReservationCount failed: unknown result");
900
 
901
  def getItemPricing(self, itemId, vendorId):
902
    """
903
    Returns the pricing information of an item associated with the vendor of the given warehouse.
904
    Raises an exception if either the item, vendor or the associated pricing information can't be found.
905
 
906
    Parameters:
907
     - itemId
908
     - vendorId
909
    """
910
    self.send_getItemPricing(itemId, vendorId)
911
    return self.recv_getItemPricing()
912
 
913
  def send_getItemPricing(self, itemId, vendorId):
914
    self._oprot.writeMessageBegin('getItemPricing', TMessageType.CALL, self._seqid)
915
    args = getItemPricing_args()
916
    args.itemId = itemId
917
    args.vendorId = vendorId
918
    args.write(self._oprot)
919
    self._oprot.writeMessageEnd()
920
    self._oprot.trans.flush()
921
 
922
  def recv_getItemPricing(self, ):
923
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
924
    if mtype == TMessageType.EXCEPTION:
925
      x = TApplicationException()
926
      x.read(self._iprot)
927
      self._iprot.readMessageEnd()
928
      raise x
929
    result = getItemPricing_result()
930
    result.read(self._iprot)
931
    self._iprot.readMessageEnd()
932
    if result.success is not None:
933
      return result.success
934
    if result.cex is not None:
935
      raise result.cex
936
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemPricing failed: unknown result");
937
 
938
  def getAllItemPricing(self, itemId):
939
    """
940
    Returns the list of vendor pricing information of an item.
941
    Raises an exception if item not found corresponding to itemId
942
 
943
    Parameters:
944
     - itemId
945
    """
946
    self.send_getAllItemPricing(itemId)
947
    return self.recv_getAllItemPricing()
948
 
949
  def send_getAllItemPricing(self, itemId):
950
    self._oprot.writeMessageBegin('getAllItemPricing', TMessageType.CALL, self._seqid)
951
    args = getAllItemPricing_args()
952
    args.itemId = itemId
953
    args.write(self._oprot)
954
    self._oprot.writeMessageEnd()
955
    self._oprot.trans.flush()
956
 
957
  def recv_getAllItemPricing(self, ):
958
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
959
    if mtype == TMessageType.EXCEPTION:
960
      x = TApplicationException()
961
      x.read(self._iprot)
962
      self._iprot.readMessageEnd()
963
      raise x
964
    result = getAllItemPricing_result()
965
    result.read(self._iprot)
966
    self._iprot.readMessageEnd()
967
    if result.success is not None:
968
      return result.success
969
    if result.cex is not None:
970
      raise result.cex
971
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllItemPricing failed: unknown result");
972
 
973
  def addVendorItemPricing(self, vendorItemPricing):
974
    """
975
    Adds vendor prices corresponding to the item. If pricing already exists then updates the prices.
976
    Raises an exception if either the item or vendor can't be found corresponding to their ids.
977
 
978
    Parameters:
979
     - vendorItemPricing
980
    """
981
    self.send_addVendorItemPricing(vendorItemPricing)
982
    self.recv_addVendorItemPricing()
983
 
984
  def send_addVendorItemPricing(self, vendorItemPricing):
985
    self._oprot.writeMessageBegin('addVendorItemPricing', TMessageType.CALL, self._seqid)
986
    args = addVendorItemPricing_args()
987
    args.vendorItemPricing = vendorItemPricing
988
    args.write(self._oprot)
989
    self._oprot.writeMessageEnd()
990
    self._oprot.trans.flush()
991
 
992
  def recv_addVendorItemPricing(self, ):
993
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
994
    if mtype == TMessageType.EXCEPTION:
995
      x = TApplicationException()
996
      x.read(self._iprot)
997
      self._iprot.readMessageEnd()
998
      raise x
999
    result = addVendorItemPricing_result()
1000
    result.read(self._iprot)
1001
    self._iprot.readMessageEnd()
1002
    if result.cex is not None:
1003
      raise result.cex
1004
    return
1005
 
1006
  def getVendor(self, vendorId):
1007
    """
1008
    Returns a vendor given its id
1009
 
1010
    Parameters:
1011
     - vendorId
1012
    """
1013
    self.send_getVendor(vendorId)
1014
    return self.recv_getVendor()
1015
 
1016
  def send_getVendor(self, vendorId):
1017
    self._oprot.writeMessageBegin('getVendor', TMessageType.CALL, self._seqid)
1018
    args = getVendor_args()
1019
    args.vendorId = vendorId
1020
    args.write(self._oprot)
1021
    self._oprot.writeMessageEnd()
1022
    self._oprot.trans.flush()
1023
 
1024
  def recv_getVendor(self, ):
1025
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1026
    if mtype == TMessageType.EXCEPTION:
1027
      x = TApplicationException()
1028
      x.read(self._iprot)
1029
      self._iprot.readMessageEnd()
1030
      raise x
1031
    result = getVendor_result()
1032
    result.read(self._iprot)
1033
    self._iprot.readMessageEnd()
1034
    if result.success is not None:
1035
      return result.success
1036
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getVendor failed: unknown result");
1037
 
1038
  def getAllVendors(self, ):
1039
    """
1040
    Return list of all vendors
1041
    """
1042
    self.send_getAllVendors()
1043
    return self.recv_getAllVendors()
1044
 
1045
  def send_getAllVendors(self, ):
1046
    self._oprot.writeMessageBegin('getAllVendors', TMessageType.CALL, self._seqid)
1047
    args = getAllVendors_args()
1048
    args.write(self._oprot)
1049
    self._oprot.writeMessageEnd()
1050
    self._oprot.trans.flush()
1051
 
1052
  def recv_getAllVendors(self, ):
1053
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1054
    if mtype == TMessageType.EXCEPTION:
1055
      x = TApplicationException()
1056
      x.read(self._iprot)
1057
      self._iprot.readMessageEnd()
1058
      raise x
1059
    result = getAllVendors_result()
1060
    result.read(self._iprot)
1061
    self._iprot.readMessageEnd()
1062
    if result.success is not None:
1063
      return result.success
1064
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllVendors failed: unknown result");
1065
 
1066
  def addVendorItemMapping(self, key, vendorItemMapping):
1067
    """
1068
    Adds VendorItemMapping. Updates VendorItemMapping if exists corresponding to the item key.
1069
 
1070
    Parameters:
1071
     - key
1072
     - vendorItemMapping
1073
    """
1074
    self.send_addVendorItemMapping(key, vendorItemMapping)
1075
    self.recv_addVendorItemMapping()
1076
 
1077
  def send_addVendorItemMapping(self, key, vendorItemMapping):
1078
    self._oprot.writeMessageBegin('addVendorItemMapping', TMessageType.CALL, self._seqid)
1079
    args = addVendorItemMapping_args()
1080
    args.key = key
1081
    args.vendorItemMapping = vendorItemMapping
1082
    args.write(self._oprot)
1083
    self._oprot.writeMessageEnd()
1084
    self._oprot.trans.flush()
1085
 
1086
  def recv_addVendorItemMapping(self, ):
1087
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1088
    if mtype == TMessageType.EXCEPTION:
1089
      x = TApplicationException()
1090
      x.read(self._iprot)
1091
      self._iprot.readMessageEnd()
1092
      raise x
1093
    result = addVendorItemMapping_result()
1094
    result.read(self._iprot)
1095
    self._iprot.readMessageEnd()
1096
    if result.cex is not None:
1097
      raise result.cex
1098
    return
1099
 
1100
  def getVendorItemMappings(self, itemId):
1101
    """
1102
    Returns the list of vendor item mapping corresponding to itemId passed as parameter.
1103
    Raises an exception if item not found corresponding to itemId
1104
 
1105
    Parameters:
1106
     - itemId
1107
    """
1108
    self.send_getVendorItemMappings(itemId)
1109
    return self.recv_getVendorItemMappings()
1110
 
1111
  def send_getVendorItemMappings(self, itemId):
1112
    self._oprot.writeMessageBegin('getVendorItemMappings', TMessageType.CALL, self._seqid)
1113
    args = getVendorItemMappings_args()
1114
    args.itemId = itemId
1115
    args.write(self._oprot)
1116
    self._oprot.writeMessageEnd()
1117
    self._oprot.trans.flush()
1118
 
1119
  def recv_getVendorItemMappings(self, ):
1120
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1121
    if mtype == TMessageType.EXCEPTION:
1122
      x = TApplicationException()
1123
      x.read(self._iprot)
1124
      self._iprot.readMessageEnd()
1125
      raise x
1126
    result = getVendorItemMappings_result()
1127
    result.read(self._iprot)
1128
    self._iprot.readMessageEnd()
1129
    if result.success is not None:
1130
      return result.success
1131
    if result.cex is not None:
1132
      raise result.cex
1133
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getVendorItemMappings failed: unknown result");
1134
 
1135
  def getPendingOrdersInventory(self, vendorid):
1136
    """
1137
    Returns a list of inventory stock for items for which there are pending orders for the given vendor.
1138
 
1139
    Parameters:
1140
     - vendorid
1141
    """
1142
    self.send_getPendingOrdersInventory(vendorid)
1143
    return self.recv_getPendingOrdersInventory()
1144
 
1145
  def send_getPendingOrdersInventory(self, vendorid):
1146
    self._oprot.writeMessageBegin('getPendingOrdersInventory', TMessageType.CALL, self._seqid)
1147
    args = getPendingOrdersInventory_args()
1148
    args.vendorid = vendorid
1149
    args.write(self._oprot)
1150
    self._oprot.writeMessageEnd()
1151
    self._oprot.trans.flush()
1152
 
1153
  def recv_getPendingOrdersInventory(self, ):
1154
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1155
    if mtype == TMessageType.EXCEPTION:
1156
      x = TApplicationException()
1157
      x.read(self._iprot)
1158
      self._iprot.readMessageEnd()
1159
      raise x
1160
    result = getPendingOrdersInventory_result()
1161
    result.read(self._iprot)
1162
    self._iprot.readMessageEnd()
1163
    if result.success is not None:
1164
      return result.success
1165
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPendingOrdersInventory failed: unknown result");
1166
 
1167
  def getWarehouses(self, warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId):
1168
    """
1169
    This method returns all warehouses for a given warehosueType, inventoryType, vendor, billingWarehouse and shippingWarehouse.
1170
    getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 1 for billing warehouse 7 and shipping warehouse 7
1171
    getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
1172
       getWarehouses(null, null, 3, 7, 7) would return all type warehouses with all type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
1173
       getWarehouses(null, null, 0, 0, 7) would return all type warehouses with all type inventory for all vendors for all billing warehouses at shipping warehouse 7
1174
 
1175
    Parameters:
1176
     - warehouseType
1177
     - inventoryType
1178
     - vendorId
1179
     - billingWarehouseId
1180
     - shippingWarehouseId
1181
    """
1182
    self.send_getWarehouses(warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId)
1183
    return self.recv_getWarehouses()
1184
 
1185
  def send_getWarehouses(self, warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId):
1186
    self._oprot.writeMessageBegin('getWarehouses', TMessageType.CALL, self._seqid)
1187
    args = getWarehouses_args()
1188
    args.warehouseType = warehouseType
1189
    args.inventoryType = inventoryType
1190
    args.vendorId = vendorId
1191
    args.billingWarehouseId = billingWarehouseId
1192
    args.shippingWarehouseId = shippingWarehouseId
1193
    args.write(self._oprot)
1194
    self._oprot.writeMessageEnd()
1195
    self._oprot.trans.flush()
1196
 
1197
  def recv_getWarehouses(self, ):
1198
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1199
    if mtype == TMessageType.EXCEPTION:
1200
      x = TApplicationException()
1201
      x.read(self._iprot)
1202
      self._iprot.readMessageEnd()
1203
      raise x
1204
    result = getWarehouses_result()
1205
    result.read(self._iprot)
1206
    self._iprot.readMessageEnd()
1207
    if result.success is not None:
1208
      return result.success
1209
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getWarehouses failed: unknown result");
1210
 
1211
  def resetAvailability(self, itemKey, vendorId, quantity, warehouseId):
1212
    """
1213
    Resets availability of an item to the quantity mentioned in a warehouse.
1214
 
1215
    Parameters:
1216
     - itemKey
1217
     - vendorId
1218
     - quantity
1219
     - warehouseId
1220
    """
1221
    self.send_resetAvailability(itemKey, vendorId, quantity, warehouseId)
1222
    self.recv_resetAvailability()
1223
 
1224
  def send_resetAvailability(self, itemKey, vendorId, quantity, warehouseId):
1225
    self._oprot.writeMessageBegin('resetAvailability', TMessageType.CALL, self._seqid)
1226
    args = resetAvailability_args()
1227
    args.itemKey = itemKey
1228
    args.vendorId = vendorId
1229
    args.quantity = quantity
1230
    args.warehouseId = warehouseId
1231
    args.write(self._oprot)
1232
    self._oprot.writeMessageEnd()
1233
    self._oprot.trans.flush()
1234
 
1235
  def recv_resetAvailability(self, ):
1236
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1237
    if mtype == TMessageType.EXCEPTION:
1238
      x = TApplicationException()
1239
      x.read(self._iprot)
1240
      self._iprot.readMessageEnd()
1241
      raise x
1242
    result = resetAvailability_result()
1243
    result.read(self._iprot)
1244
    self._iprot.readMessageEnd()
1245
    if result.cex is not None:
1246
      raise result.cex
1247
    return
1248
 
1249
  def resetAvailabilityForWarehouse(self, warehouseId):
1250
    """
1251
    Resets availability of a warehouse to zero.
1252
 
1253
    Parameters:
1254
     - warehouseId
1255
    """
1256
    self.send_resetAvailabilityForWarehouse(warehouseId)
1257
    self.recv_resetAvailabilityForWarehouse()
1258
 
1259
  def send_resetAvailabilityForWarehouse(self, warehouseId):
1260
    self._oprot.writeMessageBegin('resetAvailabilityForWarehouse', TMessageType.CALL, self._seqid)
1261
    args = resetAvailabilityForWarehouse_args()
1262
    args.warehouseId = warehouseId
1263
    args.write(self._oprot)
1264
    self._oprot.writeMessageEnd()
1265
    self._oprot.trans.flush()
1266
 
1267
  def recv_resetAvailabilityForWarehouse(self, ):
1268
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1269
    if mtype == TMessageType.EXCEPTION:
1270
      x = TApplicationException()
1271
      x.read(self._iprot)
1272
      self._iprot.readMessageEnd()
1273
      raise x
1274
    result = resetAvailabilityForWarehouse_result()
1275
    result.read(self._iprot)
1276
    self._iprot.readMessageEnd()
1277
    if result.cex is not None:
1278
      raise result.cex
1279
    return
1280
 
1281
  def getItemKeysToBeProcessed(self, warehouseId):
1282
    """
1283
    Returns the list of item keys which need to be processed for a given warehouse.
1284
    This is currently used by Support application to send item keys whose inventory needs
1285
    to be updated from PLB
1286
 
1287
    Parameters:
1288
     - warehouseId
1289
    """
1290
    self.send_getItemKeysToBeProcessed(warehouseId)
1291
    return self.recv_getItemKeysToBeProcessed()
1292
 
1293
  def send_getItemKeysToBeProcessed(self, warehouseId):
1294
    self._oprot.writeMessageBegin('getItemKeysToBeProcessed', TMessageType.CALL, self._seqid)
1295
    args = getItemKeysToBeProcessed_args()
1296
    args.warehouseId = warehouseId
1297
    args.write(self._oprot)
1298
    self._oprot.writeMessageEnd()
1299
    self._oprot.trans.flush()
1300
 
1301
  def recv_getItemKeysToBeProcessed(self, ):
1302
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1303
    if mtype == TMessageType.EXCEPTION:
1304
      x = TApplicationException()
1305
      x.read(self._iprot)
1306
      self._iprot.readMessageEnd()
1307
      raise x
1308
    result = getItemKeysToBeProcessed_result()
1309
    result.read(self._iprot)
1310
    self._iprot.readMessageEnd()
1311
    if result.success is not None:
1312
      return result.success
1313
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemKeysToBeProcessed failed: unknown result");
1314
 
1315
  def markMissedInventoryUpdatesAsProcessed(self, itemKey, warehouseId):
1316
    """
1317
    Marks/Deletes missed inventory updates for a given key and warehouse.
1318
    This generally happens when updates from PLB are applied on the currentinventorysnapshot for an item
1319
 
1320
    Parameters:
1321
     - itemKey
1322
     - warehouseId
1323
    """
1324
    self.send_markMissedInventoryUpdatesAsProcessed(itemKey, warehouseId)
1325
    self.recv_markMissedInventoryUpdatesAsProcessed()
1326
 
1327
  def send_markMissedInventoryUpdatesAsProcessed(self, itemKey, warehouseId):
1328
    self._oprot.writeMessageBegin('markMissedInventoryUpdatesAsProcessed', TMessageType.CALL, self._seqid)
1329
    args = markMissedInventoryUpdatesAsProcessed_args()
1330
    args.itemKey = itemKey
1331
    args.warehouseId = warehouseId
1332
    args.write(self._oprot)
1333
    self._oprot.writeMessageEnd()
1334
    self._oprot.trans.flush()
1335
 
1336
  def recv_markMissedInventoryUpdatesAsProcessed(self, ):
1337
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1338
    if mtype == TMessageType.EXCEPTION:
1339
      x = TApplicationException()
1340
      x.read(self._iprot)
1341
      self._iprot.readMessageEnd()
1342
      raise x
1343
    result = markMissedInventoryUpdatesAsProcessed_result()
1344
    result.read(self._iprot)
1345
    self._iprot.readMessageEnd()
1346
    return
1347
 
1348
  def getIgnoredItemKeys(self, ):
1349
    """
1350
    Returns all the item key mappings that have been ignored until date. Value of map has the warehouse id
1351
    and the timestamp from where alert was raised.
1352
    """
1353
    self.send_getIgnoredItemKeys()
1354
    return self.recv_getIgnoredItemKeys()
1355
 
1356
  def send_getIgnoredItemKeys(self, ):
1357
    self._oprot.writeMessageBegin('getIgnoredItemKeys', TMessageType.CALL, self._seqid)
1358
    args = getIgnoredItemKeys_args()
1359
    args.write(self._oprot)
1360
    self._oprot.writeMessageEnd()
1361
    self._oprot.trans.flush()
1362
 
1363
  def recv_getIgnoredItemKeys(self, ):
1364
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1365
    if mtype == TMessageType.EXCEPTION:
1366
      x = TApplicationException()
1367
      x.read(self._iprot)
1368
      self._iprot.readMessageEnd()
1369
      raise x
1370
    result = getIgnoredItemKeys_result()
1371
    result.read(self._iprot)
1372
    self._iprot.readMessageEnd()
1373
    if result.success is not None:
1374
      return result.success
1375
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getIgnoredItemKeys failed: unknown result");
1376
 
1377
  def addBadInventory(self, itemId, warehouseId, quantity):
1378
    """
1379
    Add the BAD type inventory to existing stock.
1380
 
1381
    Parameters:
1382
     - itemId
1383
     - warehouseId
1384
     - quantity
1385
    """
1386
    self.send_addBadInventory(itemId, warehouseId, quantity)
1387
    self.recv_addBadInventory()
1388
 
1389
  def send_addBadInventory(self, itemId, warehouseId, quantity):
1390
    self._oprot.writeMessageBegin('addBadInventory', TMessageType.CALL, self._seqid)
1391
    args = addBadInventory_args()
1392
    args.itemId = itemId
1393
    args.warehouseId = warehouseId
1394
    args.quantity = quantity
1395
    args.write(self._oprot)
1396
    self._oprot.writeMessageEnd()
1397
    self._oprot.trans.flush()
1398
 
1399
  def recv_addBadInventory(self, ):
1400
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1401
    if mtype == TMessageType.EXCEPTION:
1402
      x = TApplicationException()
1403
      x.read(self._iprot)
1404
      self._iprot.readMessageEnd()
1405
      raise x
1406
    result = addBadInventory_result()
1407
    result.read(self._iprot)
1408
    self._iprot.readMessageEnd()
1409
    if result.cex is not None:
1410
      raise result.cex
1411
    return
1412
 
1413
  def getShippingLocations(self, ):
1414
    """
1415
    Returns all shipping locations
1416
    """
1417
    self.send_getShippingLocations()
1418
    return self.recv_getShippingLocations()
1419
 
1420
  def send_getShippingLocations(self, ):
1421
    self._oprot.writeMessageBegin('getShippingLocations', TMessageType.CALL, self._seqid)
1422
    args = getShippingLocations_args()
1423
    args.write(self._oprot)
1424
    self._oprot.writeMessageEnd()
1425
    self._oprot.trans.flush()
1426
 
1427
  def recv_getShippingLocations(self, ):
1428
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1429
    if mtype == TMessageType.EXCEPTION:
1430
      x = TApplicationException()
1431
      x.read(self._iprot)
1432
      self._iprot.readMessageEnd()
1433
      raise x
1434
    result = getShippingLocations_result()
1435
    result.read(self._iprot)
1436
    self._iprot.readMessageEnd()
1437
    if result.success is not None:
1438
      return result.success
1439
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShippingLocations failed: unknown result");
1440
 
1441
  def getAllVendorItemMappings(self, ):
1442
    """
1443
    Fetches all the vendor item mappings present.
1444
    """
1445
    self.send_getAllVendorItemMappings()
1446
    return self.recv_getAllVendorItemMappings()
1447
 
1448
  def send_getAllVendorItemMappings(self, ):
1449
    self._oprot.writeMessageBegin('getAllVendorItemMappings', TMessageType.CALL, self._seqid)
1450
    args = getAllVendorItemMappings_args()
1451
    args.write(self._oprot)
1452
    self._oprot.writeMessageEnd()
1453
    self._oprot.trans.flush()
1454
 
1455
  def recv_getAllVendorItemMappings(self, ):
1456
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1457
    if mtype == TMessageType.EXCEPTION:
1458
      x = TApplicationException()
1459
      x.read(self._iprot)
1460
      self._iprot.readMessageEnd()
1461
      raise x
1462
    result = getAllVendorItemMappings_result()
1463
    result.read(self._iprot)
1464
    self._iprot.readMessageEnd()
1465
    if result.success is not None:
1466
      return result.success
1467
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllVendorItemMappings failed: unknown result");
1468
 
1469
  def getInventorySnapshot(self, warehouseId):
1470
    """
1471
    Gets items' inventory for a warehouse
1472
    If warehouse is passed as zero, items' inventory across all warehouses is sent
1473
 
1474
    Parameters:
1475
     - warehouseId
1476
    """
1477
    self.send_getInventorySnapshot(warehouseId)
1478
    return self.recv_getInventorySnapshot()
1479
 
1480
  def send_getInventorySnapshot(self, warehouseId):
1481
    self._oprot.writeMessageBegin('getInventorySnapshot', TMessageType.CALL, self._seqid)
1482
    args = getInventorySnapshot_args()
1483
    args.warehouseId = warehouseId
1484
    args.write(self._oprot)
1485
    self._oprot.writeMessageEnd()
1486
    self._oprot.trans.flush()
1487
 
1488
  def recv_getInventorySnapshot(self, ):
1489
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1490
    if mtype == TMessageType.EXCEPTION:
1491
      x = TApplicationException()
1492
      x.read(self._iprot)
1493
      self._iprot.readMessageEnd()
1494
      raise x
1495
    result = getInventorySnapshot_result()
1496
    result.read(self._iprot)
1497
    self._iprot.readMessageEnd()
1498
    if result.success is not None:
1499
      return result.success
1500
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInventorySnapshot failed: unknown result");
1501
 
1502
  def clearItemAvailabilityCache(self, ):
1503
    """
1504
    Clear item availability cache.
1505
    """
1506
    self.send_clearItemAvailabilityCache()
1507
    self.recv_clearItemAvailabilityCache()
1508
 
1509
  def send_clearItemAvailabilityCache(self, ):
1510
    self._oprot.writeMessageBegin('clearItemAvailabilityCache', TMessageType.CALL, self._seqid)
1511
    args = clearItemAvailabilityCache_args()
1512
    args.write(self._oprot)
1513
    self._oprot.writeMessageEnd()
1514
    self._oprot.trans.flush()
1515
 
1516
  def recv_clearItemAvailabilityCache(self, ):
1517
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1518
    if mtype == TMessageType.EXCEPTION:
1519
      x = TApplicationException()
1520
      x.read(self._iprot)
1521
      self._iprot.readMessageEnd()
1522
      raise x
1523
    result = clearItemAvailabilityCache_result()
1524
    result.read(self._iprot)
1525
    self._iprot.readMessageEnd()
1526
    return
1527
 
1528
  def updateVendorString(self, warehouseId, vendorString):
1529
    """
1530
    Parameters:
1531
     - warehouseId
1532
     - vendorString
1533
    """
1534
    self.send_updateVendorString(warehouseId, vendorString)
1535
    self.recv_updateVendorString()
1536
 
1537
  def send_updateVendorString(self, warehouseId, vendorString):
1538
    self._oprot.writeMessageBegin('updateVendorString', TMessageType.CALL, self._seqid)
1539
    args = updateVendorString_args()
1540
    args.warehouseId = warehouseId
1541
    args.vendorString = vendorString
1542
    args.write(self._oprot)
1543
    self._oprot.writeMessageEnd()
1544
    self._oprot.trans.flush()
1545
 
1546
  def recv_updateVendorString(self, ):
1547
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1548
    if mtype == TMessageType.EXCEPTION:
1549
      x = TApplicationException()
1550
      x.read(self._iprot)
1551
      self._iprot.readMessageEnd()
1552
      raise x
1553
    result = updateVendorString_result()
1554
    result.read(self._iprot)
1555
    self._iprot.readMessageEnd()
1556
    return
1557
 
1558
 
1559
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1560
  def __init__(self, handler):
1561
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1562
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
1563
    self._processMap["addVendor"] = Processor.process_addVendor
1564
    self._processMap["updateInventoryHistory"] = Processor.process_updateInventoryHistory
1565
    self._processMap["updateInventory"] = Processor.process_updateInventory
1566
    self._processMap["addInventory"] = Processor.process_addInventory
1567
    self._processMap["retireWarehouse"] = Processor.process_retireWarehouse
1568
    self._processMap["getItemInventoryByItemId"] = Processor.process_getItemInventoryByItemId
1569
    self._processMap["getItemAvailibilityAtWarehouse"] = Processor.process_getItemAvailibilityAtWarehouse
1570
    self._processMap["getItemAvailabilityAtLocation"] = Processor.process_getItemAvailabilityAtLocation
1571
    self._processMap["getAllWarehouses"] = Processor.process_getAllWarehouses
1572
    self._processMap["getWarehouse"] = Processor.process_getWarehouse
1573
    self._processMap["getAllItemsForWarehouse"] = Processor.process_getAllItemsForWarehouse
5966 rajveer 1574
    self._processMap["isOrderBillable"] = Processor.process_isOrderBillable
5944 mandeep.dh 1575
    self._processMap["reserveItemInWarehouse"] = Processor.process_reserveItemInWarehouse
1576
    self._processMap["reduceReservationCount"] = Processor.process_reduceReservationCount
1577
    self._processMap["getItemPricing"] = Processor.process_getItemPricing
1578
    self._processMap["getAllItemPricing"] = Processor.process_getAllItemPricing
1579
    self._processMap["addVendorItemPricing"] = Processor.process_addVendorItemPricing
1580
    self._processMap["getVendor"] = Processor.process_getVendor
1581
    self._processMap["getAllVendors"] = Processor.process_getAllVendors
1582
    self._processMap["addVendorItemMapping"] = Processor.process_addVendorItemMapping
1583
    self._processMap["getVendorItemMappings"] = Processor.process_getVendorItemMappings
1584
    self._processMap["getPendingOrdersInventory"] = Processor.process_getPendingOrdersInventory
1585
    self._processMap["getWarehouses"] = Processor.process_getWarehouses
1586
    self._processMap["resetAvailability"] = Processor.process_resetAvailability
1587
    self._processMap["resetAvailabilityForWarehouse"] = Processor.process_resetAvailabilityForWarehouse
1588
    self._processMap["getItemKeysToBeProcessed"] = Processor.process_getItemKeysToBeProcessed
1589
    self._processMap["markMissedInventoryUpdatesAsProcessed"] = Processor.process_markMissedInventoryUpdatesAsProcessed
1590
    self._processMap["getIgnoredItemKeys"] = Processor.process_getIgnoredItemKeys
1591
    self._processMap["addBadInventory"] = Processor.process_addBadInventory
1592
    self._processMap["getShippingLocations"] = Processor.process_getShippingLocations
1593
    self._processMap["getAllVendorItemMappings"] = Processor.process_getAllVendorItemMappings
1594
    self._processMap["getInventorySnapshot"] = Processor.process_getInventorySnapshot
1595
    self._processMap["clearItemAvailabilityCache"] = Processor.process_clearItemAvailabilityCache
1596
    self._processMap["updateVendorString"] = Processor.process_updateVendorString
1597
 
1598
  def process(self, iprot, oprot):
1599
    (name, type, seqid) = iprot.readMessageBegin()
1600
    if name not in self._processMap:
1601
      iprot.skip(TType.STRUCT)
1602
      iprot.readMessageEnd()
1603
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
1604
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
1605
      x.write(oprot)
1606
      oprot.writeMessageEnd()
1607
      oprot.trans.flush()
1608
      return
1609
    else:
1610
      self._processMap[name](self, seqid, iprot, oprot)
1611
    return True
1612
 
1613
  def process_addWarehouse(self, seqid, iprot, oprot):
1614
    args = addWarehouse_args()
1615
    args.read(iprot)
1616
    iprot.readMessageEnd()
1617
    result = addWarehouse_result()
1618
    try:
1619
      result.success = self._handler.addWarehouse(args.warehouse)
1620
    except InventoryServiceException, cex:
1621
      result.cex = cex
1622
    oprot.writeMessageBegin("addWarehouse", TMessageType.REPLY, seqid)
1623
    result.write(oprot)
1624
    oprot.writeMessageEnd()
1625
    oprot.trans.flush()
1626
 
1627
  def process_addVendor(self, seqid, iprot, oprot):
1628
    args = addVendor_args()
1629
    args.read(iprot)
1630
    iprot.readMessageEnd()
1631
    result = addVendor_result()
1632
    try:
1633
      result.success = self._handler.addVendor(args.vendor)
1634
    except InventoryServiceException, cex:
1635
      result.cex = cex
1636
    oprot.writeMessageBegin("addVendor", TMessageType.REPLY, seqid)
1637
    result.write(oprot)
1638
    oprot.writeMessageEnd()
1639
    oprot.trans.flush()
1640
 
1641
  def process_updateInventoryHistory(self, seqid, iprot, oprot):
1642
    args = updateInventoryHistory_args()
1643
    args.read(iprot)
1644
    iprot.readMessageEnd()
1645
    result = updateInventoryHistory_result()
1646
    try:
1647
      self._handler.updateInventoryHistory(args.warehouse_id, args.timestamp, args.availability)
1648
    except InventoryServiceException, cex:
1649
      result.cex = cex
1650
    oprot.writeMessageBegin("updateInventoryHistory", TMessageType.REPLY, seqid)
1651
    result.write(oprot)
1652
    oprot.writeMessageEnd()
1653
    oprot.trans.flush()
1654
 
1655
  def process_updateInventory(self, seqid, iprot, oprot):
1656
    args = updateInventory_args()
1657
    args.read(iprot)
1658
    iprot.readMessageEnd()
1659
    result = updateInventory_result()
1660
    try:
1661
      self._handler.updateInventory(args.warehouse_id, args.timestamp, args.availability)
1662
    except InventoryServiceException, cex:
1663
      result.cex = cex
1664
    oprot.writeMessageBegin("updateInventory", TMessageType.REPLY, seqid)
1665
    result.write(oprot)
1666
    oprot.writeMessageEnd()
1667
    oprot.trans.flush()
1668
 
1669
  def process_addInventory(self, seqid, iprot, oprot):
1670
    args = addInventory_args()
1671
    args.read(iprot)
1672
    iprot.readMessageEnd()
1673
    result = addInventory_result()
1674
    try:
1675
      self._handler.addInventory(args.itemId, args.warehouseId, args.quantity)
1676
    except InventoryServiceException, cex:
1677
      result.cex = cex
1678
    oprot.writeMessageBegin("addInventory", TMessageType.REPLY, seqid)
1679
    result.write(oprot)
1680
    oprot.writeMessageEnd()
1681
    oprot.trans.flush()
1682
 
1683
  def process_retireWarehouse(self, seqid, iprot, oprot):
1684
    args = retireWarehouse_args()
1685
    args.read(iprot)
1686
    iprot.readMessageEnd()
1687
    result = retireWarehouse_result()
1688
    try:
1689
      self._handler.retireWarehouse(args.warehouse_id)
1690
    except InventoryServiceException, cex:
1691
      result.cex = cex
1692
    oprot.writeMessageBegin("retireWarehouse", TMessageType.REPLY, seqid)
1693
    result.write(oprot)
1694
    oprot.writeMessageEnd()
1695
    oprot.trans.flush()
1696
 
1697
  def process_getItemInventoryByItemId(self, seqid, iprot, oprot):
1698
    args = getItemInventoryByItemId_args()
1699
    args.read(iprot)
1700
    iprot.readMessageEnd()
1701
    result = getItemInventoryByItemId_result()
1702
    try:
1703
      result.success = self._handler.getItemInventoryByItemId(args.item_id)
1704
    except InventoryServiceException, cex:
1705
      result.cex = cex
1706
    oprot.writeMessageBegin("getItemInventoryByItemId", TMessageType.REPLY, seqid)
1707
    result.write(oprot)
1708
    oprot.writeMessageEnd()
1709
    oprot.trans.flush()
1710
 
1711
  def process_getItemAvailibilityAtWarehouse(self, seqid, iprot, oprot):
1712
    args = getItemAvailibilityAtWarehouse_args()
1713
    args.read(iprot)
1714
    iprot.readMessageEnd()
1715
    result = getItemAvailibilityAtWarehouse_result()
1716
    try:
1717
      result.success = self._handler.getItemAvailibilityAtWarehouse(args.warehouse_id, args.item_id)
1718
    except InventoryServiceException, cex:
1719
      result.cex = cex
1720
    oprot.writeMessageBegin("getItemAvailibilityAtWarehouse", TMessageType.REPLY, seqid)
1721
    result.write(oprot)
1722
    oprot.writeMessageEnd()
1723
    oprot.trans.flush()
1724
 
1725
  def process_getItemAvailabilityAtLocation(self, seqid, iprot, oprot):
1726
    args = getItemAvailabilityAtLocation_args()
1727
    args.read(iprot)
1728
    iprot.readMessageEnd()
1729
    result = getItemAvailabilityAtLocation_result()
1730
    try:
1731
      result.success = self._handler.getItemAvailabilityAtLocation(args.itemId)
1732
    except InventoryServiceException, isex:
1733
      result.isex = isex
1734
    oprot.writeMessageBegin("getItemAvailabilityAtLocation", TMessageType.REPLY, seqid)
1735
    result.write(oprot)
1736
    oprot.writeMessageEnd()
1737
    oprot.trans.flush()
1738
 
1739
  def process_getAllWarehouses(self, seqid, iprot, oprot):
1740
    args = getAllWarehouses_args()
1741
    args.read(iprot)
1742
    iprot.readMessageEnd()
1743
    result = getAllWarehouses_result()
1744
    try:
1745
      result.success = self._handler.getAllWarehouses(args.isActive)
1746
    except InventoryServiceException, cex:
1747
      result.cex = cex
1748
    oprot.writeMessageBegin("getAllWarehouses", TMessageType.REPLY, seqid)
1749
    result.write(oprot)
1750
    oprot.writeMessageEnd()
1751
    oprot.trans.flush()
1752
 
1753
  def process_getWarehouse(self, seqid, iprot, oprot):
1754
    args = getWarehouse_args()
1755
    args.read(iprot)
1756
    iprot.readMessageEnd()
1757
    result = getWarehouse_result()
1758
    try:
1759
      result.success = self._handler.getWarehouse(args.warehouse_id)
1760
    except InventoryServiceException, cex:
1761
      result.cex = cex
1762
    oprot.writeMessageBegin("getWarehouse", TMessageType.REPLY, seqid)
1763
    result.write(oprot)
1764
    oprot.writeMessageEnd()
1765
    oprot.trans.flush()
1766
 
1767
  def process_getAllItemsForWarehouse(self, seqid, iprot, oprot):
1768
    args = getAllItemsForWarehouse_args()
1769
    args.read(iprot)
1770
    iprot.readMessageEnd()
1771
    result = getAllItemsForWarehouse_result()
1772
    try:
1773
      result.success = self._handler.getAllItemsForWarehouse(args.warehouse_id)
1774
    except InventoryServiceException, cex:
1775
      result.cex = cex
1776
    oprot.writeMessageBegin("getAllItemsForWarehouse", TMessageType.REPLY, seqid)
1777
    result.write(oprot)
1778
    oprot.writeMessageEnd()
1779
    oprot.trans.flush()
1780
 
5966 rajveer 1781
  def process_isOrderBillable(self, seqid, iprot, oprot):
1782
    args = isOrderBillable_args()
1783
    args.read(iprot)
1784
    iprot.readMessageEnd()
1785
    result = isOrderBillable_result()
1786
    result.success = self._handler.isOrderBillable(args.itemId, args.warehouseId, args.sourceId, args.orderId)
1787
    oprot.writeMessageBegin("isOrderBillable", TMessageType.REPLY, seqid)
1788
    result.write(oprot)
1789
    oprot.writeMessageEnd()
1790
    oprot.trans.flush()
1791
 
5944 mandeep.dh 1792
  def process_reserveItemInWarehouse(self, seqid, iprot, oprot):
1793
    args = reserveItemInWarehouse_args()
1794
    args.read(iprot)
1795
    iprot.readMessageEnd()
1796
    result = reserveItemInWarehouse_result()
1797
    try:
5966 rajveer 1798
      result.success = self._handler.reserveItemInWarehouse(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.createdTimestamp, args.promisedShippingTimestamp, args.quantity)
5944 mandeep.dh 1799
    except InventoryServiceException, cex:
1800
      result.cex = cex
1801
    oprot.writeMessageBegin("reserveItemInWarehouse", TMessageType.REPLY, seqid)
1802
    result.write(oprot)
1803
    oprot.writeMessageEnd()
1804
    oprot.trans.flush()
1805
 
1806
  def process_reduceReservationCount(self, seqid, iprot, oprot):
1807
    args = reduceReservationCount_args()
1808
    args.read(iprot)
1809
    iprot.readMessageEnd()
1810
    result = reduceReservationCount_result()
1811
    try:
5966 rajveer 1812
      result.success = self._handler.reduceReservationCount(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.quantity)
5944 mandeep.dh 1813
    except InventoryServiceException, cex:
1814
      result.cex = cex
1815
    oprot.writeMessageBegin("reduceReservationCount", TMessageType.REPLY, seqid)
1816
    result.write(oprot)
1817
    oprot.writeMessageEnd()
1818
    oprot.trans.flush()
1819
 
1820
  def process_getItemPricing(self, seqid, iprot, oprot):
1821
    args = getItemPricing_args()
1822
    args.read(iprot)
1823
    iprot.readMessageEnd()
1824
    result = getItemPricing_result()
1825
    try:
1826
      result.success = self._handler.getItemPricing(args.itemId, args.vendorId)
1827
    except InventoryServiceException, cex:
1828
      result.cex = cex
1829
    oprot.writeMessageBegin("getItemPricing", TMessageType.REPLY, seqid)
1830
    result.write(oprot)
1831
    oprot.writeMessageEnd()
1832
    oprot.trans.flush()
1833
 
1834
  def process_getAllItemPricing(self, seqid, iprot, oprot):
1835
    args = getAllItemPricing_args()
1836
    args.read(iprot)
1837
    iprot.readMessageEnd()
1838
    result = getAllItemPricing_result()
1839
    try:
1840
      result.success = self._handler.getAllItemPricing(args.itemId)
1841
    except InventoryServiceException, cex:
1842
      result.cex = cex
1843
    oprot.writeMessageBegin("getAllItemPricing", TMessageType.REPLY, seqid)
1844
    result.write(oprot)
1845
    oprot.writeMessageEnd()
1846
    oprot.trans.flush()
1847
 
1848
  def process_addVendorItemPricing(self, seqid, iprot, oprot):
1849
    args = addVendorItemPricing_args()
1850
    args.read(iprot)
1851
    iprot.readMessageEnd()
1852
    result = addVendorItemPricing_result()
1853
    try:
1854
      self._handler.addVendorItemPricing(args.vendorItemPricing)
1855
    except InventoryServiceException, cex:
1856
      result.cex = cex
1857
    oprot.writeMessageBegin("addVendorItemPricing", TMessageType.REPLY, seqid)
1858
    result.write(oprot)
1859
    oprot.writeMessageEnd()
1860
    oprot.trans.flush()
1861
 
1862
  def process_getVendor(self, seqid, iprot, oprot):
1863
    args = getVendor_args()
1864
    args.read(iprot)
1865
    iprot.readMessageEnd()
1866
    result = getVendor_result()
1867
    result.success = self._handler.getVendor(args.vendorId)
1868
    oprot.writeMessageBegin("getVendor", TMessageType.REPLY, seqid)
1869
    result.write(oprot)
1870
    oprot.writeMessageEnd()
1871
    oprot.trans.flush()
1872
 
1873
  def process_getAllVendors(self, seqid, iprot, oprot):
1874
    args = getAllVendors_args()
1875
    args.read(iprot)
1876
    iprot.readMessageEnd()
1877
    result = getAllVendors_result()
1878
    result.success = self._handler.getAllVendors()
1879
    oprot.writeMessageBegin("getAllVendors", TMessageType.REPLY, seqid)
1880
    result.write(oprot)
1881
    oprot.writeMessageEnd()
1882
    oprot.trans.flush()
1883
 
1884
  def process_addVendorItemMapping(self, seqid, iprot, oprot):
1885
    args = addVendorItemMapping_args()
1886
    args.read(iprot)
1887
    iprot.readMessageEnd()
1888
    result = addVendorItemMapping_result()
1889
    try:
1890
      self._handler.addVendorItemMapping(args.key, args.vendorItemMapping)
1891
    except InventoryServiceException, cex:
1892
      result.cex = cex
1893
    oprot.writeMessageBegin("addVendorItemMapping", TMessageType.REPLY, seqid)
1894
    result.write(oprot)
1895
    oprot.writeMessageEnd()
1896
    oprot.trans.flush()
1897
 
1898
  def process_getVendorItemMappings(self, seqid, iprot, oprot):
1899
    args = getVendorItemMappings_args()
1900
    args.read(iprot)
1901
    iprot.readMessageEnd()
1902
    result = getVendorItemMappings_result()
1903
    try:
1904
      result.success = self._handler.getVendorItemMappings(args.itemId)
1905
    except InventoryServiceException, cex:
1906
      result.cex = cex
1907
    oprot.writeMessageBegin("getVendorItemMappings", TMessageType.REPLY, seqid)
1908
    result.write(oprot)
1909
    oprot.writeMessageEnd()
1910
    oprot.trans.flush()
1911
 
1912
  def process_getPendingOrdersInventory(self, seqid, iprot, oprot):
1913
    args = getPendingOrdersInventory_args()
1914
    args.read(iprot)
1915
    iprot.readMessageEnd()
1916
    result = getPendingOrdersInventory_result()
1917
    result.success = self._handler.getPendingOrdersInventory(args.vendorid)
1918
    oprot.writeMessageBegin("getPendingOrdersInventory", TMessageType.REPLY, seqid)
1919
    result.write(oprot)
1920
    oprot.writeMessageEnd()
1921
    oprot.trans.flush()
1922
 
1923
  def process_getWarehouses(self, seqid, iprot, oprot):
1924
    args = getWarehouses_args()
1925
    args.read(iprot)
1926
    iprot.readMessageEnd()
1927
    result = getWarehouses_result()
1928
    result.success = self._handler.getWarehouses(args.warehouseType, args.inventoryType, args.vendorId, args.billingWarehouseId, args.shippingWarehouseId)
1929
    oprot.writeMessageBegin("getWarehouses", TMessageType.REPLY, seqid)
1930
    result.write(oprot)
1931
    oprot.writeMessageEnd()
1932
    oprot.trans.flush()
1933
 
1934
  def process_resetAvailability(self, seqid, iprot, oprot):
1935
    args = resetAvailability_args()
1936
    args.read(iprot)
1937
    iprot.readMessageEnd()
1938
    result = resetAvailability_result()
1939
    try:
1940
      self._handler.resetAvailability(args.itemKey, args.vendorId, args.quantity, args.warehouseId)
1941
    except InventoryServiceException, cex:
1942
      result.cex = cex
1943
    oprot.writeMessageBegin("resetAvailability", TMessageType.REPLY, seqid)
1944
    result.write(oprot)
1945
    oprot.writeMessageEnd()
1946
    oprot.trans.flush()
1947
 
1948
  def process_resetAvailabilityForWarehouse(self, seqid, iprot, oprot):
1949
    args = resetAvailabilityForWarehouse_args()
1950
    args.read(iprot)
1951
    iprot.readMessageEnd()
1952
    result = resetAvailabilityForWarehouse_result()
1953
    try:
1954
      self._handler.resetAvailabilityForWarehouse(args.warehouseId)
1955
    except InventoryServiceException, cex:
1956
      result.cex = cex
1957
    oprot.writeMessageBegin("resetAvailabilityForWarehouse", TMessageType.REPLY, seqid)
1958
    result.write(oprot)
1959
    oprot.writeMessageEnd()
1960
    oprot.trans.flush()
1961
 
1962
  def process_getItemKeysToBeProcessed(self, seqid, iprot, oprot):
1963
    args = getItemKeysToBeProcessed_args()
1964
    args.read(iprot)
1965
    iprot.readMessageEnd()
1966
    result = getItemKeysToBeProcessed_result()
1967
    result.success = self._handler.getItemKeysToBeProcessed(args.warehouseId)
1968
    oprot.writeMessageBegin("getItemKeysToBeProcessed", TMessageType.REPLY, seqid)
1969
    result.write(oprot)
1970
    oprot.writeMessageEnd()
1971
    oprot.trans.flush()
1972
 
1973
  def process_markMissedInventoryUpdatesAsProcessed(self, seqid, iprot, oprot):
1974
    args = markMissedInventoryUpdatesAsProcessed_args()
1975
    args.read(iprot)
1976
    iprot.readMessageEnd()
1977
    result = markMissedInventoryUpdatesAsProcessed_result()
1978
    self._handler.markMissedInventoryUpdatesAsProcessed(args.itemKey, args.warehouseId)
1979
    oprot.writeMessageBegin("markMissedInventoryUpdatesAsProcessed", TMessageType.REPLY, seqid)
1980
    result.write(oprot)
1981
    oprot.writeMessageEnd()
1982
    oprot.trans.flush()
1983
 
1984
  def process_getIgnoredItemKeys(self, seqid, iprot, oprot):
1985
    args = getIgnoredItemKeys_args()
1986
    args.read(iprot)
1987
    iprot.readMessageEnd()
1988
    result = getIgnoredItemKeys_result()
1989
    result.success = self._handler.getIgnoredItemKeys()
1990
    oprot.writeMessageBegin("getIgnoredItemKeys", TMessageType.REPLY, seqid)
1991
    result.write(oprot)
1992
    oprot.writeMessageEnd()
1993
    oprot.trans.flush()
1994
 
1995
  def process_addBadInventory(self, seqid, iprot, oprot):
1996
    args = addBadInventory_args()
1997
    args.read(iprot)
1998
    iprot.readMessageEnd()
1999
    result = addBadInventory_result()
2000
    try:
2001
      self._handler.addBadInventory(args.itemId, args.warehouseId, args.quantity)
2002
    except InventoryServiceException, cex:
2003
      result.cex = cex
2004
    oprot.writeMessageBegin("addBadInventory", TMessageType.REPLY, seqid)
2005
    result.write(oprot)
2006
    oprot.writeMessageEnd()
2007
    oprot.trans.flush()
2008
 
2009
  def process_getShippingLocations(self, seqid, iprot, oprot):
2010
    args = getShippingLocations_args()
2011
    args.read(iprot)
2012
    iprot.readMessageEnd()
2013
    result = getShippingLocations_result()
2014
    result.success = self._handler.getShippingLocations()
2015
    oprot.writeMessageBegin("getShippingLocations", TMessageType.REPLY, seqid)
2016
    result.write(oprot)
2017
    oprot.writeMessageEnd()
2018
    oprot.trans.flush()
2019
 
2020
  def process_getAllVendorItemMappings(self, seqid, iprot, oprot):
2021
    args = getAllVendorItemMappings_args()
2022
    args.read(iprot)
2023
    iprot.readMessageEnd()
2024
    result = getAllVendorItemMappings_result()
2025
    result.success = self._handler.getAllVendorItemMappings()
2026
    oprot.writeMessageBegin("getAllVendorItemMappings", TMessageType.REPLY, seqid)
2027
    result.write(oprot)
2028
    oprot.writeMessageEnd()
2029
    oprot.trans.flush()
2030
 
2031
  def process_getInventorySnapshot(self, seqid, iprot, oprot):
2032
    args = getInventorySnapshot_args()
2033
    args.read(iprot)
2034
    iprot.readMessageEnd()
2035
    result = getInventorySnapshot_result()
2036
    result.success = self._handler.getInventorySnapshot(args.warehouseId)
2037
    oprot.writeMessageBegin("getInventorySnapshot", TMessageType.REPLY, seqid)
2038
    result.write(oprot)
2039
    oprot.writeMessageEnd()
2040
    oprot.trans.flush()
2041
 
2042
  def process_clearItemAvailabilityCache(self, seqid, iprot, oprot):
2043
    args = clearItemAvailabilityCache_args()
2044
    args.read(iprot)
2045
    iprot.readMessageEnd()
2046
    result = clearItemAvailabilityCache_result()
2047
    self._handler.clearItemAvailabilityCache()
2048
    oprot.writeMessageBegin("clearItemAvailabilityCache", TMessageType.REPLY, seqid)
2049
    result.write(oprot)
2050
    oprot.writeMessageEnd()
2051
    oprot.trans.flush()
2052
 
2053
  def process_updateVendorString(self, seqid, iprot, oprot):
2054
    args = updateVendorString_args()
2055
    args.read(iprot)
2056
    iprot.readMessageEnd()
2057
    result = updateVendorString_result()
2058
    self._handler.updateVendorString(args.warehouseId, args.vendorString)
2059
    oprot.writeMessageBegin("updateVendorString", TMessageType.REPLY, seqid)
2060
    result.write(oprot)
2061
    oprot.writeMessageEnd()
2062
    oprot.trans.flush()
2063
 
2064
 
2065
# HELPER FUNCTIONS AND STRUCTURES
2066
 
2067
class addWarehouse_args:
2068
  """
2069
  Attributes:
2070
   - warehouse
2071
  """
2072
 
2073
  thrift_spec = (
2074
    None, # 0
2075
    (1, TType.STRUCT, 'warehouse', (Warehouse, Warehouse.thrift_spec), None, ), # 1
2076
  )
2077
 
2078
  def __init__(self, warehouse=None,):
2079
    self.warehouse = warehouse
2080
 
2081
  def read(self, iprot):
2082
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2083
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2084
      return
2085
    iprot.readStructBegin()
2086
    while True:
2087
      (fname, ftype, fid) = iprot.readFieldBegin()
2088
      if ftype == TType.STOP:
2089
        break
2090
      if fid == 1:
2091
        if ftype == TType.STRUCT:
2092
          self.warehouse = Warehouse()
2093
          self.warehouse.read(iprot)
2094
        else:
2095
          iprot.skip(ftype)
2096
      else:
2097
        iprot.skip(ftype)
2098
      iprot.readFieldEnd()
2099
    iprot.readStructEnd()
2100
 
2101
  def write(self, oprot):
2102
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2103
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2104
      return
2105
    oprot.writeStructBegin('addWarehouse_args')
2106
    if self.warehouse is not None:
2107
      oprot.writeFieldBegin('warehouse', TType.STRUCT, 1)
2108
      self.warehouse.write(oprot)
2109
      oprot.writeFieldEnd()
2110
    oprot.writeFieldStop()
2111
    oprot.writeStructEnd()
2112
 
2113
  def validate(self):
2114
    return
2115
 
2116
 
2117
  def __repr__(self):
2118
    L = ['%s=%r' % (key, value)
2119
      for key, value in self.__dict__.iteritems()]
2120
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2121
 
2122
  def __eq__(self, other):
2123
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2124
 
2125
  def __ne__(self, other):
2126
    return not (self == other)
2127
 
2128
class addWarehouse_result:
2129
  """
2130
  Attributes:
2131
   - success
2132
   - cex
2133
  """
2134
 
2135
  thrift_spec = (
2136
    (0, TType.I64, 'success', None, None, ), # 0
2137
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
2138
  )
2139
 
2140
  def __init__(self, success=None, cex=None,):
2141
    self.success = success
2142
    self.cex = cex
2143
 
2144
  def read(self, iprot):
2145
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2146
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2147
      return
2148
    iprot.readStructBegin()
2149
    while True:
2150
      (fname, ftype, fid) = iprot.readFieldBegin()
2151
      if ftype == TType.STOP:
2152
        break
2153
      if fid == 0:
2154
        if ftype == TType.I64:
2155
          self.success = iprot.readI64();
2156
        else:
2157
          iprot.skip(ftype)
2158
      elif fid == 1:
2159
        if ftype == TType.STRUCT:
2160
          self.cex = InventoryServiceException()
2161
          self.cex.read(iprot)
2162
        else:
2163
          iprot.skip(ftype)
2164
      else:
2165
        iprot.skip(ftype)
2166
      iprot.readFieldEnd()
2167
    iprot.readStructEnd()
2168
 
2169
  def write(self, oprot):
2170
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2171
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2172
      return
2173
    oprot.writeStructBegin('addWarehouse_result')
2174
    if self.success is not None:
2175
      oprot.writeFieldBegin('success', TType.I64, 0)
2176
      oprot.writeI64(self.success)
2177
      oprot.writeFieldEnd()
2178
    if self.cex is not None:
2179
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
2180
      self.cex.write(oprot)
2181
      oprot.writeFieldEnd()
2182
    oprot.writeFieldStop()
2183
    oprot.writeStructEnd()
2184
 
2185
  def validate(self):
2186
    return
2187
 
2188
 
2189
  def __repr__(self):
2190
    L = ['%s=%r' % (key, value)
2191
      for key, value in self.__dict__.iteritems()]
2192
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2193
 
2194
  def __eq__(self, other):
2195
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2196
 
2197
  def __ne__(self, other):
2198
    return not (self == other)
2199
 
2200
class addVendor_args:
2201
  """
2202
  Attributes:
2203
   - vendor
2204
  """
2205
 
2206
  thrift_spec = (
2207
    None, # 0
2208
    (1, TType.STRUCT, 'vendor', (Vendor, Vendor.thrift_spec), None, ), # 1
2209
  )
2210
 
2211
  def __init__(self, vendor=None,):
2212
    self.vendor = vendor
2213
 
2214
  def read(self, iprot):
2215
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2216
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2217
      return
2218
    iprot.readStructBegin()
2219
    while True:
2220
      (fname, ftype, fid) = iprot.readFieldBegin()
2221
      if ftype == TType.STOP:
2222
        break
2223
      if fid == 1:
2224
        if ftype == TType.STRUCT:
2225
          self.vendor = Vendor()
2226
          self.vendor.read(iprot)
2227
        else:
2228
          iprot.skip(ftype)
2229
      else:
2230
        iprot.skip(ftype)
2231
      iprot.readFieldEnd()
2232
    iprot.readStructEnd()
2233
 
2234
  def write(self, oprot):
2235
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2236
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2237
      return
2238
    oprot.writeStructBegin('addVendor_args')
2239
    if self.vendor is not None:
2240
      oprot.writeFieldBegin('vendor', TType.STRUCT, 1)
2241
      self.vendor.write(oprot)
2242
      oprot.writeFieldEnd()
2243
    oprot.writeFieldStop()
2244
    oprot.writeStructEnd()
2245
 
2246
  def validate(self):
2247
    return
2248
 
2249
 
2250
  def __repr__(self):
2251
    L = ['%s=%r' % (key, value)
2252
      for key, value in self.__dict__.iteritems()]
2253
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2254
 
2255
  def __eq__(self, other):
2256
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2257
 
2258
  def __ne__(self, other):
2259
    return not (self == other)
2260
 
2261
class addVendor_result:
2262
  """
2263
  Attributes:
2264
   - success
2265
   - cex
2266
  """
2267
 
2268
  thrift_spec = (
2269
    (0, TType.I64, 'success', None, None, ), # 0
2270
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
2271
  )
2272
 
2273
  def __init__(self, success=None, cex=None,):
2274
    self.success = success
2275
    self.cex = cex
2276
 
2277
  def read(self, iprot):
2278
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2279
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2280
      return
2281
    iprot.readStructBegin()
2282
    while True:
2283
      (fname, ftype, fid) = iprot.readFieldBegin()
2284
      if ftype == TType.STOP:
2285
        break
2286
      if fid == 0:
2287
        if ftype == TType.I64:
2288
          self.success = iprot.readI64();
2289
        else:
2290
          iprot.skip(ftype)
2291
      elif fid == 1:
2292
        if ftype == TType.STRUCT:
2293
          self.cex = InventoryServiceException()
2294
          self.cex.read(iprot)
2295
        else:
2296
          iprot.skip(ftype)
2297
      else:
2298
        iprot.skip(ftype)
2299
      iprot.readFieldEnd()
2300
    iprot.readStructEnd()
2301
 
2302
  def write(self, oprot):
2303
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2304
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2305
      return
2306
    oprot.writeStructBegin('addVendor_result')
2307
    if self.success is not None:
2308
      oprot.writeFieldBegin('success', TType.I64, 0)
2309
      oprot.writeI64(self.success)
2310
      oprot.writeFieldEnd()
2311
    if self.cex is not None:
2312
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
2313
      self.cex.write(oprot)
2314
      oprot.writeFieldEnd()
2315
    oprot.writeFieldStop()
2316
    oprot.writeStructEnd()
2317
 
2318
  def validate(self):
2319
    return
2320
 
2321
 
2322
  def __repr__(self):
2323
    L = ['%s=%r' % (key, value)
2324
      for key, value in self.__dict__.iteritems()]
2325
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2326
 
2327
  def __eq__(self, other):
2328
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2329
 
2330
  def __ne__(self, other):
2331
    return not (self == other)
2332
 
2333
class updateInventoryHistory_args:
2334
  """
2335
  Attributes:
2336
   - warehouse_id
2337
   - timestamp
2338
   - availability
2339
  """
2340
 
2341
  thrift_spec = (
2342
    None, # 0
2343
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
2344
    (2, TType.STRING, 'timestamp', None, None, ), # 2
2345
    (3, TType.MAP, 'availability', (TType.STRING,None,TType.I64,None), None, ), # 3
2346
  )
2347
 
2348
  def __init__(self, warehouse_id=None, timestamp=None, availability=None,):
2349
    self.warehouse_id = warehouse_id
2350
    self.timestamp = timestamp
2351
    self.availability = availability
2352
 
2353
  def read(self, iprot):
2354
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2355
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2356
      return
2357
    iprot.readStructBegin()
2358
    while True:
2359
      (fname, ftype, fid) = iprot.readFieldBegin()
2360
      if ftype == TType.STOP:
2361
        break
2362
      if fid == 1:
2363
        if ftype == TType.I64:
2364
          self.warehouse_id = iprot.readI64();
2365
        else:
2366
          iprot.skip(ftype)
2367
      elif fid == 2:
2368
        if ftype == TType.STRING:
2369
          self.timestamp = iprot.readString();
2370
        else:
2371
          iprot.skip(ftype)
2372
      elif fid == 3:
2373
        if ftype == TType.MAP:
2374
          self.availability = {}
2375
          (_ktype19, _vtype20, _size18 ) = iprot.readMapBegin() 
2376
          for _i22 in xrange(_size18):
2377
            _key23 = iprot.readString();
2378
            _val24 = iprot.readI64();
2379
            self.availability[_key23] = _val24
2380
          iprot.readMapEnd()
2381
        else:
2382
          iprot.skip(ftype)
2383
      else:
2384
        iprot.skip(ftype)
2385
      iprot.readFieldEnd()
2386
    iprot.readStructEnd()
2387
 
2388
  def write(self, oprot):
2389
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2390
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2391
      return
2392
    oprot.writeStructBegin('updateInventoryHistory_args')
2393
    if self.warehouse_id is not None:
2394
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
2395
      oprot.writeI64(self.warehouse_id)
2396
      oprot.writeFieldEnd()
2397
    if self.timestamp is not None:
2398
      oprot.writeFieldBegin('timestamp', TType.STRING, 2)
2399
      oprot.writeString(self.timestamp)
2400
      oprot.writeFieldEnd()
2401
    if self.availability is not None:
2402
      oprot.writeFieldBegin('availability', TType.MAP, 3)
2403
      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.availability))
2404
      for kiter25,viter26 in self.availability.items():
2405
        oprot.writeString(kiter25)
2406
        oprot.writeI64(viter26)
2407
      oprot.writeMapEnd()
2408
      oprot.writeFieldEnd()
2409
    oprot.writeFieldStop()
2410
    oprot.writeStructEnd()
2411
 
2412
  def validate(self):
2413
    return
2414
 
2415
 
2416
  def __repr__(self):
2417
    L = ['%s=%r' % (key, value)
2418
      for key, value in self.__dict__.iteritems()]
2419
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2420
 
2421
  def __eq__(self, other):
2422
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2423
 
2424
  def __ne__(self, other):
2425
    return not (self == other)
2426
 
2427
class updateInventoryHistory_result:
2428
  """
2429
  Attributes:
2430
   - cex
2431
  """
2432
 
2433
  thrift_spec = (
2434
    None, # 0
2435
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
2436
  )
2437
 
2438
  def __init__(self, cex=None,):
2439
    self.cex = cex
2440
 
2441
  def read(self, iprot):
2442
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2443
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2444
      return
2445
    iprot.readStructBegin()
2446
    while True:
2447
      (fname, ftype, fid) = iprot.readFieldBegin()
2448
      if ftype == TType.STOP:
2449
        break
2450
      if fid == 1:
2451
        if ftype == TType.STRUCT:
2452
          self.cex = InventoryServiceException()
2453
          self.cex.read(iprot)
2454
        else:
2455
          iprot.skip(ftype)
2456
      else:
2457
        iprot.skip(ftype)
2458
      iprot.readFieldEnd()
2459
    iprot.readStructEnd()
2460
 
2461
  def write(self, oprot):
2462
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2463
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2464
      return
2465
    oprot.writeStructBegin('updateInventoryHistory_result')
2466
    if self.cex is not None:
2467
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
2468
      self.cex.write(oprot)
2469
      oprot.writeFieldEnd()
2470
    oprot.writeFieldStop()
2471
    oprot.writeStructEnd()
2472
 
2473
  def validate(self):
2474
    return
2475
 
2476
 
2477
  def __repr__(self):
2478
    L = ['%s=%r' % (key, value)
2479
      for key, value in self.__dict__.iteritems()]
2480
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2481
 
2482
  def __eq__(self, other):
2483
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2484
 
2485
  def __ne__(self, other):
2486
    return not (self == other)
2487
 
2488
class updateInventory_args:
2489
  """
2490
  Attributes:
2491
   - warehouse_id
2492
   - timestamp
2493
   - availability
2494
  """
2495
 
2496
  thrift_spec = (
2497
    None, # 0
2498
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
2499
    (2, TType.STRING, 'timestamp', None, None, ), # 2
2500
    (3, TType.MAP, 'availability', (TType.STRING,None,TType.I64,None), None, ), # 3
2501
  )
2502
 
2503
  def __init__(self, warehouse_id=None, timestamp=None, availability=None,):
2504
    self.warehouse_id = warehouse_id
2505
    self.timestamp = timestamp
2506
    self.availability = availability
2507
 
2508
  def read(self, iprot):
2509
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2510
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2511
      return
2512
    iprot.readStructBegin()
2513
    while True:
2514
      (fname, ftype, fid) = iprot.readFieldBegin()
2515
      if ftype == TType.STOP:
2516
        break
2517
      if fid == 1:
2518
        if ftype == TType.I64:
2519
          self.warehouse_id = iprot.readI64();
2520
        else:
2521
          iprot.skip(ftype)
2522
      elif fid == 2:
2523
        if ftype == TType.STRING:
2524
          self.timestamp = iprot.readString();
2525
        else:
2526
          iprot.skip(ftype)
2527
      elif fid == 3:
2528
        if ftype == TType.MAP:
2529
          self.availability = {}
2530
          (_ktype28, _vtype29, _size27 ) = iprot.readMapBegin() 
2531
          for _i31 in xrange(_size27):
2532
            _key32 = iprot.readString();
2533
            _val33 = iprot.readI64();
2534
            self.availability[_key32] = _val33
2535
          iprot.readMapEnd()
2536
        else:
2537
          iprot.skip(ftype)
2538
      else:
2539
        iprot.skip(ftype)
2540
      iprot.readFieldEnd()
2541
    iprot.readStructEnd()
2542
 
2543
  def write(self, oprot):
2544
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2545
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2546
      return
2547
    oprot.writeStructBegin('updateInventory_args')
2548
    if self.warehouse_id is not None:
2549
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
2550
      oprot.writeI64(self.warehouse_id)
2551
      oprot.writeFieldEnd()
2552
    if self.timestamp is not None:
2553
      oprot.writeFieldBegin('timestamp', TType.STRING, 2)
2554
      oprot.writeString(self.timestamp)
2555
      oprot.writeFieldEnd()
2556
    if self.availability is not None:
2557
      oprot.writeFieldBegin('availability', TType.MAP, 3)
2558
      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.availability))
2559
      for kiter34,viter35 in self.availability.items():
2560
        oprot.writeString(kiter34)
2561
        oprot.writeI64(viter35)
2562
      oprot.writeMapEnd()
2563
      oprot.writeFieldEnd()
2564
    oprot.writeFieldStop()
2565
    oprot.writeStructEnd()
2566
 
2567
  def validate(self):
2568
    return
2569
 
2570
 
2571
  def __repr__(self):
2572
    L = ['%s=%r' % (key, value)
2573
      for key, value in self.__dict__.iteritems()]
2574
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2575
 
2576
  def __eq__(self, other):
2577
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2578
 
2579
  def __ne__(self, other):
2580
    return not (self == other)
2581
 
2582
class updateInventory_result:
2583
  """
2584
  Attributes:
2585
   - cex
2586
  """
2587
 
2588
  thrift_spec = (
2589
    None, # 0
2590
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
2591
  )
2592
 
2593
  def __init__(self, cex=None,):
2594
    self.cex = cex
2595
 
2596
  def read(self, iprot):
2597
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2598
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2599
      return
2600
    iprot.readStructBegin()
2601
    while True:
2602
      (fname, ftype, fid) = iprot.readFieldBegin()
2603
      if ftype == TType.STOP:
2604
        break
2605
      if fid == 1:
2606
        if ftype == TType.STRUCT:
2607
          self.cex = InventoryServiceException()
2608
          self.cex.read(iprot)
2609
        else:
2610
          iprot.skip(ftype)
2611
      else:
2612
        iprot.skip(ftype)
2613
      iprot.readFieldEnd()
2614
    iprot.readStructEnd()
2615
 
2616
  def write(self, oprot):
2617
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2618
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2619
      return
2620
    oprot.writeStructBegin('updateInventory_result')
2621
    if self.cex is not None:
2622
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
2623
      self.cex.write(oprot)
2624
      oprot.writeFieldEnd()
2625
    oprot.writeFieldStop()
2626
    oprot.writeStructEnd()
2627
 
2628
  def validate(self):
2629
    return
2630
 
2631
 
2632
  def __repr__(self):
2633
    L = ['%s=%r' % (key, value)
2634
      for key, value in self.__dict__.iteritems()]
2635
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2636
 
2637
  def __eq__(self, other):
2638
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2639
 
2640
  def __ne__(self, other):
2641
    return not (self == other)
2642
 
2643
class addInventory_args:
2644
  """
2645
  Attributes:
2646
   - itemId
2647
   - warehouseId
2648
   - quantity
2649
  """
2650
 
2651
  thrift_spec = (
2652
    None, # 0
2653
    (1, TType.I64, 'itemId', None, None, ), # 1
2654
    (2, TType.I64, 'warehouseId', None, None, ), # 2
2655
    (3, TType.I64, 'quantity', None, None, ), # 3
2656
  )
2657
 
2658
  def __init__(self, itemId=None, warehouseId=None, quantity=None,):
2659
    self.itemId = itemId
2660
    self.warehouseId = warehouseId
2661
    self.quantity = quantity
2662
 
2663
  def read(self, iprot):
2664
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2665
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2666
      return
2667
    iprot.readStructBegin()
2668
    while True:
2669
      (fname, ftype, fid) = iprot.readFieldBegin()
2670
      if ftype == TType.STOP:
2671
        break
2672
      if fid == 1:
2673
        if ftype == TType.I64:
2674
          self.itemId = iprot.readI64();
2675
        else:
2676
          iprot.skip(ftype)
2677
      elif fid == 2:
2678
        if ftype == TType.I64:
2679
          self.warehouseId = iprot.readI64();
2680
        else:
2681
          iprot.skip(ftype)
2682
      elif fid == 3:
2683
        if ftype == TType.I64:
2684
          self.quantity = iprot.readI64();
2685
        else:
2686
          iprot.skip(ftype)
2687
      else:
2688
        iprot.skip(ftype)
2689
      iprot.readFieldEnd()
2690
    iprot.readStructEnd()
2691
 
2692
  def write(self, oprot):
2693
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2694
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2695
      return
2696
    oprot.writeStructBegin('addInventory_args')
2697
    if self.itemId is not None:
2698
      oprot.writeFieldBegin('itemId', TType.I64, 1)
2699
      oprot.writeI64(self.itemId)
2700
      oprot.writeFieldEnd()
2701
    if self.warehouseId is not None:
2702
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
2703
      oprot.writeI64(self.warehouseId)
2704
      oprot.writeFieldEnd()
2705
    if self.quantity is not None:
2706
      oprot.writeFieldBegin('quantity', TType.I64, 3)
2707
      oprot.writeI64(self.quantity)
2708
      oprot.writeFieldEnd()
2709
    oprot.writeFieldStop()
2710
    oprot.writeStructEnd()
2711
 
2712
  def validate(self):
2713
    return
2714
 
2715
 
2716
  def __repr__(self):
2717
    L = ['%s=%r' % (key, value)
2718
      for key, value in self.__dict__.iteritems()]
2719
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2720
 
2721
  def __eq__(self, other):
2722
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2723
 
2724
  def __ne__(self, other):
2725
    return not (self == other)
2726
 
2727
class addInventory_result:
2728
  """
2729
  Attributes:
2730
   - cex
2731
  """
2732
 
2733
  thrift_spec = (
2734
    None, # 0
2735
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
2736
  )
2737
 
2738
  def __init__(self, cex=None,):
2739
    self.cex = cex
2740
 
2741
  def read(self, iprot):
2742
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2743
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2744
      return
2745
    iprot.readStructBegin()
2746
    while True:
2747
      (fname, ftype, fid) = iprot.readFieldBegin()
2748
      if ftype == TType.STOP:
2749
        break
2750
      if fid == 1:
2751
        if ftype == TType.STRUCT:
2752
          self.cex = InventoryServiceException()
2753
          self.cex.read(iprot)
2754
        else:
2755
          iprot.skip(ftype)
2756
      else:
2757
        iprot.skip(ftype)
2758
      iprot.readFieldEnd()
2759
    iprot.readStructEnd()
2760
 
2761
  def write(self, oprot):
2762
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2763
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2764
      return
2765
    oprot.writeStructBegin('addInventory_result')
2766
    if self.cex is not None:
2767
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
2768
      self.cex.write(oprot)
2769
      oprot.writeFieldEnd()
2770
    oprot.writeFieldStop()
2771
    oprot.writeStructEnd()
2772
 
2773
  def validate(self):
2774
    return
2775
 
2776
 
2777
  def __repr__(self):
2778
    L = ['%s=%r' % (key, value)
2779
      for key, value in self.__dict__.iteritems()]
2780
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2781
 
2782
  def __eq__(self, other):
2783
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2784
 
2785
  def __ne__(self, other):
2786
    return not (self == other)
2787
 
2788
class retireWarehouse_args:
2789
  """
2790
  Attributes:
2791
   - warehouse_id
2792
  """
2793
 
2794
  thrift_spec = (
2795
    None, # 0
2796
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
2797
  )
2798
 
2799
  def __init__(self, warehouse_id=None,):
2800
    self.warehouse_id = warehouse_id
2801
 
2802
  def read(self, iprot):
2803
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2804
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2805
      return
2806
    iprot.readStructBegin()
2807
    while True:
2808
      (fname, ftype, fid) = iprot.readFieldBegin()
2809
      if ftype == TType.STOP:
2810
        break
2811
      if fid == 1:
2812
        if ftype == TType.I64:
2813
          self.warehouse_id = iprot.readI64();
2814
        else:
2815
          iprot.skip(ftype)
2816
      else:
2817
        iprot.skip(ftype)
2818
      iprot.readFieldEnd()
2819
    iprot.readStructEnd()
2820
 
2821
  def write(self, oprot):
2822
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2823
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2824
      return
2825
    oprot.writeStructBegin('retireWarehouse_args')
2826
    if self.warehouse_id is not None:
2827
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
2828
      oprot.writeI64(self.warehouse_id)
2829
      oprot.writeFieldEnd()
2830
    oprot.writeFieldStop()
2831
    oprot.writeStructEnd()
2832
 
2833
  def validate(self):
2834
    return
2835
 
2836
 
2837
  def __repr__(self):
2838
    L = ['%s=%r' % (key, value)
2839
      for key, value in self.__dict__.iteritems()]
2840
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2841
 
2842
  def __eq__(self, other):
2843
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2844
 
2845
  def __ne__(self, other):
2846
    return not (self == other)
2847
 
2848
class retireWarehouse_result:
2849
  """
2850
  Attributes:
2851
   - cex
2852
  """
2853
 
2854
  thrift_spec = (
2855
    None, # 0
2856
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
2857
  )
2858
 
2859
  def __init__(self, cex=None,):
2860
    self.cex = cex
2861
 
2862
  def read(self, iprot):
2863
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2864
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2865
      return
2866
    iprot.readStructBegin()
2867
    while True:
2868
      (fname, ftype, fid) = iprot.readFieldBegin()
2869
      if ftype == TType.STOP:
2870
        break
2871
      if fid == 1:
2872
        if ftype == TType.STRUCT:
2873
          self.cex = InventoryServiceException()
2874
          self.cex.read(iprot)
2875
        else:
2876
          iprot.skip(ftype)
2877
      else:
2878
        iprot.skip(ftype)
2879
      iprot.readFieldEnd()
2880
    iprot.readStructEnd()
2881
 
2882
  def write(self, oprot):
2883
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2884
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2885
      return
2886
    oprot.writeStructBegin('retireWarehouse_result')
2887
    if self.cex is not None:
2888
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
2889
      self.cex.write(oprot)
2890
      oprot.writeFieldEnd()
2891
    oprot.writeFieldStop()
2892
    oprot.writeStructEnd()
2893
 
2894
  def validate(self):
2895
    return
2896
 
2897
 
2898
  def __repr__(self):
2899
    L = ['%s=%r' % (key, value)
2900
      for key, value in self.__dict__.iteritems()]
2901
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2902
 
2903
  def __eq__(self, other):
2904
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2905
 
2906
  def __ne__(self, other):
2907
    return not (self == other)
2908
 
2909
class getItemInventoryByItemId_args:
2910
  """
2911
  Attributes:
2912
   - item_id
2913
  """
2914
 
2915
  thrift_spec = (
2916
    None, # 0
2917
    (1, TType.I64, 'item_id', None, None, ), # 1
2918
  )
2919
 
2920
  def __init__(self, item_id=None,):
2921
    self.item_id = item_id
2922
 
2923
  def read(self, iprot):
2924
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2925
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2926
      return
2927
    iprot.readStructBegin()
2928
    while True:
2929
      (fname, ftype, fid) = iprot.readFieldBegin()
2930
      if ftype == TType.STOP:
2931
        break
2932
      if fid == 1:
2933
        if ftype == TType.I64:
2934
          self.item_id = iprot.readI64();
2935
        else:
2936
          iprot.skip(ftype)
2937
      else:
2938
        iprot.skip(ftype)
2939
      iprot.readFieldEnd()
2940
    iprot.readStructEnd()
2941
 
2942
  def write(self, oprot):
2943
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2944
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2945
      return
2946
    oprot.writeStructBegin('getItemInventoryByItemId_args')
2947
    if self.item_id is not None:
2948
      oprot.writeFieldBegin('item_id', TType.I64, 1)
2949
      oprot.writeI64(self.item_id)
2950
      oprot.writeFieldEnd()
2951
    oprot.writeFieldStop()
2952
    oprot.writeStructEnd()
2953
 
2954
  def validate(self):
2955
    return
2956
 
2957
 
2958
  def __repr__(self):
2959
    L = ['%s=%r' % (key, value)
2960
      for key, value in self.__dict__.iteritems()]
2961
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2962
 
2963
  def __eq__(self, other):
2964
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2965
 
2966
  def __ne__(self, other):
2967
    return not (self == other)
2968
 
2969
class getItemInventoryByItemId_result:
2970
  """
2971
  Attributes:
2972
   - success
2973
   - cex
2974
  """
2975
 
2976
  thrift_spec = (
2977
    (0, TType.STRUCT, 'success', (ItemInventory, ItemInventory.thrift_spec), None, ), # 0
2978
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
2979
  )
2980
 
2981
  def __init__(self, success=None, cex=None,):
2982
    self.success = success
2983
    self.cex = cex
2984
 
2985
  def read(self, iprot):
2986
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2987
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2988
      return
2989
    iprot.readStructBegin()
2990
    while True:
2991
      (fname, ftype, fid) = iprot.readFieldBegin()
2992
      if ftype == TType.STOP:
2993
        break
2994
      if fid == 0:
2995
        if ftype == TType.STRUCT:
2996
          self.success = ItemInventory()
2997
          self.success.read(iprot)
2998
        else:
2999
          iprot.skip(ftype)
3000
      elif fid == 1:
3001
        if ftype == TType.STRUCT:
3002
          self.cex = InventoryServiceException()
3003
          self.cex.read(iprot)
3004
        else:
3005
          iprot.skip(ftype)
3006
      else:
3007
        iprot.skip(ftype)
3008
      iprot.readFieldEnd()
3009
    iprot.readStructEnd()
3010
 
3011
  def write(self, oprot):
3012
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3013
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3014
      return
3015
    oprot.writeStructBegin('getItemInventoryByItemId_result')
3016
    if self.success is not None:
3017
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
3018
      self.success.write(oprot)
3019
      oprot.writeFieldEnd()
3020
    if self.cex is not None:
3021
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
3022
      self.cex.write(oprot)
3023
      oprot.writeFieldEnd()
3024
    oprot.writeFieldStop()
3025
    oprot.writeStructEnd()
3026
 
3027
  def validate(self):
3028
    return
3029
 
3030
 
3031
  def __repr__(self):
3032
    L = ['%s=%r' % (key, value)
3033
      for key, value in self.__dict__.iteritems()]
3034
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3035
 
3036
  def __eq__(self, other):
3037
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3038
 
3039
  def __ne__(self, other):
3040
    return not (self == other)
3041
 
3042
class getItemAvailibilityAtWarehouse_args:
3043
  """
3044
  Attributes:
3045
   - warehouse_id
3046
   - item_id
3047
  """
3048
 
3049
  thrift_spec = (
3050
    None, # 0
3051
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
3052
    (2, TType.I64, 'item_id', None, None, ), # 2
3053
  )
3054
 
3055
  def __init__(self, warehouse_id=None, item_id=None,):
3056
    self.warehouse_id = warehouse_id
3057
    self.item_id = item_id
3058
 
3059
  def read(self, iprot):
3060
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3061
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3062
      return
3063
    iprot.readStructBegin()
3064
    while True:
3065
      (fname, ftype, fid) = iprot.readFieldBegin()
3066
      if ftype == TType.STOP:
3067
        break
3068
      if fid == 1:
3069
        if ftype == TType.I64:
3070
          self.warehouse_id = iprot.readI64();
3071
        else:
3072
          iprot.skip(ftype)
3073
      elif fid == 2:
3074
        if ftype == TType.I64:
3075
          self.item_id = iprot.readI64();
3076
        else:
3077
          iprot.skip(ftype)
3078
      else:
3079
        iprot.skip(ftype)
3080
      iprot.readFieldEnd()
3081
    iprot.readStructEnd()
3082
 
3083
  def write(self, oprot):
3084
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3085
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3086
      return
3087
    oprot.writeStructBegin('getItemAvailibilityAtWarehouse_args')
3088
    if self.warehouse_id is not None:
3089
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
3090
      oprot.writeI64(self.warehouse_id)
3091
      oprot.writeFieldEnd()
3092
    if self.item_id is not None:
3093
      oprot.writeFieldBegin('item_id', TType.I64, 2)
3094
      oprot.writeI64(self.item_id)
3095
      oprot.writeFieldEnd()
3096
    oprot.writeFieldStop()
3097
    oprot.writeStructEnd()
3098
 
3099
  def validate(self):
3100
    return
3101
 
3102
 
3103
  def __repr__(self):
3104
    L = ['%s=%r' % (key, value)
3105
      for key, value in self.__dict__.iteritems()]
3106
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3107
 
3108
  def __eq__(self, other):
3109
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3110
 
3111
  def __ne__(self, other):
3112
    return not (self == other)
3113
 
3114
class getItemAvailibilityAtWarehouse_result:
3115
  """
3116
  Attributes:
3117
   - success
3118
   - cex
3119
  """
3120
 
3121
  thrift_spec = (
3122
    (0, TType.I64, 'success', None, None, ), # 0
3123
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
3124
  )
3125
 
3126
  def __init__(self, success=None, cex=None,):
3127
    self.success = success
3128
    self.cex = cex
3129
 
3130
  def read(self, iprot):
3131
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3132
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3133
      return
3134
    iprot.readStructBegin()
3135
    while True:
3136
      (fname, ftype, fid) = iprot.readFieldBegin()
3137
      if ftype == TType.STOP:
3138
        break
3139
      if fid == 0:
3140
        if ftype == TType.I64:
3141
          self.success = iprot.readI64();
3142
        else:
3143
          iprot.skip(ftype)
3144
      elif fid == 1:
3145
        if ftype == TType.STRUCT:
3146
          self.cex = InventoryServiceException()
3147
          self.cex.read(iprot)
3148
        else:
3149
          iprot.skip(ftype)
3150
      else:
3151
        iprot.skip(ftype)
3152
      iprot.readFieldEnd()
3153
    iprot.readStructEnd()
3154
 
3155
  def write(self, oprot):
3156
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3157
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3158
      return
3159
    oprot.writeStructBegin('getItemAvailibilityAtWarehouse_result')
3160
    if self.success is not None:
3161
      oprot.writeFieldBegin('success', TType.I64, 0)
3162
      oprot.writeI64(self.success)
3163
      oprot.writeFieldEnd()
3164
    if self.cex is not None:
3165
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
3166
      self.cex.write(oprot)
3167
      oprot.writeFieldEnd()
3168
    oprot.writeFieldStop()
3169
    oprot.writeStructEnd()
3170
 
3171
  def validate(self):
3172
    return
3173
 
3174
 
3175
  def __repr__(self):
3176
    L = ['%s=%r' % (key, value)
3177
      for key, value in self.__dict__.iteritems()]
3178
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3179
 
3180
  def __eq__(self, other):
3181
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3182
 
3183
  def __ne__(self, other):
3184
    return not (self == other)
3185
 
3186
class getItemAvailabilityAtLocation_args:
3187
  """
3188
  Attributes:
3189
   - itemId
3190
  """
3191
 
3192
  thrift_spec = (
3193
    None, # 0
3194
    (1, TType.I64, 'itemId', None, None, ), # 1
3195
  )
3196
 
3197
  def __init__(self, itemId=None,):
3198
    self.itemId = itemId
3199
 
3200
  def read(self, iprot):
3201
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3202
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3203
      return
3204
    iprot.readStructBegin()
3205
    while True:
3206
      (fname, ftype, fid) = iprot.readFieldBegin()
3207
      if ftype == TType.STOP:
3208
        break
3209
      if fid == 1:
3210
        if ftype == TType.I64:
3211
          self.itemId = iprot.readI64();
3212
        else:
3213
          iprot.skip(ftype)
3214
      else:
3215
        iprot.skip(ftype)
3216
      iprot.readFieldEnd()
3217
    iprot.readStructEnd()
3218
 
3219
  def write(self, oprot):
3220
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3221
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3222
      return
3223
    oprot.writeStructBegin('getItemAvailabilityAtLocation_args')
3224
    if self.itemId is not None:
3225
      oprot.writeFieldBegin('itemId', TType.I64, 1)
3226
      oprot.writeI64(self.itemId)
3227
      oprot.writeFieldEnd()
3228
    oprot.writeFieldStop()
3229
    oprot.writeStructEnd()
3230
 
3231
  def validate(self):
3232
    return
3233
 
3234
 
3235
  def __repr__(self):
3236
    L = ['%s=%r' % (key, value)
3237
      for key, value in self.__dict__.iteritems()]
3238
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3239
 
3240
  def __eq__(self, other):
3241
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3242
 
3243
  def __ne__(self, other):
3244
    return not (self == other)
3245
 
3246
class getItemAvailabilityAtLocation_result:
3247
  """
3248
  Attributes:
3249
   - success
3250
   - isex
3251
  """
3252
 
3253
  thrift_spec = (
3254
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
3255
    (1, TType.STRUCT, 'isex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
3256
  )
3257
 
3258
  def __init__(self, success=None, isex=None,):
3259
    self.success = success
3260
    self.isex = isex
3261
 
3262
  def read(self, iprot):
3263
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3264
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3265
      return
3266
    iprot.readStructBegin()
3267
    while True:
3268
      (fname, ftype, fid) = iprot.readFieldBegin()
3269
      if ftype == TType.STOP:
3270
        break
3271
      if fid == 0:
3272
        if ftype == TType.LIST:
3273
          self.success = []
3274
          (_etype39, _size36) = iprot.readListBegin()
3275
          for _i40 in xrange(_size36):
3276
            _elem41 = iprot.readI64();
3277
            self.success.append(_elem41)
3278
          iprot.readListEnd()
3279
        else:
3280
          iprot.skip(ftype)
3281
      elif fid == 1:
3282
        if ftype == TType.STRUCT:
3283
          self.isex = InventoryServiceException()
3284
          self.isex.read(iprot)
3285
        else:
3286
          iprot.skip(ftype)
3287
      else:
3288
        iprot.skip(ftype)
3289
      iprot.readFieldEnd()
3290
    iprot.readStructEnd()
3291
 
3292
  def write(self, oprot):
3293
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3294
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3295
      return
3296
    oprot.writeStructBegin('getItemAvailabilityAtLocation_result')
3297
    if self.success is not None:
3298
      oprot.writeFieldBegin('success', TType.LIST, 0)
3299
      oprot.writeListBegin(TType.I64, len(self.success))
3300
      for iter42 in self.success:
3301
        oprot.writeI64(iter42)
3302
      oprot.writeListEnd()
3303
      oprot.writeFieldEnd()
3304
    if self.isex is not None:
3305
      oprot.writeFieldBegin('isex', TType.STRUCT, 1)
3306
      self.isex.write(oprot)
3307
      oprot.writeFieldEnd()
3308
    oprot.writeFieldStop()
3309
    oprot.writeStructEnd()
3310
 
3311
  def validate(self):
3312
    return
3313
 
3314
 
3315
  def __repr__(self):
3316
    L = ['%s=%r' % (key, value)
3317
      for key, value in self.__dict__.iteritems()]
3318
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3319
 
3320
  def __eq__(self, other):
3321
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3322
 
3323
  def __ne__(self, other):
3324
    return not (self == other)
3325
 
3326
class getAllWarehouses_args:
3327
  """
3328
  Attributes:
3329
   - isActive
3330
  """
3331
 
3332
  thrift_spec = (
3333
    None, # 0
3334
    (1, TType.BOOL, 'isActive', None, None, ), # 1
3335
  )
3336
 
3337
  def __init__(self, isActive=None,):
3338
    self.isActive = isActive
3339
 
3340
  def read(self, iprot):
3341
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3342
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3343
      return
3344
    iprot.readStructBegin()
3345
    while True:
3346
      (fname, ftype, fid) = iprot.readFieldBegin()
3347
      if ftype == TType.STOP:
3348
        break
3349
      if fid == 1:
3350
        if ftype == TType.BOOL:
3351
          self.isActive = iprot.readBool();
3352
        else:
3353
          iprot.skip(ftype)
3354
      else:
3355
        iprot.skip(ftype)
3356
      iprot.readFieldEnd()
3357
    iprot.readStructEnd()
3358
 
3359
  def write(self, oprot):
3360
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3361
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3362
      return
3363
    oprot.writeStructBegin('getAllWarehouses_args')
3364
    if self.isActive is not None:
3365
      oprot.writeFieldBegin('isActive', TType.BOOL, 1)
3366
      oprot.writeBool(self.isActive)
3367
      oprot.writeFieldEnd()
3368
    oprot.writeFieldStop()
3369
    oprot.writeStructEnd()
3370
 
3371
  def validate(self):
3372
    return
3373
 
3374
 
3375
  def __repr__(self):
3376
    L = ['%s=%r' % (key, value)
3377
      for key, value in self.__dict__.iteritems()]
3378
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3379
 
3380
  def __eq__(self, other):
3381
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3382
 
3383
  def __ne__(self, other):
3384
    return not (self == other)
3385
 
3386
class getAllWarehouses_result:
3387
  """
3388
  Attributes:
3389
   - success
3390
   - cex
3391
  """
3392
 
3393
  thrift_spec = (
3394
    (0, TType.LIST, 'success', (TType.STRUCT,(Warehouse, Warehouse.thrift_spec)), None, ), # 0
3395
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
3396
  )
3397
 
3398
  def __init__(self, success=None, cex=None,):
3399
    self.success = success
3400
    self.cex = cex
3401
 
3402
  def read(self, iprot):
3403
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3404
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3405
      return
3406
    iprot.readStructBegin()
3407
    while True:
3408
      (fname, ftype, fid) = iprot.readFieldBegin()
3409
      if ftype == TType.STOP:
3410
        break
3411
      if fid == 0:
3412
        if ftype == TType.LIST:
3413
          self.success = []
3414
          (_etype46, _size43) = iprot.readListBegin()
3415
          for _i47 in xrange(_size43):
3416
            _elem48 = Warehouse()
3417
            _elem48.read(iprot)
3418
            self.success.append(_elem48)
3419
          iprot.readListEnd()
3420
        else:
3421
          iprot.skip(ftype)
3422
      elif fid == 1:
3423
        if ftype == TType.STRUCT:
3424
          self.cex = InventoryServiceException()
3425
          self.cex.read(iprot)
3426
        else:
3427
          iprot.skip(ftype)
3428
      else:
3429
        iprot.skip(ftype)
3430
      iprot.readFieldEnd()
3431
    iprot.readStructEnd()
3432
 
3433
  def write(self, oprot):
3434
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3435
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3436
      return
3437
    oprot.writeStructBegin('getAllWarehouses_result')
3438
    if self.success is not None:
3439
      oprot.writeFieldBegin('success', TType.LIST, 0)
3440
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3441
      for iter49 in self.success:
3442
        iter49.write(oprot)
3443
      oprot.writeListEnd()
3444
      oprot.writeFieldEnd()
3445
    if self.cex is not None:
3446
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
3447
      self.cex.write(oprot)
3448
      oprot.writeFieldEnd()
3449
    oprot.writeFieldStop()
3450
    oprot.writeStructEnd()
3451
 
3452
  def validate(self):
3453
    return
3454
 
3455
 
3456
  def __repr__(self):
3457
    L = ['%s=%r' % (key, value)
3458
      for key, value in self.__dict__.iteritems()]
3459
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3460
 
3461
  def __eq__(self, other):
3462
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3463
 
3464
  def __ne__(self, other):
3465
    return not (self == other)
3466
 
3467
class getWarehouse_args:
3468
  """
3469
  Attributes:
3470
   - warehouse_id
3471
  """
3472
 
3473
  thrift_spec = (
3474
    None, # 0
3475
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
3476
  )
3477
 
3478
  def __init__(self, warehouse_id=None,):
3479
    self.warehouse_id = warehouse_id
3480
 
3481
  def read(self, iprot):
3482
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3483
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3484
      return
3485
    iprot.readStructBegin()
3486
    while True:
3487
      (fname, ftype, fid) = iprot.readFieldBegin()
3488
      if ftype == TType.STOP:
3489
        break
3490
      if fid == 1:
3491
        if ftype == TType.I64:
3492
          self.warehouse_id = iprot.readI64();
3493
        else:
3494
          iprot.skip(ftype)
3495
      else:
3496
        iprot.skip(ftype)
3497
      iprot.readFieldEnd()
3498
    iprot.readStructEnd()
3499
 
3500
  def write(self, oprot):
3501
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3502
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3503
      return
3504
    oprot.writeStructBegin('getWarehouse_args')
3505
    if self.warehouse_id is not None:
3506
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
3507
      oprot.writeI64(self.warehouse_id)
3508
      oprot.writeFieldEnd()
3509
    oprot.writeFieldStop()
3510
    oprot.writeStructEnd()
3511
 
3512
  def validate(self):
3513
    return
3514
 
3515
 
3516
  def __repr__(self):
3517
    L = ['%s=%r' % (key, value)
3518
      for key, value in self.__dict__.iteritems()]
3519
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3520
 
3521
  def __eq__(self, other):
3522
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3523
 
3524
  def __ne__(self, other):
3525
    return not (self == other)
3526
 
3527
class getWarehouse_result:
3528
  """
3529
  Attributes:
3530
   - success
3531
   - cex
3532
  """
3533
 
3534
  thrift_spec = (
3535
    (0, TType.STRUCT, 'success', (Warehouse, Warehouse.thrift_spec), None, ), # 0
3536
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
3537
  )
3538
 
3539
  def __init__(self, success=None, cex=None,):
3540
    self.success = success
3541
    self.cex = cex
3542
 
3543
  def read(self, iprot):
3544
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3545
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3546
      return
3547
    iprot.readStructBegin()
3548
    while True:
3549
      (fname, ftype, fid) = iprot.readFieldBegin()
3550
      if ftype == TType.STOP:
3551
        break
3552
      if fid == 0:
3553
        if ftype == TType.STRUCT:
3554
          self.success = Warehouse()
3555
          self.success.read(iprot)
3556
        else:
3557
          iprot.skip(ftype)
3558
      elif fid == 1:
3559
        if ftype == TType.STRUCT:
3560
          self.cex = InventoryServiceException()
3561
          self.cex.read(iprot)
3562
        else:
3563
          iprot.skip(ftype)
3564
      else:
3565
        iprot.skip(ftype)
3566
      iprot.readFieldEnd()
3567
    iprot.readStructEnd()
3568
 
3569
  def write(self, oprot):
3570
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3571
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3572
      return
3573
    oprot.writeStructBegin('getWarehouse_result')
3574
    if self.success is not None:
3575
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
3576
      self.success.write(oprot)
3577
      oprot.writeFieldEnd()
3578
    if self.cex is not None:
3579
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
3580
      self.cex.write(oprot)
3581
      oprot.writeFieldEnd()
3582
    oprot.writeFieldStop()
3583
    oprot.writeStructEnd()
3584
 
3585
  def validate(self):
3586
    return
3587
 
3588
 
3589
  def __repr__(self):
3590
    L = ['%s=%r' % (key, value)
3591
      for key, value in self.__dict__.iteritems()]
3592
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3593
 
3594
  def __eq__(self, other):
3595
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3596
 
3597
  def __ne__(self, other):
3598
    return not (self == other)
3599
 
3600
class getAllItemsForWarehouse_args:
3601
  """
3602
  Attributes:
3603
   - warehouse_id
3604
  """
3605
 
3606
  thrift_spec = (
3607
    None, # 0
3608
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
3609
  )
3610
 
3611
  def __init__(self, warehouse_id=None,):
3612
    self.warehouse_id = warehouse_id
3613
 
3614
  def read(self, iprot):
3615
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3616
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3617
      return
3618
    iprot.readStructBegin()
3619
    while True:
3620
      (fname, ftype, fid) = iprot.readFieldBegin()
3621
      if ftype == TType.STOP:
3622
        break
3623
      if fid == 1:
3624
        if ftype == TType.I64:
3625
          self.warehouse_id = iprot.readI64();
3626
        else:
3627
          iprot.skip(ftype)
3628
      else:
3629
        iprot.skip(ftype)
3630
      iprot.readFieldEnd()
3631
    iprot.readStructEnd()
3632
 
3633
  def write(self, oprot):
3634
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3635
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3636
      return
3637
    oprot.writeStructBegin('getAllItemsForWarehouse_args')
3638
    if self.warehouse_id is not None:
3639
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
3640
      oprot.writeI64(self.warehouse_id)
3641
      oprot.writeFieldEnd()
3642
    oprot.writeFieldStop()
3643
    oprot.writeStructEnd()
3644
 
3645
  def validate(self):
3646
    return
3647
 
3648
 
3649
  def __repr__(self):
3650
    L = ['%s=%r' % (key, value)
3651
      for key, value in self.__dict__.iteritems()]
3652
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3653
 
3654
  def __eq__(self, other):
3655
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3656
 
3657
  def __ne__(self, other):
3658
    return not (self == other)
3659
 
3660
class getAllItemsForWarehouse_result:
3661
  """
3662
  Attributes:
3663
   - success
3664
   - cex
3665
  """
3666
 
3667
  thrift_spec = (
3668
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
3669
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
3670
  )
3671
 
3672
  def __init__(self, success=None, cex=None,):
3673
    self.success = success
3674
    self.cex = cex
3675
 
3676
  def read(self, iprot):
3677
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3678
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3679
      return
3680
    iprot.readStructBegin()
3681
    while True:
3682
      (fname, ftype, fid) = iprot.readFieldBegin()
3683
      if ftype == TType.STOP:
3684
        break
3685
      if fid == 0:
3686
        if ftype == TType.LIST:
3687
          self.success = []
3688
          (_etype53, _size50) = iprot.readListBegin()
3689
          for _i54 in xrange(_size50):
3690
            _elem55 = iprot.readI64();
3691
            self.success.append(_elem55)
3692
          iprot.readListEnd()
3693
        else:
3694
          iprot.skip(ftype)
3695
      elif fid == 1:
3696
        if ftype == TType.STRUCT:
3697
          self.cex = InventoryServiceException()
3698
          self.cex.read(iprot)
3699
        else:
3700
          iprot.skip(ftype)
3701
      else:
3702
        iprot.skip(ftype)
3703
      iprot.readFieldEnd()
3704
    iprot.readStructEnd()
3705
 
3706
  def write(self, oprot):
3707
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3708
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3709
      return
3710
    oprot.writeStructBegin('getAllItemsForWarehouse_result')
3711
    if self.success is not None:
3712
      oprot.writeFieldBegin('success', TType.LIST, 0)
3713
      oprot.writeListBegin(TType.I64, len(self.success))
3714
      for iter56 in self.success:
3715
        oprot.writeI64(iter56)
3716
      oprot.writeListEnd()
3717
      oprot.writeFieldEnd()
3718
    if self.cex is not None:
3719
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
3720
      self.cex.write(oprot)
3721
      oprot.writeFieldEnd()
3722
    oprot.writeFieldStop()
3723
    oprot.writeStructEnd()
3724
 
3725
  def validate(self):
3726
    return
3727
 
3728
 
3729
  def __repr__(self):
3730
    L = ['%s=%r' % (key, value)
3731
      for key, value in self.__dict__.iteritems()]
3732
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3733
 
3734
  def __eq__(self, other):
3735
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3736
 
3737
  def __ne__(self, other):
3738
    return not (self == other)
3739
 
5966 rajveer 3740
class isOrderBillable_args:
3741
  """
3742
  Attributes:
3743
   - itemId
3744
   - warehouseId
3745
   - sourceId
3746
   - orderId
3747
  """
3748
 
3749
  thrift_spec = (
3750
    None, # 0
3751
    (1, TType.I64, 'itemId', None, None, ), # 1
3752
    (2, TType.I64, 'warehouseId', None, None, ), # 2
3753
    (3, TType.I64, 'sourceId', None, None, ), # 3
3754
    (4, TType.I64, 'orderId', None, None, ), # 4
3755
  )
3756
 
3757
  def __init__(self, itemId=None, warehouseId=None, sourceId=None, orderId=None,):
3758
    self.itemId = itemId
3759
    self.warehouseId = warehouseId
3760
    self.sourceId = sourceId
3761
    self.orderId = orderId
3762
 
3763
  def read(self, iprot):
3764
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3765
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3766
      return
3767
    iprot.readStructBegin()
3768
    while True:
3769
      (fname, ftype, fid) = iprot.readFieldBegin()
3770
      if ftype == TType.STOP:
3771
        break
3772
      if fid == 1:
3773
        if ftype == TType.I64:
3774
          self.itemId = iprot.readI64();
3775
        else:
3776
          iprot.skip(ftype)
3777
      elif fid == 2:
3778
        if ftype == TType.I64:
3779
          self.warehouseId = iprot.readI64();
3780
        else:
3781
          iprot.skip(ftype)
3782
      elif fid == 3:
3783
        if ftype == TType.I64:
3784
          self.sourceId = iprot.readI64();
3785
        else:
3786
          iprot.skip(ftype)
3787
      elif fid == 4:
3788
        if ftype == TType.I64:
3789
          self.orderId = iprot.readI64();
3790
        else:
3791
          iprot.skip(ftype)
3792
      else:
3793
        iprot.skip(ftype)
3794
      iprot.readFieldEnd()
3795
    iprot.readStructEnd()
3796
 
3797
  def write(self, oprot):
3798
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3799
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3800
      return
3801
    oprot.writeStructBegin('isOrderBillable_args')
3802
    if self.itemId is not None:
3803
      oprot.writeFieldBegin('itemId', TType.I64, 1)
3804
      oprot.writeI64(self.itemId)
3805
      oprot.writeFieldEnd()
3806
    if self.warehouseId is not None:
3807
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
3808
      oprot.writeI64(self.warehouseId)
3809
      oprot.writeFieldEnd()
3810
    if self.sourceId is not None:
3811
      oprot.writeFieldBegin('sourceId', TType.I64, 3)
3812
      oprot.writeI64(self.sourceId)
3813
      oprot.writeFieldEnd()
3814
    if self.orderId is not None:
3815
      oprot.writeFieldBegin('orderId', TType.I64, 4)
3816
      oprot.writeI64(self.orderId)
3817
      oprot.writeFieldEnd()
3818
    oprot.writeFieldStop()
3819
    oprot.writeStructEnd()
3820
 
3821
  def validate(self):
3822
    return
3823
 
3824
 
3825
  def __repr__(self):
3826
    L = ['%s=%r' % (key, value)
3827
      for key, value in self.__dict__.iteritems()]
3828
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3829
 
3830
  def __eq__(self, other):
3831
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3832
 
3833
  def __ne__(self, other):
3834
    return not (self == other)
3835
 
3836
class isOrderBillable_result:
3837
  """
3838
  Attributes:
3839
   - success
3840
  """
3841
 
3842
  thrift_spec = (
3843
    (0, TType.BOOL, 'success', None, None, ), # 0
3844
  )
3845
 
3846
  def __init__(self, success=None,):
3847
    self.success = success
3848
 
3849
  def read(self, iprot):
3850
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3851
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3852
      return
3853
    iprot.readStructBegin()
3854
    while True:
3855
      (fname, ftype, fid) = iprot.readFieldBegin()
3856
      if ftype == TType.STOP:
3857
        break
3858
      if fid == 0:
3859
        if ftype == TType.BOOL:
3860
          self.success = iprot.readBool();
3861
        else:
3862
          iprot.skip(ftype)
3863
      else:
3864
        iprot.skip(ftype)
3865
      iprot.readFieldEnd()
3866
    iprot.readStructEnd()
3867
 
3868
  def write(self, oprot):
3869
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3870
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3871
      return
3872
    oprot.writeStructBegin('isOrderBillable_result')
3873
    if self.success is not None:
3874
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3875
      oprot.writeBool(self.success)
3876
      oprot.writeFieldEnd()
3877
    oprot.writeFieldStop()
3878
    oprot.writeStructEnd()
3879
 
3880
  def validate(self):
3881
    return
3882
 
3883
 
3884
  def __repr__(self):
3885
    L = ['%s=%r' % (key, value)
3886
      for key, value in self.__dict__.iteritems()]
3887
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3888
 
3889
  def __eq__(self, other):
3890
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3891
 
3892
  def __ne__(self, other):
3893
    return not (self == other)
3894
 
5944 mandeep.dh 3895
class reserveItemInWarehouse_args:
3896
  """
3897
  Attributes:
3898
   - itemId
3899
   - warehouseId
5966 rajveer 3900
   - sourceId
3901
   - orderId
3902
   - createdTimestamp
3903
   - promisedShippingTimestamp
5944 mandeep.dh 3904
   - quantity
3905
  """
3906
 
3907
  thrift_spec = (
3908
    None, # 0
3909
    (1, TType.I64, 'itemId', None, None, ), # 1
3910
    (2, TType.I64, 'warehouseId', None, None, ), # 2
5966 rajveer 3911
    (3, TType.I64, 'sourceId', None, None, ), # 3
3912
    (4, TType.I64, 'orderId', None, None, ), # 4
3913
    (5, TType.I64, 'createdTimestamp', None, None, ), # 5
3914
    (6, TType.I64, 'promisedShippingTimestamp', None, None, ), # 6
3915
    (7, TType.DOUBLE, 'quantity', None, None, ), # 7
5944 mandeep.dh 3916
  )
3917
 
5966 rajveer 3918
  def __init__(self, itemId=None, warehouseId=None, sourceId=None, orderId=None, createdTimestamp=None, promisedShippingTimestamp=None, quantity=None,):
5944 mandeep.dh 3919
    self.itemId = itemId
3920
    self.warehouseId = warehouseId
5966 rajveer 3921
    self.sourceId = sourceId
3922
    self.orderId = orderId
3923
    self.createdTimestamp = createdTimestamp
3924
    self.promisedShippingTimestamp = promisedShippingTimestamp
5944 mandeep.dh 3925
    self.quantity = quantity
3926
 
3927
  def read(self, iprot):
3928
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3929
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3930
      return
3931
    iprot.readStructBegin()
3932
    while True:
3933
      (fname, ftype, fid) = iprot.readFieldBegin()
3934
      if ftype == TType.STOP:
3935
        break
3936
      if fid == 1:
3937
        if ftype == TType.I64:
3938
          self.itemId = iprot.readI64();
3939
        else:
3940
          iprot.skip(ftype)
3941
      elif fid == 2:
3942
        if ftype == TType.I64:
3943
          self.warehouseId = iprot.readI64();
3944
        else:
3945
          iprot.skip(ftype)
3946
      elif fid == 3:
5966 rajveer 3947
        if ftype == TType.I64:
3948
          self.sourceId = iprot.readI64();
3949
        else:
3950
          iprot.skip(ftype)
3951
      elif fid == 4:
3952
        if ftype == TType.I64:
3953
          self.orderId = iprot.readI64();
3954
        else:
3955
          iprot.skip(ftype)
3956
      elif fid == 5:
3957
        if ftype == TType.I64:
3958
          self.createdTimestamp = iprot.readI64();
3959
        else:
3960
          iprot.skip(ftype)
3961
      elif fid == 6:
3962
        if ftype == TType.I64:
3963
          self.promisedShippingTimestamp = iprot.readI64();
3964
        else:
3965
          iprot.skip(ftype)
3966
      elif fid == 7:
5944 mandeep.dh 3967
        if ftype == TType.DOUBLE:
3968
          self.quantity = iprot.readDouble();
3969
        else:
3970
          iprot.skip(ftype)
3971
      else:
3972
        iprot.skip(ftype)
3973
      iprot.readFieldEnd()
3974
    iprot.readStructEnd()
3975
 
3976
  def write(self, oprot):
3977
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3978
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3979
      return
3980
    oprot.writeStructBegin('reserveItemInWarehouse_args')
3981
    if self.itemId is not None:
3982
      oprot.writeFieldBegin('itemId', TType.I64, 1)
3983
      oprot.writeI64(self.itemId)
3984
      oprot.writeFieldEnd()
3985
    if self.warehouseId is not None:
3986
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
3987
      oprot.writeI64(self.warehouseId)
3988
      oprot.writeFieldEnd()
5966 rajveer 3989
    if self.sourceId is not None:
3990
      oprot.writeFieldBegin('sourceId', TType.I64, 3)
3991
      oprot.writeI64(self.sourceId)
3992
      oprot.writeFieldEnd()
3993
    if self.orderId is not None:
3994
      oprot.writeFieldBegin('orderId', TType.I64, 4)
3995
      oprot.writeI64(self.orderId)
3996
      oprot.writeFieldEnd()
3997
    if self.createdTimestamp is not None:
3998
      oprot.writeFieldBegin('createdTimestamp', TType.I64, 5)
3999
      oprot.writeI64(self.createdTimestamp)
4000
      oprot.writeFieldEnd()
4001
    if self.promisedShippingTimestamp is not None:
4002
      oprot.writeFieldBegin('promisedShippingTimestamp', TType.I64, 6)
4003
      oprot.writeI64(self.promisedShippingTimestamp)
4004
      oprot.writeFieldEnd()
5944 mandeep.dh 4005
    if self.quantity is not None:
5966 rajveer 4006
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 7)
5944 mandeep.dh 4007
      oprot.writeDouble(self.quantity)
4008
      oprot.writeFieldEnd()
4009
    oprot.writeFieldStop()
4010
    oprot.writeStructEnd()
4011
 
4012
  def validate(self):
4013
    return
4014
 
4015
 
4016
  def __repr__(self):
4017
    L = ['%s=%r' % (key, value)
4018
      for key, value in self.__dict__.iteritems()]
4019
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4020
 
4021
  def __eq__(self, other):
4022
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4023
 
4024
  def __ne__(self, other):
4025
    return not (self == other)
4026
 
4027
class reserveItemInWarehouse_result:
4028
  """
4029
  Attributes:
4030
   - success
4031
   - cex
4032
  """
4033
 
4034
  thrift_spec = (
4035
    (0, TType.BOOL, 'success', None, None, ), # 0
4036
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
4037
  )
4038
 
4039
  def __init__(self, success=None, cex=None,):
4040
    self.success = success
4041
    self.cex = cex
4042
 
4043
  def read(self, iprot):
4044
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4045
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4046
      return
4047
    iprot.readStructBegin()
4048
    while True:
4049
      (fname, ftype, fid) = iprot.readFieldBegin()
4050
      if ftype == TType.STOP:
4051
        break
4052
      if fid == 0:
4053
        if ftype == TType.BOOL:
4054
          self.success = iprot.readBool();
4055
        else:
4056
          iprot.skip(ftype)
4057
      elif fid == 1:
4058
        if ftype == TType.STRUCT:
4059
          self.cex = InventoryServiceException()
4060
          self.cex.read(iprot)
4061
        else:
4062
          iprot.skip(ftype)
4063
      else:
4064
        iprot.skip(ftype)
4065
      iprot.readFieldEnd()
4066
    iprot.readStructEnd()
4067
 
4068
  def write(self, oprot):
4069
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4070
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4071
      return
4072
    oprot.writeStructBegin('reserveItemInWarehouse_result')
4073
    if self.success is not None:
4074
      oprot.writeFieldBegin('success', TType.BOOL, 0)
4075
      oprot.writeBool(self.success)
4076
      oprot.writeFieldEnd()
4077
    if self.cex is not None:
4078
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
4079
      self.cex.write(oprot)
4080
      oprot.writeFieldEnd()
4081
    oprot.writeFieldStop()
4082
    oprot.writeStructEnd()
4083
 
4084
  def validate(self):
4085
    return
4086
 
4087
 
4088
  def __repr__(self):
4089
    L = ['%s=%r' % (key, value)
4090
      for key, value in self.__dict__.iteritems()]
4091
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4092
 
4093
  def __eq__(self, other):
4094
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4095
 
4096
  def __ne__(self, other):
4097
    return not (self == other)
4098
 
4099
class reduceReservationCount_args:
4100
  """
4101
  Attributes:
4102
   - itemId
4103
   - warehouseId
5966 rajveer 4104
   - sourceId
4105
   - orderId
5944 mandeep.dh 4106
   - quantity
4107
  """
4108
 
4109
  thrift_spec = (
4110
    None, # 0
4111
    (1, TType.I64, 'itemId', None, None, ), # 1
4112
    (2, TType.I64, 'warehouseId', None, None, ), # 2
5966 rajveer 4113
    (3, TType.I64, 'sourceId', None, None, ), # 3
4114
    (4, TType.I64, 'orderId', None, None, ), # 4
4115
    (5, TType.DOUBLE, 'quantity', None, None, ), # 5
5944 mandeep.dh 4116
  )
4117
 
5966 rajveer 4118
  def __init__(self, itemId=None, warehouseId=None, sourceId=None, orderId=None, quantity=None,):
5944 mandeep.dh 4119
    self.itemId = itemId
4120
    self.warehouseId = warehouseId
5966 rajveer 4121
    self.sourceId = sourceId
4122
    self.orderId = orderId
5944 mandeep.dh 4123
    self.quantity = quantity
4124
 
4125
  def read(self, iprot):
4126
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4127
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4128
      return
4129
    iprot.readStructBegin()
4130
    while True:
4131
      (fname, ftype, fid) = iprot.readFieldBegin()
4132
      if ftype == TType.STOP:
4133
        break
4134
      if fid == 1:
4135
        if ftype == TType.I64:
4136
          self.itemId = iprot.readI64();
4137
        else:
4138
          iprot.skip(ftype)
4139
      elif fid == 2:
4140
        if ftype == TType.I64:
4141
          self.warehouseId = iprot.readI64();
4142
        else:
4143
          iprot.skip(ftype)
4144
      elif fid == 3:
5966 rajveer 4145
        if ftype == TType.I64:
4146
          self.sourceId = iprot.readI64();
4147
        else:
4148
          iprot.skip(ftype)
4149
      elif fid == 4:
4150
        if ftype == TType.I64:
4151
          self.orderId = iprot.readI64();
4152
        else:
4153
          iprot.skip(ftype)
4154
      elif fid == 5:
5944 mandeep.dh 4155
        if ftype == TType.DOUBLE:
4156
          self.quantity = iprot.readDouble();
4157
        else:
4158
          iprot.skip(ftype)
4159
      else:
4160
        iprot.skip(ftype)
4161
      iprot.readFieldEnd()
4162
    iprot.readStructEnd()
4163
 
4164
  def write(self, oprot):
4165
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4166
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4167
      return
4168
    oprot.writeStructBegin('reduceReservationCount_args')
4169
    if self.itemId is not None:
4170
      oprot.writeFieldBegin('itemId', TType.I64, 1)
4171
      oprot.writeI64(self.itemId)
4172
      oprot.writeFieldEnd()
4173
    if self.warehouseId is not None:
4174
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
4175
      oprot.writeI64(self.warehouseId)
4176
      oprot.writeFieldEnd()
5966 rajveer 4177
    if self.sourceId is not None:
4178
      oprot.writeFieldBegin('sourceId', TType.I64, 3)
4179
      oprot.writeI64(self.sourceId)
4180
      oprot.writeFieldEnd()
4181
    if self.orderId is not None:
4182
      oprot.writeFieldBegin('orderId', TType.I64, 4)
4183
      oprot.writeI64(self.orderId)
4184
      oprot.writeFieldEnd()
5944 mandeep.dh 4185
    if self.quantity is not None:
5966 rajveer 4186
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 5)
5944 mandeep.dh 4187
      oprot.writeDouble(self.quantity)
4188
      oprot.writeFieldEnd()
4189
    oprot.writeFieldStop()
4190
    oprot.writeStructEnd()
4191
 
4192
  def validate(self):
4193
    return
4194
 
4195
 
4196
  def __repr__(self):
4197
    L = ['%s=%r' % (key, value)
4198
      for key, value in self.__dict__.iteritems()]
4199
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4200
 
4201
  def __eq__(self, other):
4202
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4203
 
4204
  def __ne__(self, other):
4205
    return not (self == other)
4206
 
4207
class reduceReservationCount_result:
4208
  """
4209
  Attributes:
4210
   - success
4211
   - cex
4212
  """
4213
 
4214
  thrift_spec = (
4215
    (0, TType.BOOL, 'success', None, None, ), # 0
4216
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
4217
  )
4218
 
4219
  def __init__(self, success=None, cex=None,):
4220
    self.success = success
4221
    self.cex = cex
4222
 
4223
  def read(self, iprot):
4224
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4225
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4226
      return
4227
    iprot.readStructBegin()
4228
    while True:
4229
      (fname, ftype, fid) = iprot.readFieldBegin()
4230
      if ftype == TType.STOP:
4231
        break
4232
      if fid == 0:
4233
        if ftype == TType.BOOL:
4234
          self.success = iprot.readBool();
4235
        else:
4236
          iprot.skip(ftype)
4237
      elif fid == 1:
4238
        if ftype == TType.STRUCT:
4239
          self.cex = InventoryServiceException()
4240
          self.cex.read(iprot)
4241
        else:
4242
          iprot.skip(ftype)
4243
      else:
4244
        iprot.skip(ftype)
4245
      iprot.readFieldEnd()
4246
    iprot.readStructEnd()
4247
 
4248
  def write(self, oprot):
4249
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4250
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4251
      return
4252
    oprot.writeStructBegin('reduceReservationCount_result')
4253
    if self.success is not None:
4254
      oprot.writeFieldBegin('success', TType.BOOL, 0)
4255
      oprot.writeBool(self.success)
4256
      oprot.writeFieldEnd()
4257
    if self.cex is not None:
4258
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
4259
      self.cex.write(oprot)
4260
      oprot.writeFieldEnd()
4261
    oprot.writeFieldStop()
4262
    oprot.writeStructEnd()
4263
 
4264
  def validate(self):
4265
    return
4266
 
4267
 
4268
  def __repr__(self):
4269
    L = ['%s=%r' % (key, value)
4270
      for key, value in self.__dict__.iteritems()]
4271
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4272
 
4273
  def __eq__(self, other):
4274
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4275
 
4276
  def __ne__(self, other):
4277
    return not (self == other)
4278
 
4279
class getItemPricing_args:
4280
  """
4281
  Attributes:
4282
   - itemId
4283
   - vendorId
4284
  """
4285
 
4286
  thrift_spec = (
4287
    None, # 0
4288
    (1, TType.I64, 'itemId', None, None, ), # 1
4289
    (2, TType.I64, 'vendorId', None, None, ), # 2
4290
  )
4291
 
4292
  def __init__(self, itemId=None, vendorId=None,):
4293
    self.itemId = itemId
4294
    self.vendorId = vendorId
4295
 
4296
  def read(self, iprot):
4297
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4298
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4299
      return
4300
    iprot.readStructBegin()
4301
    while True:
4302
      (fname, ftype, fid) = iprot.readFieldBegin()
4303
      if ftype == TType.STOP:
4304
        break
4305
      if fid == 1:
4306
        if ftype == TType.I64:
4307
          self.itemId = iprot.readI64();
4308
        else:
4309
          iprot.skip(ftype)
4310
      elif fid == 2:
4311
        if ftype == TType.I64:
4312
          self.vendorId = iprot.readI64();
4313
        else:
4314
          iprot.skip(ftype)
4315
      else:
4316
        iprot.skip(ftype)
4317
      iprot.readFieldEnd()
4318
    iprot.readStructEnd()
4319
 
4320
  def write(self, oprot):
4321
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4322
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4323
      return
4324
    oprot.writeStructBegin('getItemPricing_args')
4325
    if self.itemId is not None:
4326
      oprot.writeFieldBegin('itemId', TType.I64, 1)
4327
      oprot.writeI64(self.itemId)
4328
      oprot.writeFieldEnd()
4329
    if self.vendorId is not None:
4330
      oprot.writeFieldBegin('vendorId', TType.I64, 2)
4331
      oprot.writeI64(self.vendorId)
4332
      oprot.writeFieldEnd()
4333
    oprot.writeFieldStop()
4334
    oprot.writeStructEnd()
4335
 
4336
  def validate(self):
4337
    return
4338
 
4339
 
4340
  def __repr__(self):
4341
    L = ['%s=%r' % (key, value)
4342
      for key, value in self.__dict__.iteritems()]
4343
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4344
 
4345
  def __eq__(self, other):
4346
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4347
 
4348
  def __ne__(self, other):
4349
    return not (self == other)
4350
 
4351
class getItemPricing_result:
4352
  """
4353
  Attributes:
4354
   - success
4355
   - cex
4356
  """
4357
 
4358
  thrift_spec = (
4359
    (0, TType.STRUCT, 'success', (VendorItemPricing, VendorItemPricing.thrift_spec), None, ), # 0
4360
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
4361
  )
4362
 
4363
  def __init__(self, success=None, cex=None,):
4364
    self.success = success
4365
    self.cex = cex
4366
 
4367
  def read(self, iprot):
4368
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4369
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4370
      return
4371
    iprot.readStructBegin()
4372
    while True:
4373
      (fname, ftype, fid) = iprot.readFieldBegin()
4374
      if ftype == TType.STOP:
4375
        break
4376
      if fid == 0:
4377
        if ftype == TType.STRUCT:
4378
          self.success = VendorItemPricing()
4379
          self.success.read(iprot)
4380
        else:
4381
          iprot.skip(ftype)
4382
      elif fid == 1:
4383
        if ftype == TType.STRUCT:
4384
          self.cex = InventoryServiceException()
4385
          self.cex.read(iprot)
4386
        else:
4387
          iprot.skip(ftype)
4388
      else:
4389
        iprot.skip(ftype)
4390
      iprot.readFieldEnd()
4391
    iprot.readStructEnd()
4392
 
4393
  def write(self, oprot):
4394
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4395
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4396
      return
4397
    oprot.writeStructBegin('getItemPricing_result')
4398
    if self.success is not None:
4399
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
4400
      self.success.write(oprot)
4401
      oprot.writeFieldEnd()
4402
    if self.cex is not None:
4403
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
4404
      self.cex.write(oprot)
4405
      oprot.writeFieldEnd()
4406
    oprot.writeFieldStop()
4407
    oprot.writeStructEnd()
4408
 
4409
  def validate(self):
4410
    return
4411
 
4412
 
4413
  def __repr__(self):
4414
    L = ['%s=%r' % (key, value)
4415
      for key, value in self.__dict__.iteritems()]
4416
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4417
 
4418
  def __eq__(self, other):
4419
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4420
 
4421
  def __ne__(self, other):
4422
    return not (self == other)
4423
 
4424
class getAllItemPricing_args:
4425
  """
4426
  Attributes:
4427
   - itemId
4428
  """
4429
 
4430
  thrift_spec = (
4431
    None, # 0
4432
    (1, TType.I64, 'itemId', None, None, ), # 1
4433
  )
4434
 
4435
  def __init__(self, itemId=None,):
4436
    self.itemId = itemId
4437
 
4438
  def read(self, iprot):
4439
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4440
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4441
      return
4442
    iprot.readStructBegin()
4443
    while True:
4444
      (fname, ftype, fid) = iprot.readFieldBegin()
4445
      if ftype == TType.STOP:
4446
        break
4447
      if fid == 1:
4448
        if ftype == TType.I64:
4449
          self.itemId = iprot.readI64();
4450
        else:
4451
          iprot.skip(ftype)
4452
      else:
4453
        iprot.skip(ftype)
4454
      iprot.readFieldEnd()
4455
    iprot.readStructEnd()
4456
 
4457
  def write(self, oprot):
4458
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4459
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4460
      return
4461
    oprot.writeStructBegin('getAllItemPricing_args')
4462
    if self.itemId is not None:
4463
      oprot.writeFieldBegin('itemId', TType.I64, 1)
4464
      oprot.writeI64(self.itemId)
4465
      oprot.writeFieldEnd()
4466
    oprot.writeFieldStop()
4467
    oprot.writeStructEnd()
4468
 
4469
  def validate(self):
4470
    return
4471
 
4472
 
4473
  def __repr__(self):
4474
    L = ['%s=%r' % (key, value)
4475
      for key, value in self.__dict__.iteritems()]
4476
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4477
 
4478
  def __eq__(self, other):
4479
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4480
 
4481
  def __ne__(self, other):
4482
    return not (self == other)
4483
 
4484
class getAllItemPricing_result:
4485
  """
4486
  Attributes:
4487
   - success
4488
   - cex
4489
  """
4490
 
4491
  thrift_spec = (
4492
    (0, TType.LIST, 'success', (TType.STRUCT,(VendorItemPricing, VendorItemPricing.thrift_spec)), None, ), # 0
4493
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
4494
  )
4495
 
4496
  def __init__(self, success=None, cex=None,):
4497
    self.success = success
4498
    self.cex = cex
4499
 
4500
  def read(self, iprot):
4501
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4502
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4503
      return
4504
    iprot.readStructBegin()
4505
    while True:
4506
      (fname, ftype, fid) = iprot.readFieldBegin()
4507
      if ftype == TType.STOP:
4508
        break
4509
      if fid == 0:
4510
        if ftype == TType.LIST:
4511
          self.success = []
4512
          (_etype60, _size57) = iprot.readListBegin()
4513
          for _i61 in xrange(_size57):
4514
            _elem62 = VendorItemPricing()
4515
            _elem62.read(iprot)
4516
            self.success.append(_elem62)
4517
          iprot.readListEnd()
4518
        else:
4519
          iprot.skip(ftype)
4520
      elif fid == 1:
4521
        if ftype == TType.STRUCT:
4522
          self.cex = InventoryServiceException()
4523
          self.cex.read(iprot)
4524
        else:
4525
          iprot.skip(ftype)
4526
      else:
4527
        iprot.skip(ftype)
4528
      iprot.readFieldEnd()
4529
    iprot.readStructEnd()
4530
 
4531
  def write(self, oprot):
4532
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4533
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4534
      return
4535
    oprot.writeStructBegin('getAllItemPricing_result')
4536
    if self.success is not None:
4537
      oprot.writeFieldBegin('success', TType.LIST, 0)
4538
      oprot.writeListBegin(TType.STRUCT, len(self.success))
4539
      for iter63 in self.success:
4540
        iter63.write(oprot)
4541
      oprot.writeListEnd()
4542
      oprot.writeFieldEnd()
4543
    if self.cex is not None:
4544
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
4545
      self.cex.write(oprot)
4546
      oprot.writeFieldEnd()
4547
    oprot.writeFieldStop()
4548
    oprot.writeStructEnd()
4549
 
4550
  def validate(self):
4551
    return
4552
 
4553
 
4554
  def __repr__(self):
4555
    L = ['%s=%r' % (key, value)
4556
      for key, value in self.__dict__.iteritems()]
4557
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4558
 
4559
  def __eq__(self, other):
4560
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4561
 
4562
  def __ne__(self, other):
4563
    return not (self == other)
4564
 
4565
class addVendorItemPricing_args:
4566
  """
4567
  Attributes:
4568
   - vendorItemPricing
4569
  """
4570
 
4571
  thrift_spec = (
4572
    None, # 0
4573
    (1, TType.STRUCT, 'vendorItemPricing', (VendorItemPricing, VendorItemPricing.thrift_spec), None, ), # 1
4574
  )
4575
 
4576
  def __init__(self, vendorItemPricing=None,):
4577
    self.vendorItemPricing = vendorItemPricing
4578
 
4579
  def read(self, iprot):
4580
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4581
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4582
      return
4583
    iprot.readStructBegin()
4584
    while True:
4585
      (fname, ftype, fid) = iprot.readFieldBegin()
4586
      if ftype == TType.STOP:
4587
        break
4588
      if fid == 1:
4589
        if ftype == TType.STRUCT:
4590
          self.vendorItemPricing = VendorItemPricing()
4591
          self.vendorItemPricing.read(iprot)
4592
        else:
4593
          iprot.skip(ftype)
4594
      else:
4595
        iprot.skip(ftype)
4596
      iprot.readFieldEnd()
4597
    iprot.readStructEnd()
4598
 
4599
  def write(self, oprot):
4600
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4601
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4602
      return
4603
    oprot.writeStructBegin('addVendorItemPricing_args')
4604
    if self.vendorItemPricing is not None:
4605
      oprot.writeFieldBegin('vendorItemPricing', TType.STRUCT, 1)
4606
      self.vendorItemPricing.write(oprot)
4607
      oprot.writeFieldEnd()
4608
    oprot.writeFieldStop()
4609
    oprot.writeStructEnd()
4610
 
4611
  def validate(self):
4612
    return
4613
 
4614
 
4615
  def __repr__(self):
4616
    L = ['%s=%r' % (key, value)
4617
      for key, value in self.__dict__.iteritems()]
4618
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4619
 
4620
  def __eq__(self, other):
4621
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4622
 
4623
  def __ne__(self, other):
4624
    return not (self == other)
4625
 
4626
class addVendorItemPricing_result:
4627
  """
4628
  Attributes:
4629
   - cex
4630
  """
4631
 
4632
  thrift_spec = (
4633
    None, # 0
4634
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
4635
  )
4636
 
4637
  def __init__(self, cex=None,):
4638
    self.cex = cex
4639
 
4640
  def read(self, iprot):
4641
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4642
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4643
      return
4644
    iprot.readStructBegin()
4645
    while True:
4646
      (fname, ftype, fid) = iprot.readFieldBegin()
4647
      if ftype == TType.STOP:
4648
        break
4649
      if fid == 1:
4650
        if ftype == TType.STRUCT:
4651
          self.cex = InventoryServiceException()
4652
          self.cex.read(iprot)
4653
        else:
4654
          iprot.skip(ftype)
4655
      else:
4656
        iprot.skip(ftype)
4657
      iprot.readFieldEnd()
4658
    iprot.readStructEnd()
4659
 
4660
  def write(self, oprot):
4661
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4662
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4663
      return
4664
    oprot.writeStructBegin('addVendorItemPricing_result')
4665
    if self.cex is not None:
4666
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
4667
      self.cex.write(oprot)
4668
      oprot.writeFieldEnd()
4669
    oprot.writeFieldStop()
4670
    oprot.writeStructEnd()
4671
 
4672
  def validate(self):
4673
    return
4674
 
4675
 
4676
  def __repr__(self):
4677
    L = ['%s=%r' % (key, value)
4678
      for key, value in self.__dict__.iteritems()]
4679
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4680
 
4681
  def __eq__(self, other):
4682
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4683
 
4684
  def __ne__(self, other):
4685
    return not (self == other)
4686
 
4687
class getVendor_args:
4688
  """
4689
  Attributes:
4690
   - vendorId
4691
  """
4692
 
4693
  thrift_spec = (
4694
    None, # 0
4695
    (1, TType.I64, 'vendorId', None, None, ), # 1
4696
  )
4697
 
4698
  def __init__(self, vendorId=None,):
4699
    self.vendorId = vendorId
4700
 
4701
  def read(self, iprot):
4702
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4703
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4704
      return
4705
    iprot.readStructBegin()
4706
    while True:
4707
      (fname, ftype, fid) = iprot.readFieldBegin()
4708
      if ftype == TType.STOP:
4709
        break
4710
      if fid == 1:
4711
        if ftype == TType.I64:
4712
          self.vendorId = iprot.readI64();
4713
        else:
4714
          iprot.skip(ftype)
4715
      else:
4716
        iprot.skip(ftype)
4717
      iprot.readFieldEnd()
4718
    iprot.readStructEnd()
4719
 
4720
  def write(self, oprot):
4721
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4722
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4723
      return
4724
    oprot.writeStructBegin('getVendor_args')
4725
    if self.vendorId is not None:
4726
      oprot.writeFieldBegin('vendorId', TType.I64, 1)
4727
      oprot.writeI64(self.vendorId)
4728
      oprot.writeFieldEnd()
4729
    oprot.writeFieldStop()
4730
    oprot.writeStructEnd()
4731
 
4732
  def validate(self):
4733
    return
4734
 
4735
 
4736
  def __repr__(self):
4737
    L = ['%s=%r' % (key, value)
4738
      for key, value in self.__dict__.iteritems()]
4739
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4740
 
4741
  def __eq__(self, other):
4742
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4743
 
4744
  def __ne__(self, other):
4745
    return not (self == other)
4746
 
4747
class getVendor_result:
4748
  """
4749
  Attributes:
4750
   - success
4751
  """
4752
 
4753
  thrift_spec = (
4754
    (0, TType.STRUCT, 'success', (Vendor, Vendor.thrift_spec), None, ), # 0
4755
  )
4756
 
4757
  def __init__(self, success=None,):
4758
    self.success = success
4759
 
4760
  def read(self, iprot):
4761
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4762
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4763
      return
4764
    iprot.readStructBegin()
4765
    while True:
4766
      (fname, ftype, fid) = iprot.readFieldBegin()
4767
      if ftype == TType.STOP:
4768
        break
4769
      if fid == 0:
4770
        if ftype == TType.STRUCT:
4771
          self.success = Vendor()
4772
          self.success.read(iprot)
4773
        else:
4774
          iprot.skip(ftype)
4775
      else:
4776
        iprot.skip(ftype)
4777
      iprot.readFieldEnd()
4778
    iprot.readStructEnd()
4779
 
4780
  def write(self, oprot):
4781
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4782
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4783
      return
4784
    oprot.writeStructBegin('getVendor_result')
4785
    if self.success is not None:
4786
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
4787
      self.success.write(oprot)
4788
      oprot.writeFieldEnd()
4789
    oprot.writeFieldStop()
4790
    oprot.writeStructEnd()
4791
 
4792
  def validate(self):
4793
    return
4794
 
4795
 
4796
  def __repr__(self):
4797
    L = ['%s=%r' % (key, value)
4798
      for key, value in self.__dict__.iteritems()]
4799
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4800
 
4801
  def __eq__(self, other):
4802
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4803
 
4804
  def __ne__(self, other):
4805
    return not (self == other)
4806
 
4807
class getAllVendors_args:
4808
 
4809
  thrift_spec = (
4810
  )
4811
 
4812
  def read(self, iprot):
4813
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4814
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4815
      return
4816
    iprot.readStructBegin()
4817
    while True:
4818
      (fname, ftype, fid) = iprot.readFieldBegin()
4819
      if ftype == TType.STOP:
4820
        break
4821
      else:
4822
        iprot.skip(ftype)
4823
      iprot.readFieldEnd()
4824
    iprot.readStructEnd()
4825
 
4826
  def write(self, oprot):
4827
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4828
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4829
      return
4830
    oprot.writeStructBegin('getAllVendors_args')
4831
    oprot.writeFieldStop()
4832
    oprot.writeStructEnd()
4833
 
4834
  def validate(self):
4835
    return
4836
 
4837
 
4838
  def __repr__(self):
4839
    L = ['%s=%r' % (key, value)
4840
      for key, value in self.__dict__.iteritems()]
4841
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4842
 
4843
  def __eq__(self, other):
4844
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4845
 
4846
  def __ne__(self, other):
4847
    return not (self == other)
4848
 
4849
class getAllVendors_result:
4850
  """
4851
  Attributes:
4852
   - success
4853
  """
4854
 
4855
  thrift_spec = (
4856
    (0, TType.LIST, 'success', (TType.STRUCT,(Vendor, Vendor.thrift_spec)), None, ), # 0
4857
  )
4858
 
4859
  def __init__(self, success=None,):
4860
    self.success = success
4861
 
4862
  def read(self, iprot):
4863
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4864
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4865
      return
4866
    iprot.readStructBegin()
4867
    while True:
4868
      (fname, ftype, fid) = iprot.readFieldBegin()
4869
      if ftype == TType.STOP:
4870
        break
4871
      if fid == 0:
4872
        if ftype == TType.LIST:
4873
          self.success = []
4874
          (_etype67, _size64) = iprot.readListBegin()
4875
          for _i68 in xrange(_size64):
4876
            _elem69 = Vendor()
4877
            _elem69.read(iprot)
4878
            self.success.append(_elem69)
4879
          iprot.readListEnd()
4880
        else:
4881
          iprot.skip(ftype)
4882
      else:
4883
        iprot.skip(ftype)
4884
      iprot.readFieldEnd()
4885
    iprot.readStructEnd()
4886
 
4887
  def write(self, oprot):
4888
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4889
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4890
      return
4891
    oprot.writeStructBegin('getAllVendors_result')
4892
    if self.success is not None:
4893
      oprot.writeFieldBegin('success', TType.LIST, 0)
4894
      oprot.writeListBegin(TType.STRUCT, len(self.success))
4895
      for iter70 in self.success:
4896
        iter70.write(oprot)
4897
      oprot.writeListEnd()
4898
      oprot.writeFieldEnd()
4899
    oprot.writeFieldStop()
4900
    oprot.writeStructEnd()
4901
 
4902
  def validate(self):
4903
    return
4904
 
4905
 
4906
  def __repr__(self):
4907
    L = ['%s=%r' % (key, value)
4908
      for key, value in self.__dict__.iteritems()]
4909
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4910
 
4911
  def __eq__(self, other):
4912
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4913
 
4914
  def __ne__(self, other):
4915
    return not (self == other)
4916
 
4917
class addVendorItemMapping_args:
4918
  """
4919
  Attributes:
4920
   - key
4921
   - vendorItemMapping
4922
  """
4923
 
4924
  thrift_spec = (
4925
    None, # 0
4926
    (1, TType.STRING, 'key', None, None, ), # 1
4927
    (2, TType.STRUCT, 'vendorItemMapping', (VendorItemMapping, VendorItemMapping.thrift_spec), None, ), # 2
4928
  )
4929
 
4930
  def __init__(self, key=None, vendorItemMapping=None,):
4931
    self.key = key
4932
    self.vendorItemMapping = vendorItemMapping
4933
 
4934
  def read(self, iprot):
4935
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4936
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4937
      return
4938
    iprot.readStructBegin()
4939
    while True:
4940
      (fname, ftype, fid) = iprot.readFieldBegin()
4941
      if ftype == TType.STOP:
4942
        break
4943
      if fid == 1:
4944
        if ftype == TType.STRING:
4945
          self.key = iprot.readString();
4946
        else:
4947
          iprot.skip(ftype)
4948
      elif fid == 2:
4949
        if ftype == TType.STRUCT:
4950
          self.vendorItemMapping = VendorItemMapping()
4951
          self.vendorItemMapping.read(iprot)
4952
        else:
4953
          iprot.skip(ftype)
4954
      else:
4955
        iprot.skip(ftype)
4956
      iprot.readFieldEnd()
4957
    iprot.readStructEnd()
4958
 
4959
  def write(self, oprot):
4960
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4961
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4962
      return
4963
    oprot.writeStructBegin('addVendorItemMapping_args')
4964
    if self.key is not None:
4965
      oprot.writeFieldBegin('key', TType.STRING, 1)
4966
      oprot.writeString(self.key)
4967
      oprot.writeFieldEnd()
4968
    if self.vendorItemMapping is not None:
4969
      oprot.writeFieldBegin('vendorItemMapping', TType.STRUCT, 2)
4970
      self.vendorItemMapping.write(oprot)
4971
      oprot.writeFieldEnd()
4972
    oprot.writeFieldStop()
4973
    oprot.writeStructEnd()
4974
 
4975
  def validate(self):
4976
    return
4977
 
4978
 
4979
  def __repr__(self):
4980
    L = ['%s=%r' % (key, value)
4981
      for key, value in self.__dict__.iteritems()]
4982
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4983
 
4984
  def __eq__(self, other):
4985
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4986
 
4987
  def __ne__(self, other):
4988
    return not (self == other)
4989
 
4990
class addVendorItemMapping_result:
4991
  """
4992
  Attributes:
4993
   - cex
4994
  """
4995
 
4996
  thrift_spec = (
4997
    None, # 0
4998
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
4999
  )
5000
 
5001
  def __init__(self, cex=None,):
5002
    self.cex = cex
5003
 
5004
  def read(self, iprot):
5005
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5006
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5007
      return
5008
    iprot.readStructBegin()
5009
    while True:
5010
      (fname, ftype, fid) = iprot.readFieldBegin()
5011
      if ftype == TType.STOP:
5012
        break
5013
      if fid == 1:
5014
        if ftype == TType.STRUCT:
5015
          self.cex = InventoryServiceException()
5016
          self.cex.read(iprot)
5017
        else:
5018
          iprot.skip(ftype)
5019
      else:
5020
        iprot.skip(ftype)
5021
      iprot.readFieldEnd()
5022
    iprot.readStructEnd()
5023
 
5024
  def write(self, oprot):
5025
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5026
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5027
      return
5028
    oprot.writeStructBegin('addVendorItemMapping_result')
5029
    if self.cex is not None:
5030
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
5031
      self.cex.write(oprot)
5032
      oprot.writeFieldEnd()
5033
    oprot.writeFieldStop()
5034
    oprot.writeStructEnd()
5035
 
5036
  def validate(self):
5037
    return
5038
 
5039
 
5040
  def __repr__(self):
5041
    L = ['%s=%r' % (key, value)
5042
      for key, value in self.__dict__.iteritems()]
5043
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5044
 
5045
  def __eq__(self, other):
5046
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5047
 
5048
  def __ne__(self, other):
5049
    return not (self == other)
5050
 
5051
class getVendorItemMappings_args:
5052
  """
5053
  Attributes:
5054
   - itemId
5055
  """
5056
 
5057
  thrift_spec = (
5058
    None, # 0
5059
    (1, TType.I64, 'itemId', None, None, ), # 1
5060
  )
5061
 
5062
  def __init__(self, itemId=None,):
5063
    self.itemId = itemId
5064
 
5065
  def read(self, iprot):
5066
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5067
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5068
      return
5069
    iprot.readStructBegin()
5070
    while True:
5071
      (fname, ftype, fid) = iprot.readFieldBegin()
5072
      if ftype == TType.STOP:
5073
        break
5074
      if fid == 1:
5075
        if ftype == TType.I64:
5076
          self.itemId = iprot.readI64();
5077
        else:
5078
          iprot.skip(ftype)
5079
      else:
5080
        iprot.skip(ftype)
5081
      iprot.readFieldEnd()
5082
    iprot.readStructEnd()
5083
 
5084
  def write(self, oprot):
5085
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5086
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5087
      return
5088
    oprot.writeStructBegin('getVendorItemMappings_args')
5089
    if self.itemId is not None:
5090
      oprot.writeFieldBegin('itemId', TType.I64, 1)
5091
      oprot.writeI64(self.itemId)
5092
      oprot.writeFieldEnd()
5093
    oprot.writeFieldStop()
5094
    oprot.writeStructEnd()
5095
 
5096
  def validate(self):
5097
    return
5098
 
5099
 
5100
  def __repr__(self):
5101
    L = ['%s=%r' % (key, value)
5102
      for key, value in self.__dict__.iteritems()]
5103
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5104
 
5105
  def __eq__(self, other):
5106
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5107
 
5108
  def __ne__(self, other):
5109
    return not (self == other)
5110
 
5111
class getVendorItemMappings_result:
5112
  """
5113
  Attributes:
5114
   - success
5115
   - cex
5116
  """
5117
 
5118
  thrift_spec = (
5119
    (0, TType.LIST, 'success', (TType.STRUCT,(VendorItemMapping, VendorItemMapping.thrift_spec)), None, ), # 0
5120
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
5121
  )
5122
 
5123
  def __init__(self, success=None, cex=None,):
5124
    self.success = success
5125
    self.cex = cex
5126
 
5127
  def read(self, iprot):
5128
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5129
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5130
      return
5131
    iprot.readStructBegin()
5132
    while True:
5133
      (fname, ftype, fid) = iprot.readFieldBegin()
5134
      if ftype == TType.STOP:
5135
        break
5136
      if fid == 0:
5137
        if ftype == TType.LIST:
5138
          self.success = []
5139
          (_etype74, _size71) = iprot.readListBegin()
5140
          for _i75 in xrange(_size71):
5141
            _elem76 = VendorItemMapping()
5142
            _elem76.read(iprot)
5143
            self.success.append(_elem76)
5144
          iprot.readListEnd()
5145
        else:
5146
          iprot.skip(ftype)
5147
      elif fid == 1:
5148
        if ftype == TType.STRUCT:
5149
          self.cex = InventoryServiceException()
5150
          self.cex.read(iprot)
5151
        else:
5152
          iprot.skip(ftype)
5153
      else:
5154
        iprot.skip(ftype)
5155
      iprot.readFieldEnd()
5156
    iprot.readStructEnd()
5157
 
5158
  def write(self, oprot):
5159
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5160
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5161
      return
5162
    oprot.writeStructBegin('getVendorItemMappings_result')
5163
    if self.success is not None:
5164
      oprot.writeFieldBegin('success', TType.LIST, 0)
5165
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5166
      for iter77 in self.success:
5167
        iter77.write(oprot)
5168
      oprot.writeListEnd()
5169
      oprot.writeFieldEnd()
5170
    if self.cex is not None:
5171
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
5172
      self.cex.write(oprot)
5173
      oprot.writeFieldEnd()
5174
    oprot.writeFieldStop()
5175
    oprot.writeStructEnd()
5176
 
5177
  def validate(self):
5178
    return
5179
 
5180
 
5181
  def __repr__(self):
5182
    L = ['%s=%r' % (key, value)
5183
      for key, value in self.__dict__.iteritems()]
5184
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5185
 
5186
  def __eq__(self, other):
5187
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5188
 
5189
  def __ne__(self, other):
5190
    return not (self == other)
5191
 
5192
class getPendingOrdersInventory_args:
5193
  """
5194
  Attributes:
5195
   - vendorid
5196
  """
5197
 
5198
  thrift_spec = (
5199
    None, # 0
5200
    (1, TType.I64, 'vendorid', None, None, ), # 1
5201
  )
5202
 
5203
  def __init__(self, vendorid=None,):
5204
    self.vendorid = vendorid
5205
 
5206
  def read(self, iprot):
5207
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5208
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5209
      return
5210
    iprot.readStructBegin()
5211
    while True:
5212
      (fname, ftype, fid) = iprot.readFieldBegin()
5213
      if ftype == TType.STOP:
5214
        break
5215
      if fid == 1:
5216
        if ftype == TType.I64:
5217
          self.vendorid = iprot.readI64();
5218
        else:
5219
          iprot.skip(ftype)
5220
      else:
5221
        iprot.skip(ftype)
5222
      iprot.readFieldEnd()
5223
    iprot.readStructEnd()
5224
 
5225
  def write(self, oprot):
5226
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5227
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5228
      return
5229
    oprot.writeStructBegin('getPendingOrdersInventory_args')
5230
    if self.vendorid is not None:
5231
      oprot.writeFieldBegin('vendorid', TType.I64, 1)
5232
      oprot.writeI64(self.vendorid)
5233
      oprot.writeFieldEnd()
5234
    oprot.writeFieldStop()
5235
    oprot.writeStructEnd()
5236
 
5237
  def validate(self):
5238
    return
5239
 
5240
 
5241
  def __repr__(self):
5242
    L = ['%s=%r' % (key, value)
5243
      for key, value in self.__dict__.iteritems()]
5244
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5245
 
5246
  def __eq__(self, other):
5247
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5248
 
5249
  def __ne__(self, other):
5250
    return not (self == other)
5251
 
5252
class getPendingOrdersInventory_result:
5253
  """
5254
  Attributes:
5255
   - success
5256
  """
5257
 
5258
  thrift_spec = (
5259
    (0, TType.LIST, 'success', (TType.STRUCT,(AvailableAndReservedStock, AvailableAndReservedStock.thrift_spec)), None, ), # 0
5260
  )
5261
 
5262
  def __init__(self, success=None,):
5263
    self.success = success
5264
 
5265
  def read(self, iprot):
5266
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5267
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5268
      return
5269
    iprot.readStructBegin()
5270
    while True:
5271
      (fname, ftype, fid) = iprot.readFieldBegin()
5272
      if ftype == TType.STOP:
5273
        break
5274
      if fid == 0:
5275
        if ftype == TType.LIST:
5276
          self.success = []
5277
          (_etype81, _size78) = iprot.readListBegin()
5278
          for _i82 in xrange(_size78):
5279
            _elem83 = AvailableAndReservedStock()
5280
            _elem83.read(iprot)
5281
            self.success.append(_elem83)
5282
          iprot.readListEnd()
5283
        else:
5284
          iprot.skip(ftype)
5285
      else:
5286
        iprot.skip(ftype)
5287
      iprot.readFieldEnd()
5288
    iprot.readStructEnd()
5289
 
5290
  def write(self, oprot):
5291
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5292
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5293
      return
5294
    oprot.writeStructBegin('getPendingOrdersInventory_result')
5295
    if self.success is not None:
5296
      oprot.writeFieldBegin('success', TType.LIST, 0)
5297
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5298
      for iter84 in self.success:
5299
        iter84.write(oprot)
5300
      oprot.writeListEnd()
5301
      oprot.writeFieldEnd()
5302
    oprot.writeFieldStop()
5303
    oprot.writeStructEnd()
5304
 
5305
  def validate(self):
5306
    return
5307
 
5308
 
5309
  def __repr__(self):
5310
    L = ['%s=%r' % (key, value)
5311
      for key, value in self.__dict__.iteritems()]
5312
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5313
 
5314
  def __eq__(self, other):
5315
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5316
 
5317
  def __ne__(self, other):
5318
    return not (self == other)
5319
 
5320
class getWarehouses_args:
5321
  """
5322
  Attributes:
5323
   - warehouseType
5324
   - inventoryType
5325
   - vendorId
5326
   - billingWarehouseId
5327
   - shippingWarehouseId
5328
  """
5329
 
5330
  thrift_spec = (
5331
    None, # 0
5332
    (1, TType.I32, 'warehouseType', None, None, ), # 1
5333
    (2, TType.I32, 'inventoryType', None, None, ), # 2
5334
    (3, TType.I64, 'vendorId', None, None, ), # 3
5335
    (4, TType.I64, 'billingWarehouseId', None, None, ), # 4
5336
    (5, TType.I64, 'shippingWarehouseId', None, None, ), # 5
5337
  )
5338
 
5339
  def __init__(self, warehouseType=None, inventoryType=None, vendorId=None, billingWarehouseId=None, shippingWarehouseId=None,):
5340
    self.warehouseType = warehouseType
5341
    self.inventoryType = inventoryType
5342
    self.vendorId = vendorId
5343
    self.billingWarehouseId = billingWarehouseId
5344
    self.shippingWarehouseId = shippingWarehouseId
5345
 
5346
  def read(self, iprot):
5347
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5348
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5349
      return
5350
    iprot.readStructBegin()
5351
    while True:
5352
      (fname, ftype, fid) = iprot.readFieldBegin()
5353
      if ftype == TType.STOP:
5354
        break
5355
      if fid == 1:
5356
        if ftype == TType.I32:
5357
          self.warehouseType = iprot.readI32();
5358
        else:
5359
          iprot.skip(ftype)
5360
      elif fid == 2:
5361
        if ftype == TType.I32:
5362
          self.inventoryType = iprot.readI32();
5363
        else:
5364
          iprot.skip(ftype)
5365
      elif fid == 3:
5366
        if ftype == TType.I64:
5367
          self.vendorId = iprot.readI64();
5368
        else:
5369
          iprot.skip(ftype)
5370
      elif fid == 4:
5371
        if ftype == TType.I64:
5372
          self.billingWarehouseId = iprot.readI64();
5373
        else:
5374
          iprot.skip(ftype)
5375
      elif fid == 5:
5376
        if ftype == TType.I64:
5377
          self.shippingWarehouseId = iprot.readI64();
5378
        else:
5379
          iprot.skip(ftype)
5380
      else:
5381
        iprot.skip(ftype)
5382
      iprot.readFieldEnd()
5383
    iprot.readStructEnd()
5384
 
5385
  def write(self, oprot):
5386
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5387
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5388
      return
5389
    oprot.writeStructBegin('getWarehouses_args')
5390
    if self.warehouseType is not None:
5391
      oprot.writeFieldBegin('warehouseType', TType.I32, 1)
5392
      oprot.writeI32(self.warehouseType)
5393
      oprot.writeFieldEnd()
5394
    if self.inventoryType is not None:
5395
      oprot.writeFieldBegin('inventoryType', TType.I32, 2)
5396
      oprot.writeI32(self.inventoryType)
5397
      oprot.writeFieldEnd()
5398
    if self.vendorId is not None:
5399
      oprot.writeFieldBegin('vendorId', TType.I64, 3)
5400
      oprot.writeI64(self.vendorId)
5401
      oprot.writeFieldEnd()
5402
    if self.billingWarehouseId is not None:
5403
      oprot.writeFieldBegin('billingWarehouseId', TType.I64, 4)
5404
      oprot.writeI64(self.billingWarehouseId)
5405
      oprot.writeFieldEnd()
5406
    if self.shippingWarehouseId is not None:
5407
      oprot.writeFieldBegin('shippingWarehouseId', TType.I64, 5)
5408
      oprot.writeI64(self.shippingWarehouseId)
5409
      oprot.writeFieldEnd()
5410
    oprot.writeFieldStop()
5411
    oprot.writeStructEnd()
5412
 
5413
  def validate(self):
5414
    return
5415
 
5416
 
5417
  def __repr__(self):
5418
    L = ['%s=%r' % (key, value)
5419
      for key, value in self.__dict__.iteritems()]
5420
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5421
 
5422
  def __eq__(self, other):
5423
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5424
 
5425
  def __ne__(self, other):
5426
    return not (self == other)
5427
 
5428
class getWarehouses_result:
5429
  """
5430
  Attributes:
5431
   - success
5432
  """
5433
 
5434
  thrift_spec = (
5435
    (0, TType.LIST, 'success', (TType.STRUCT,(Warehouse, Warehouse.thrift_spec)), None, ), # 0
5436
  )
5437
 
5438
  def __init__(self, success=None,):
5439
    self.success = success
5440
 
5441
  def read(self, iprot):
5442
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5443
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5444
      return
5445
    iprot.readStructBegin()
5446
    while True:
5447
      (fname, ftype, fid) = iprot.readFieldBegin()
5448
      if ftype == TType.STOP:
5449
        break
5450
      if fid == 0:
5451
        if ftype == TType.LIST:
5452
          self.success = []
5453
          (_etype88, _size85) = iprot.readListBegin()
5454
          for _i89 in xrange(_size85):
5455
            _elem90 = Warehouse()
5456
            _elem90.read(iprot)
5457
            self.success.append(_elem90)
5458
          iprot.readListEnd()
5459
        else:
5460
          iprot.skip(ftype)
5461
      else:
5462
        iprot.skip(ftype)
5463
      iprot.readFieldEnd()
5464
    iprot.readStructEnd()
5465
 
5466
  def write(self, oprot):
5467
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5468
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5469
      return
5470
    oprot.writeStructBegin('getWarehouses_result')
5471
    if self.success is not None:
5472
      oprot.writeFieldBegin('success', TType.LIST, 0)
5473
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5474
      for iter91 in self.success:
5475
        iter91.write(oprot)
5476
      oprot.writeListEnd()
5477
      oprot.writeFieldEnd()
5478
    oprot.writeFieldStop()
5479
    oprot.writeStructEnd()
5480
 
5481
  def validate(self):
5482
    return
5483
 
5484
 
5485
  def __repr__(self):
5486
    L = ['%s=%r' % (key, value)
5487
      for key, value in self.__dict__.iteritems()]
5488
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5489
 
5490
  def __eq__(self, other):
5491
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5492
 
5493
  def __ne__(self, other):
5494
    return not (self == other)
5495
 
5496
class resetAvailability_args:
5497
  """
5498
  Attributes:
5499
   - itemKey
5500
   - vendorId
5501
   - quantity
5502
   - warehouseId
5503
  """
5504
 
5505
  thrift_spec = (
5506
    None, # 0
5507
    (1, TType.STRING, 'itemKey', None, None, ), # 1
5508
    (2, TType.I64, 'vendorId', None, None, ), # 2
5509
    (3, TType.I64, 'quantity', None, None, ), # 3
5510
    (4, TType.I64, 'warehouseId', None, None, ), # 4
5511
  )
5512
 
5513
  def __init__(self, itemKey=None, vendorId=None, quantity=None, warehouseId=None,):
5514
    self.itemKey = itemKey
5515
    self.vendorId = vendorId
5516
    self.quantity = quantity
5517
    self.warehouseId = warehouseId
5518
 
5519
  def read(self, iprot):
5520
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5521
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5522
      return
5523
    iprot.readStructBegin()
5524
    while True:
5525
      (fname, ftype, fid) = iprot.readFieldBegin()
5526
      if ftype == TType.STOP:
5527
        break
5528
      if fid == 1:
5529
        if ftype == TType.STRING:
5530
          self.itemKey = iprot.readString();
5531
        else:
5532
          iprot.skip(ftype)
5533
      elif fid == 2:
5534
        if ftype == TType.I64:
5535
          self.vendorId = iprot.readI64();
5536
        else:
5537
          iprot.skip(ftype)
5538
      elif fid == 3:
5539
        if ftype == TType.I64:
5540
          self.quantity = iprot.readI64();
5541
        else:
5542
          iprot.skip(ftype)
5543
      elif fid == 4:
5544
        if ftype == TType.I64:
5545
          self.warehouseId = iprot.readI64();
5546
        else:
5547
          iprot.skip(ftype)
5548
      else:
5549
        iprot.skip(ftype)
5550
      iprot.readFieldEnd()
5551
    iprot.readStructEnd()
5552
 
5553
  def write(self, oprot):
5554
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5555
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5556
      return
5557
    oprot.writeStructBegin('resetAvailability_args')
5558
    if self.itemKey is not None:
5559
      oprot.writeFieldBegin('itemKey', TType.STRING, 1)
5560
      oprot.writeString(self.itemKey)
5561
      oprot.writeFieldEnd()
5562
    if self.vendorId is not None:
5563
      oprot.writeFieldBegin('vendorId', TType.I64, 2)
5564
      oprot.writeI64(self.vendorId)
5565
      oprot.writeFieldEnd()
5566
    if self.quantity is not None:
5567
      oprot.writeFieldBegin('quantity', TType.I64, 3)
5568
      oprot.writeI64(self.quantity)
5569
      oprot.writeFieldEnd()
5570
    if self.warehouseId is not None:
5571
      oprot.writeFieldBegin('warehouseId', TType.I64, 4)
5572
      oprot.writeI64(self.warehouseId)
5573
      oprot.writeFieldEnd()
5574
    oprot.writeFieldStop()
5575
    oprot.writeStructEnd()
5576
 
5577
  def validate(self):
5578
    return
5579
 
5580
 
5581
  def __repr__(self):
5582
    L = ['%s=%r' % (key, value)
5583
      for key, value in self.__dict__.iteritems()]
5584
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5585
 
5586
  def __eq__(self, other):
5587
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5588
 
5589
  def __ne__(self, other):
5590
    return not (self == other)
5591
 
5592
class resetAvailability_result:
5593
  """
5594
  Attributes:
5595
   - cex
5596
  """
5597
 
5598
  thrift_spec = (
5599
    None, # 0
5600
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
5601
  )
5602
 
5603
  def __init__(self, cex=None,):
5604
    self.cex = cex
5605
 
5606
  def read(self, iprot):
5607
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5608
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5609
      return
5610
    iprot.readStructBegin()
5611
    while True:
5612
      (fname, ftype, fid) = iprot.readFieldBegin()
5613
      if ftype == TType.STOP:
5614
        break
5615
      if fid == 1:
5616
        if ftype == TType.STRUCT:
5617
          self.cex = InventoryServiceException()
5618
          self.cex.read(iprot)
5619
        else:
5620
          iprot.skip(ftype)
5621
      else:
5622
        iprot.skip(ftype)
5623
      iprot.readFieldEnd()
5624
    iprot.readStructEnd()
5625
 
5626
  def write(self, oprot):
5627
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5628
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5629
      return
5630
    oprot.writeStructBegin('resetAvailability_result')
5631
    if self.cex is not None:
5632
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
5633
      self.cex.write(oprot)
5634
      oprot.writeFieldEnd()
5635
    oprot.writeFieldStop()
5636
    oprot.writeStructEnd()
5637
 
5638
  def validate(self):
5639
    return
5640
 
5641
 
5642
  def __repr__(self):
5643
    L = ['%s=%r' % (key, value)
5644
      for key, value in self.__dict__.iteritems()]
5645
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5646
 
5647
  def __eq__(self, other):
5648
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5649
 
5650
  def __ne__(self, other):
5651
    return not (self == other)
5652
 
5653
class resetAvailabilityForWarehouse_args:
5654
  """
5655
  Attributes:
5656
   - warehouseId
5657
  """
5658
 
5659
  thrift_spec = (
5660
    None, # 0
5661
    (1, TType.I64, 'warehouseId', None, None, ), # 1
5662
  )
5663
 
5664
  def __init__(self, warehouseId=None,):
5665
    self.warehouseId = warehouseId
5666
 
5667
  def read(self, iprot):
5668
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5669
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5670
      return
5671
    iprot.readStructBegin()
5672
    while True:
5673
      (fname, ftype, fid) = iprot.readFieldBegin()
5674
      if ftype == TType.STOP:
5675
        break
5676
      if fid == 1:
5677
        if ftype == TType.I64:
5678
          self.warehouseId = iprot.readI64();
5679
        else:
5680
          iprot.skip(ftype)
5681
      else:
5682
        iprot.skip(ftype)
5683
      iprot.readFieldEnd()
5684
    iprot.readStructEnd()
5685
 
5686
  def write(self, oprot):
5687
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5688
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5689
      return
5690
    oprot.writeStructBegin('resetAvailabilityForWarehouse_args')
5691
    if self.warehouseId is not None:
5692
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
5693
      oprot.writeI64(self.warehouseId)
5694
      oprot.writeFieldEnd()
5695
    oprot.writeFieldStop()
5696
    oprot.writeStructEnd()
5697
 
5698
  def validate(self):
5699
    return
5700
 
5701
 
5702
  def __repr__(self):
5703
    L = ['%s=%r' % (key, value)
5704
      for key, value in self.__dict__.iteritems()]
5705
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5706
 
5707
  def __eq__(self, other):
5708
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5709
 
5710
  def __ne__(self, other):
5711
    return not (self == other)
5712
 
5713
class resetAvailabilityForWarehouse_result:
5714
  """
5715
  Attributes:
5716
   - cex
5717
  """
5718
 
5719
  thrift_spec = (
5720
    None, # 0
5721
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
5722
  )
5723
 
5724
  def __init__(self, cex=None,):
5725
    self.cex = cex
5726
 
5727
  def read(self, iprot):
5728
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5729
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5730
      return
5731
    iprot.readStructBegin()
5732
    while True:
5733
      (fname, ftype, fid) = iprot.readFieldBegin()
5734
      if ftype == TType.STOP:
5735
        break
5736
      if fid == 1:
5737
        if ftype == TType.STRUCT:
5738
          self.cex = InventoryServiceException()
5739
          self.cex.read(iprot)
5740
        else:
5741
          iprot.skip(ftype)
5742
      else:
5743
        iprot.skip(ftype)
5744
      iprot.readFieldEnd()
5745
    iprot.readStructEnd()
5746
 
5747
  def write(self, oprot):
5748
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5749
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5750
      return
5751
    oprot.writeStructBegin('resetAvailabilityForWarehouse_result')
5752
    if self.cex is not None:
5753
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
5754
      self.cex.write(oprot)
5755
      oprot.writeFieldEnd()
5756
    oprot.writeFieldStop()
5757
    oprot.writeStructEnd()
5758
 
5759
  def validate(self):
5760
    return
5761
 
5762
 
5763
  def __repr__(self):
5764
    L = ['%s=%r' % (key, value)
5765
      for key, value in self.__dict__.iteritems()]
5766
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5767
 
5768
  def __eq__(self, other):
5769
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5770
 
5771
  def __ne__(self, other):
5772
    return not (self == other)
5773
 
5774
class getItemKeysToBeProcessed_args:
5775
  """
5776
  Attributes:
5777
   - warehouseId
5778
  """
5779
 
5780
  thrift_spec = (
5781
    None, # 0
5782
    (1, TType.I64, 'warehouseId', None, None, ), # 1
5783
  )
5784
 
5785
  def __init__(self, warehouseId=None,):
5786
    self.warehouseId = warehouseId
5787
 
5788
  def read(self, iprot):
5789
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5790
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5791
      return
5792
    iprot.readStructBegin()
5793
    while True:
5794
      (fname, ftype, fid) = iprot.readFieldBegin()
5795
      if ftype == TType.STOP:
5796
        break
5797
      if fid == 1:
5798
        if ftype == TType.I64:
5799
          self.warehouseId = iprot.readI64();
5800
        else:
5801
          iprot.skip(ftype)
5802
      else:
5803
        iprot.skip(ftype)
5804
      iprot.readFieldEnd()
5805
    iprot.readStructEnd()
5806
 
5807
  def write(self, oprot):
5808
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5809
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5810
      return
5811
    oprot.writeStructBegin('getItemKeysToBeProcessed_args')
5812
    if self.warehouseId is not None:
5813
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
5814
      oprot.writeI64(self.warehouseId)
5815
      oprot.writeFieldEnd()
5816
    oprot.writeFieldStop()
5817
    oprot.writeStructEnd()
5818
 
5819
  def validate(self):
5820
    return
5821
 
5822
 
5823
  def __repr__(self):
5824
    L = ['%s=%r' % (key, value)
5825
      for key, value in self.__dict__.iteritems()]
5826
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5827
 
5828
  def __eq__(self, other):
5829
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5830
 
5831
  def __ne__(self, other):
5832
    return not (self == other)
5833
 
5834
class getItemKeysToBeProcessed_result:
5835
  """
5836
  Attributes:
5837
   - success
5838
  """
5839
 
5840
  thrift_spec = (
5841
    (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
5842
  )
5843
 
5844
  def __init__(self, success=None,):
5845
    self.success = success
5846
 
5847
  def read(self, iprot):
5848
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5849
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5850
      return
5851
    iprot.readStructBegin()
5852
    while True:
5853
      (fname, ftype, fid) = iprot.readFieldBegin()
5854
      if ftype == TType.STOP:
5855
        break
5856
      if fid == 0:
5857
        if ftype == TType.LIST:
5858
          self.success = []
5859
          (_etype95, _size92) = iprot.readListBegin()
5860
          for _i96 in xrange(_size92):
5861
            _elem97 = iprot.readString();
5862
            self.success.append(_elem97)
5863
          iprot.readListEnd()
5864
        else:
5865
          iprot.skip(ftype)
5866
      else:
5867
        iprot.skip(ftype)
5868
      iprot.readFieldEnd()
5869
    iprot.readStructEnd()
5870
 
5871
  def write(self, oprot):
5872
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5873
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5874
      return
5875
    oprot.writeStructBegin('getItemKeysToBeProcessed_result')
5876
    if self.success is not None:
5877
      oprot.writeFieldBegin('success', TType.LIST, 0)
5878
      oprot.writeListBegin(TType.STRING, len(self.success))
5879
      for iter98 in self.success:
5880
        oprot.writeString(iter98)
5881
      oprot.writeListEnd()
5882
      oprot.writeFieldEnd()
5883
    oprot.writeFieldStop()
5884
    oprot.writeStructEnd()
5885
 
5886
  def validate(self):
5887
    return
5888
 
5889
 
5890
  def __repr__(self):
5891
    L = ['%s=%r' % (key, value)
5892
      for key, value in self.__dict__.iteritems()]
5893
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5894
 
5895
  def __eq__(self, other):
5896
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5897
 
5898
  def __ne__(self, other):
5899
    return not (self == other)
5900
 
5901
class markMissedInventoryUpdatesAsProcessed_args:
5902
  """
5903
  Attributes:
5904
   - itemKey
5905
   - warehouseId
5906
  """
5907
 
5908
  thrift_spec = (
5909
    None, # 0
5910
    (1, TType.STRING, 'itemKey', None, None, ), # 1
5911
    (2, TType.I64, 'warehouseId', None, None, ), # 2
5912
  )
5913
 
5914
  def __init__(self, itemKey=None, warehouseId=None,):
5915
    self.itemKey = itemKey
5916
    self.warehouseId = warehouseId
5917
 
5918
  def read(self, iprot):
5919
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5920
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5921
      return
5922
    iprot.readStructBegin()
5923
    while True:
5924
      (fname, ftype, fid) = iprot.readFieldBegin()
5925
      if ftype == TType.STOP:
5926
        break
5927
      if fid == 1:
5928
        if ftype == TType.STRING:
5929
          self.itemKey = iprot.readString();
5930
        else:
5931
          iprot.skip(ftype)
5932
      elif fid == 2:
5933
        if ftype == TType.I64:
5934
          self.warehouseId = iprot.readI64();
5935
        else:
5936
          iprot.skip(ftype)
5937
      else:
5938
        iprot.skip(ftype)
5939
      iprot.readFieldEnd()
5940
    iprot.readStructEnd()
5941
 
5942
  def write(self, oprot):
5943
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5944
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5945
      return
5946
    oprot.writeStructBegin('markMissedInventoryUpdatesAsProcessed_args')
5947
    if self.itemKey is not None:
5948
      oprot.writeFieldBegin('itemKey', TType.STRING, 1)
5949
      oprot.writeString(self.itemKey)
5950
      oprot.writeFieldEnd()
5951
    if self.warehouseId is not None:
5952
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
5953
      oprot.writeI64(self.warehouseId)
5954
      oprot.writeFieldEnd()
5955
    oprot.writeFieldStop()
5956
    oprot.writeStructEnd()
5957
 
5958
  def validate(self):
5959
    return
5960
 
5961
 
5962
  def __repr__(self):
5963
    L = ['%s=%r' % (key, value)
5964
      for key, value in self.__dict__.iteritems()]
5965
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5966
 
5967
  def __eq__(self, other):
5968
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5969
 
5970
  def __ne__(self, other):
5971
    return not (self == other)
5972
 
5973
class markMissedInventoryUpdatesAsProcessed_result:
5974
 
5975
  thrift_spec = (
5976
  )
5977
 
5978
  def read(self, iprot):
5979
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5980
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5981
      return
5982
    iprot.readStructBegin()
5983
    while True:
5984
      (fname, ftype, fid) = iprot.readFieldBegin()
5985
      if ftype == TType.STOP:
5986
        break
5987
      else:
5988
        iprot.skip(ftype)
5989
      iprot.readFieldEnd()
5990
    iprot.readStructEnd()
5991
 
5992
  def write(self, oprot):
5993
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5994
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5995
      return
5996
    oprot.writeStructBegin('markMissedInventoryUpdatesAsProcessed_result')
5997
    oprot.writeFieldStop()
5998
    oprot.writeStructEnd()
5999
 
6000
  def validate(self):
6001
    return
6002
 
6003
 
6004
  def __repr__(self):
6005
    L = ['%s=%r' % (key, value)
6006
      for key, value in self.__dict__.iteritems()]
6007
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6008
 
6009
  def __eq__(self, other):
6010
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6011
 
6012
  def __ne__(self, other):
6013
    return not (self == other)
6014
 
6015
class getIgnoredItemKeys_args:
6016
 
6017
  thrift_spec = (
6018
  )
6019
 
6020
  def read(self, iprot):
6021
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6022
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6023
      return
6024
    iprot.readStructBegin()
6025
    while True:
6026
      (fname, ftype, fid) = iprot.readFieldBegin()
6027
      if ftype == TType.STOP:
6028
        break
6029
      else:
6030
        iprot.skip(ftype)
6031
      iprot.readFieldEnd()
6032
    iprot.readStructEnd()
6033
 
6034
  def write(self, oprot):
6035
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6036
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6037
      return
6038
    oprot.writeStructBegin('getIgnoredItemKeys_args')
6039
    oprot.writeFieldStop()
6040
    oprot.writeStructEnd()
6041
 
6042
  def validate(self):
6043
    return
6044
 
6045
 
6046
  def __repr__(self):
6047
    L = ['%s=%r' % (key, value)
6048
      for key, value in self.__dict__.iteritems()]
6049
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6050
 
6051
  def __eq__(self, other):
6052
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6053
 
6054
  def __ne__(self, other):
6055
    return not (self == other)
6056
 
6057
class getIgnoredItemKeys_result:
6058
  """
6059
  Attributes:
6060
   - success
6061
  """
6062
 
6063
  thrift_spec = (
6064
    (0, TType.MAP, 'success', (TType.STRING,None,TType.MAP,(TType.I64,None,TType.I64,None)), None, ), # 0
6065
  )
6066
 
6067
  def __init__(self, success=None,):
6068
    self.success = success
6069
 
6070
  def read(self, iprot):
6071
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6072
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6073
      return
6074
    iprot.readStructBegin()
6075
    while True:
6076
      (fname, ftype, fid) = iprot.readFieldBegin()
6077
      if ftype == TType.STOP:
6078
        break
6079
      if fid == 0:
6080
        if ftype == TType.MAP:
6081
          self.success = {}
6082
          (_ktype100, _vtype101, _size99 ) = iprot.readMapBegin() 
6083
          for _i103 in xrange(_size99):
6084
            _key104 = iprot.readString();
6085
            _val105 = {}
6086
            (_ktype107, _vtype108, _size106 ) = iprot.readMapBegin() 
6087
            for _i110 in xrange(_size106):
6088
              _key111 = iprot.readI64();
6089
              _val112 = iprot.readI64();
6090
              _val105[_key111] = _val112
6091
            iprot.readMapEnd()
6092
            self.success[_key104] = _val105
6093
          iprot.readMapEnd()
6094
        else:
6095
          iprot.skip(ftype)
6096
      else:
6097
        iprot.skip(ftype)
6098
      iprot.readFieldEnd()
6099
    iprot.readStructEnd()
6100
 
6101
  def write(self, oprot):
6102
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6103
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6104
      return
6105
    oprot.writeStructBegin('getIgnoredItemKeys_result')
6106
    if self.success is not None:
6107
      oprot.writeFieldBegin('success', TType.MAP, 0)
6108
      oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.success))
6109
      for kiter113,viter114 in self.success.items():
6110
        oprot.writeString(kiter113)
6111
        oprot.writeMapBegin(TType.I64, TType.I64, len(viter114))
6112
        for kiter115,viter116 in viter114.items():
6113
          oprot.writeI64(kiter115)
6114
          oprot.writeI64(viter116)
6115
        oprot.writeMapEnd()
6116
      oprot.writeMapEnd()
6117
      oprot.writeFieldEnd()
6118
    oprot.writeFieldStop()
6119
    oprot.writeStructEnd()
6120
 
6121
  def validate(self):
6122
    return
6123
 
6124
 
6125
  def __repr__(self):
6126
    L = ['%s=%r' % (key, value)
6127
      for key, value in self.__dict__.iteritems()]
6128
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6129
 
6130
  def __eq__(self, other):
6131
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6132
 
6133
  def __ne__(self, other):
6134
    return not (self == other)
6135
 
6136
class addBadInventory_args:
6137
  """
6138
  Attributes:
6139
   - itemId
6140
   - warehouseId
6141
   - quantity
6142
  """
6143
 
6144
  thrift_spec = (
6145
    None, # 0
6146
    (1, TType.I64, 'itemId', None, None, ), # 1
6147
    (2, TType.I64, 'warehouseId', None, None, ), # 2
6148
    (3, TType.I64, 'quantity', None, None, ), # 3
6149
  )
6150
 
6151
  def __init__(self, itemId=None, warehouseId=None, quantity=None,):
6152
    self.itemId = itemId
6153
    self.warehouseId = warehouseId
6154
    self.quantity = quantity
6155
 
6156
  def read(self, iprot):
6157
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6158
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6159
      return
6160
    iprot.readStructBegin()
6161
    while True:
6162
      (fname, ftype, fid) = iprot.readFieldBegin()
6163
      if ftype == TType.STOP:
6164
        break
6165
      if fid == 1:
6166
        if ftype == TType.I64:
6167
          self.itemId = iprot.readI64();
6168
        else:
6169
          iprot.skip(ftype)
6170
      elif fid == 2:
6171
        if ftype == TType.I64:
6172
          self.warehouseId = iprot.readI64();
6173
        else:
6174
          iprot.skip(ftype)
6175
      elif fid == 3:
6176
        if ftype == TType.I64:
6177
          self.quantity = iprot.readI64();
6178
        else:
6179
          iprot.skip(ftype)
6180
      else:
6181
        iprot.skip(ftype)
6182
      iprot.readFieldEnd()
6183
    iprot.readStructEnd()
6184
 
6185
  def write(self, oprot):
6186
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6187
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6188
      return
6189
    oprot.writeStructBegin('addBadInventory_args')
6190
    if self.itemId is not None:
6191
      oprot.writeFieldBegin('itemId', TType.I64, 1)
6192
      oprot.writeI64(self.itemId)
6193
      oprot.writeFieldEnd()
6194
    if self.warehouseId is not None:
6195
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
6196
      oprot.writeI64(self.warehouseId)
6197
      oprot.writeFieldEnd()
6198
    if self.quantity is not None:
6199
      oprot.writeFieldBegin('quantity', TType.I64, 3)
6200
      oprot.writeI64(self.quantity)
6201
      oprot.writeFieldEnd()
6202
    oprot.writeFieldStop()
6203
    oprot.writeStructEnd()
6204
 
6205
  def validate(self):
6206
    return
6207
 
6208
 
6209
  def __repr__(self):
6210
    L = ['%s=%r' % (key, value)
6211
      for key, value in self.__dict__.iteritems()]
6212
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6213
 
6214
  def __eq__(self, other):
6215
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6216
 
6217
  def __ne__(self, other):
6218
    return not (self == other)
6219
 
6220
class addBadInventory_result:
6221
  """
6222
  Attributes:
6223
   - cex
6224
  """
6225
 
6226
  thrift_spec = (
6227
    None, # 0
6228
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
6229
  )
6230
 
6231
  def __init__(self, cex=None,):
6232
    self.cex = cex
6233
 
6234
  def read(self, iprot):
6235
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6236
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6237
      return
6238
    iprot.readStructBegin()
6239
    while True:
6240
      (fname, ftype, fid) = iprot.readFieldBegin()
6241
      if ftype == TType.STOP:
6242
        break
6243
      if fid == 1:
6244
        if ftype == TType.STRUCT:
6245
          self.cex = InventoryServiceException()
6246
          self.cex.read(iprot)
6247
        else:
6248
          iprot.skip(ftype)
6249
      else:
6250
        iprot.skip(ftype)
6251
      iprot.readFieldEnd()
6252
    iprot.readStructEnd()
6253
 
6254
  def write(self, oprot):
6255
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6256
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6257
      return
6258
    oprot.writeStructBegin('addBadInventory_result')
6259
    if self.cex is not None:
6260
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
6261
      self.cex.write(oprot)
6262
      oprot.writeFieldEnd()
6263
    oprot.writeFieldStop()
6264
    oprot.writeStructEnd()
6265
 
6266
  def validate(self):
6267
    return
6268
 
6269
 
6270
  def __repr__(self):
6271
    L = ['%s=%r' % (key, value)
6272
      for key, value in self.__dict__.iteritems()]
6273
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6274
 
6275
  def __eq__(self, other):
6276
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6277
 
6278
  def __ne__(self, other):
6279
    return not (self == other)
6280
 
6281
class getShippingLocations_args:
6282
 
6283
  thrift_spec = (
6284
  )
6285
 
6286
  def read(self, iprot):
6287
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6288
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6289
      return
6290
    iprot.readStructBegin()
6291
    while True:
6292
      (fname, ftype, fid) = iprot.readFieldBegin()
6293
      if ftype == TType.STOP:
6294
        break
6295
      else:
6296
        iprot.skip(ftype)
6297
      iprot.readFieldEnd()
6298
    iprot.readStructEnd()
6299
 
6300
  def write(self, oprot):
6301
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6302
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6303
      return
6304
    oprot.writeStructBegin('getShippingLocations_args')
6305
    oprot.writeFieldStop()
6306
    oprot.writeStructEnd()
6307
 
6308
  def validate(self):
6309
    return
6310
 
6311
 
6312
  def __repr__(self):
6313
    L = ['%s=%r' % (key, value)
6314
      for key, value in self.__dict__.iteritems()]
6315
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6316
 
6317
  def __eq__(self, other):
6318
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6319
 
6320
  def __ne__(self, other):
6321
    return not (self == other)
6322
 
6323
class getShippingLocations_result:
6324
  """
6325
  Attributes:
6326
   - success
6327
  """
6328
 
6329
  thrift_spec = (
6330
    (0, TType.LIST, 'success', (TType.STRUCT,(Warehouse, Warehouse.thrift_spec)), None, ), # 0
6331
  )
6332
 
6333
  def __init__(self, success=None,):
6334
    self.success = success
6335
 
6336
  def read(self, iprot):
6337
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6338
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6339
      return
6340
    iprot.readStructBegin()
6341
    while True:
6342
      (fname, ftype, fid) = iprot.readFieldBegin()
6343
      if ftype == TType.STOP:
6344
        break
6345
      if fid == 0:
6346
        if ftype == TType.LIST:
6347
          self.success = []
6348
          (_etype120, _size117) = iprot.readListBegin()
6349
          for _i121 in xrange(_size117):
6350
            _elem122 = Warehouse()
6351
            _elem122.read(iprot)
6352
            self.success.append(_elem122)
6353
          iprot.readListEnd()
6354
        else:
6355
          iprot.skip(ftype)
6356
      else:
6357
        iprot.skip(ftype)
6358
      iprot.readFieldEnd()
6359
    iprot.readStructEnd()
6360
 
6361
  def write(self, oprot):
6362
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6363
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6364
      return
6365
    oprot.writeStructBegin('getShippingLocations_result')
6366
    if self.success is not None:
6367
      oprot.writeFieldBegin('success', TType.LIST, 0)
6368
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6369
      for iter123 in self.success:
6370
        iter123.write(oprot)
6371
      oprot.writeListEnd()
6372
      oprot.writeFieldEnd()
6373
    oprot.writeFieldStop()
6374
    oprot.writeStructEnd()
6375
 
6376
  def validate(self):
6377
    return
6378
 
6379
 
6380
  def __repr__(self):
6381
    L = ['%s=%r' % (key, value)
6382
      for key, value in self.__dict__.iteritems()]
6383
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6384
 
6385
  def __eq__(self, other):
6386
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6387
 
6388
  def __ne__(self, other):
6389
    return not (self == other)
6390
 
6391
class getAllVendorItemMappings_args:
6392
 
6393
  thrift_spec = (
6394
  )
6395
 
6396
  def read(self, iprot):
6397
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6398
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6399
      return
6400
    iprot.readStructBegin()
6401
    while True:
6402
      (fname, ftype, fid) = iprot.readFieldBegin()
6403
      if ftype == TType.STOP:
6404
        break
6405
      else:
6406
        iprot.skip(ftype)
6407
      iprot.readFieldEnd()
6408
    iprot.readStructEnd()
6409
 
6410
  def write(self, oprot):
6411
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6412
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6413
      return
6414
    oprot.writeStructBegin('getAllVendorItemMappings_args')
6415
    oprot.writeFieldStop()
6416
    oprot.writeStructEnd()
6417
 
6418
  def validate(self):
6419
    return
6420
 
6421
 
6422
  def __repr__(self):
6423
    L = ['%s=%r' % (key, value)
6424
      for key, value in self.__dict__.iteritems()]
6425
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6426
 
6427
  def __eq__(self, other):
6428
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6429
 
6430
  def __ne__(self, other):
6431
    return not (self == other)
6432
 
6433
class getAllVendorItemMappings_result:
6434
  """
6435
  Attributes:
6436
   - success
6437
  """
6438
 
6439
  thrift_spec = (
6440
    (0, TType.LIST, 'success', (TType.STRUCT,(VendorItemMapping, VendorItemMapping.thrift_spec)), None, ), # 0
6441
  )
6442
 
6443
  def __init__(self, success=None,):
6444
    self.success = success
6445
 
6446
  def read(self, iprot):
6447
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6448
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6449
      return
6450
    iprot.readStructBegin()
6451
    while True:
6452
      (fname, ftype, fid) = iprot.readFieldBegin()
6453
      if ftype == TType.STOP:
6454
        break
6455
      if fid == 0:
6456
        if ftype == TType.LIST:
6457
          self.success = []
6458
          (_etype127, _size124) = iprot.readListBegin()
6459
          for _i128 in xrange(_size124):
6460
            _elem129 = VendorItemMapping()
6461
            _elem129.read(iprot)
6462
            self.success.append(_elem129)
6463
          iprot.readListEnd()
6464
        else:
6465
          iprot.skip(ftype)
6466
      else:
6467
        iprot.skip(ftype)
6468
      iprot.readFieldEnd()
6469
    iprot.readStructEnd()
6470
 
6471
  def write(self, oprot):
6472
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6473
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6474
      return
6475
    oprot.writeStructBegin('getAllVendorItemMappings_result')
6476
    if self.success is not None:
6477
      oprot.writeFieldBegin('success', TType.LIST, 0)
6478
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6479
      for iter130 in self.success:
6480
        iter130.write(oprot)
6481
      oprot.writeListEnd()
6482
      oprot.writeFieldEnd()
6483
    oprot.writeFieldStop()
6484
    oprot.writeStructEnd()
6485
 
6486
  def validate(self):
6487
    return
6488
 
6489
 
6490
  def __repr__(self):
6491
    L = ['%s=%r' % (key, value)
6492
      for key, value in self.__dict__.iteritems()]
6493
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6494
 
6495
  def __eq__(self, other):
6496
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6497
 
6498
  def __ne__(self, other):
6499
    return not (self == other)
6500
 
6501
class getInventorySnapshot_args:
6502
  """
6503
  Attributes:
6504
   - warehouseId
6505
  """
6506
 
6507
  thrift_spec = (
6508
    None, # 0
6509
    (1, TType.I64, 'warehouseId', None, None, ), # 1
6510
  )
6511
 
6512
  def __init__(self, warehouseId=None,):
6513
    self.warehouseId = warehouseId
6514
 
6515
  def read(self, iprot):
6516
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6517
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6518
      return
6519
    iprot.readStructBegin()
6520
    while True:
6521
      (fname, ftype, fid) = iprot.readFieldBegin()
6522
      if ftype == TType.STOP:
6523
        break
6524
      if fid == 1:
6525
        if ftype == TType.I64:
6526
          self.warehouseId = iprot.readI64();
6527
        else:
6528
          iprot.skip(ftype)
6529
      else:
6530
        iprot.skip(ftype)
6531
      iprot.readFieldEnd()
6532
    iprot.readStructEnd()
6533
 
6534
  def write(self, oprot):
6535
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6536
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6537
      return
6538
    oprot.writeStructBegin('getInventorySnapshot_args')
6539
    if self.warehouseId is not None:
6540
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
6541
      oprot.writeI64(self.warehouseId)
6542
      oprot.writeFieldEnd()
6543
    oprot.writeFieldStop()
6544
    oprot.writeStructEnd()
6545
 
6546
  def validate(self):
6547
    return
6548
 
6549
 
6550
  def __repr__(self):
6551
    L = ['%s=%r' % (key, value)
6552
      for key, value in self.__dict__.iteritems()]
6553
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6554
 
6555
  def __eq__(self, other):
6556
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6557
 
6558
  def __ne__(self, other):
6559
    return not (self == other)
6560
 
6561
class getInventorySnapshot_result:
6562
  """
6563
  Attributes:
6564
   - success
6565
  """
6566
 
6567
  thrift_spec = (
6568
    (0, TType.MAP, 'success', (TType.I64,None,TType.STRUCT,(ItemInventory, ItemInventory.thrift_spec)), None, ), # 0
6569
  )
6570
 
6571
  def __init__(self, success=None,):
6572
    self.success = success
6573
 
6574
  def read(self, iprot):
6575
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6576
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6577
      return
6578
    iprot.readStructBegin()
6579
    while True:
6580
      (fname, ftype, fid) = iprot.readFieldBegin()
6581
      if ftype == TType.STOP:
6582
        break
6583
      if fid == 0:
6584
        if ftype == TType.MAP:
6585
          self.success = {}
6586
          (_ktype132, _vtype133, _size131 ) = iprot.readMapBegin() 
6587
          for _i135 in xrange(_size131):
6588
            _key136 = iprot.readI64();
6589
            _val137 = ItemInventory()
6590
            _val137.read(iprot)
6591
            self.success[_key136] = _val137
6592
          iprot.readMapEnd()
6593
        else:
6594
          iprot.skip(ftype)
6595
      else:
6596
        iprot.skip(ftype)
6597
      iprot.readFieldEnd()
6598
    iprot.readStructEnd()
6599
 
6600
  def write(self, oprot):
6601
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6602
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6603
      return
6604
    oprot.writeStructBegin('getInventorySnapshot_result')
6605
    if self.success is not None:
6606
      oprot.writeFieldBegin('success', TType.MAP, 0)
6607
      oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.success))
6608
      for kiter138,viter139 in self.success.items():
6609
        oprot.writeI64(kiter138)
6610
        viter139.write(oprot)
6611
      oprot.writeMapEnd()
6612
      oprot.writeFieldEnd()
6613
    oprot.writeFieldStop()
6614
    oprot.writeStructEnd()
6615
 
6616
  def validate(self):
6617
    return
6618
 
6619
 
6620
  def __repr__(self):
6621
    L = ['%s=%r' % (key, value)
6622
      for key, value in self.__dict__.iteritems()]
6623
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6624
 
6625
  def __eq__(self, other):
6626
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6627
 
6628
  def __ne__(self, other):
6629
    return not (self == other)
6630
 
6631
class clearItemAvailabilityCache_args:
6632
 
6633
  thrift_spec = (
6634
  )
6635
 
6636
  def read(self, iprot):
6637
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6638
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6639
      return
6640
    iprot.readStructBegin()
6641
    while True:
6642
      (fname, ftype, fid) = iprot.readFieldBegin()
6643
      if ftype == TType.STOP:
6644
        break
6645
      else:
6646
        iprot.skip(ftype)
6647
      iprot.readFieldEnd()
6648
    iprot.readStructEnd()
6649
 
6650
  def write(self, oprot):
6651
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6652
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6653
      return
6654
    oprot.writeStructBegin('clearItemAvailabilityCache_args')
6655
    oprot.writeFieldStop()
6656
    oprot.writeStructEnd()
6657
 
6658
  def validate(self):
6659
    return
6660
 
6661
 
6662
  def __repr__(self):
6663
    L = ['%s=%r' % (key, value)
6664
      for key, value in self.__dict__.iteritems()]
6665
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6666
 
6667
  def __eq__(self, other):
6668
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6669
 
6670
  def __ne__(self, other):
6671
    return not (self == other)
6672
 
6673
class clearItemAvailabilityCache_result:
6674
 
6675
  thrift_spec = (
6676
  )
6677
 
6678
  def read(self, iprot):
6679
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6680
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6681
      return
6682
    iprot.readStructBegin()
6683
    while True:
6684
      (fname, ftype, fid) = iprot.readFieldBegin()
6685
      if ftype == TType.STOP:
6686
        break
6687
      else:
6688
        iprot.skip(ftype)
6689
      iprot.readFieldEnd()
6690
    iprot.readStructEnd()
6691
 
6692
  def write(self, oprot):
6693
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6694
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6695
      return
6696
    oprot.writeStructBegin('clearItemAvailabilityCache_result')
6697
    oprot.writeFieldStop()
6698
    oprot.writeStructEnd()
6699
 
6700
  def validate(self):
6701
    return
6702
 
6703
 
6704
  def __repr__(self):
6705
    L = ['%s=%r' % (key, value)
6706
      for key, value in self.__dict__.iteritems()]
6707
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6708
 
6709
  def __eq__(self, other):
6710
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6711
 
6712
  def __ne__(self, other):
6713
    return not (self == other)
6714
 
6715
class updateVendorString_args:
6716
  """
6717
  Attributes:
6718
   - warehouseId
6719
   - vendorString
6720
  """
6721
 
6722
  thrift_spec = (
6723
    None, # 0
6724
    (1, TType.I64, 'warehouseId', None, None, ), # 1
6725
    (2, TType.STRING, 'vendorString', None, None, ), # 2
6726
  )
6727
 
6728
  def __init__(self, warehouseId=None, vendorString=None,):
6729
    self.warehouseId = warehouseId
6730
    self.vendorString = vendorString
6731
 
6732
  def read(self, iprot):
6733
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6734
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6735
      return
6736
    iprot.readStructBegin()
6737
    while True:
6738
      (fname, ftype, fid) = iprot.readFieldBegin()
6739
      if ftype == TType.STOP:
6740
        break
6741
      if fid == 1:
6742
        if ftype == TType.I64:
6743
          self.warehouseId = iprot.readI64();
6744
        else:
6745
          iprot.skip(ftype)
6746
      elif fid == 2:
6747
        if ftype == TType.STRING:
6748
          self.vendorString = iprot.readString();
6749
        else:
6750
          iprot.skip(ftype)
6751
      else:
6752
        iprot.skip(ftype)
6753
      iprot.readFieldEnd()
6754
    iprot.readStructEnd()
6755
 
6756
  def write(self, oprot):
6757
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6758
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6759
      return
6760
    oprot.writeStructBegin('updateVendorString_args')
6761
    if self.warehouseId is not None:
6762
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
6763
      oprot.writeI64(self.warehouseId)
6764
      oprot.writeFieldEnd()
6765
    if self.vendorString is not None:
6766
      oprot.writeFieldBegin('vendorString', TType.STRING, 2)
6767
      oprot.writeString(self.vendorString)
6768
      oprot.writeFieldEnd()
6769
    oprot.writeFieldStop()
6770
    oprot.writeStructEnd()
6771
 
6772
  def validate(self):
6773
    return
6774
 
6775
 
6776
  def __repr__(self):
6777
    L = ['%s=%r' % (key, value)
6778
      for key, value in self.__dict__.iteritems()]
6779
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6780
 
6781
  def __eq__(self, other):
6782
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6783
 
6784
  def __ne__(self, other):
6785
    return not (self == other)
6786
 
6787
class updateVendorString_result:
6788
 
6789
  thrift_spec = (
6790
  )
6791
 
6792
  def read(self, iprot):
6793
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6794
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6795
      return
6796
    iprot.readStructBegin()
6797
    while True:
6798
      (fname, ftype, fid) = iprot.readFieldBegin()
6799
      if ftype == TType.STOP:
6800
        break
6801
      else:
6802
        iprot.skip(ftype)
6803
      iprot.readFieldEnd()
6804
    iprot.readStructEnd()
6805
 
6806
  def write(self, oprot):
6807
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6808
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6809
      return
6810
    oprot.writeStructBegin('updateVendorString_result')
6811
    oprot.writeFieldStop()
6812
    oprot.writeStructEnd()
6813
 
6814
  def validate(self):
6815
    return
6816
 
6817
 
6818
  def __repr__(self):
6819
    L = ['%s=%r' % (key, value)
6820
      for key, value in self.__dict__.iteritems()]
6821
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6822
 
6823
  def __eq__(self, other):
6824
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6825
 
6826
  def __ne__(self, other):
6827
    return not (self == other)