Subversion Repositories SmartDukaan

Rev

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