Subversion Repositories SmartDukaan

Rev

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