Subversion Repositories SmartDukaan

Rev

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

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