Subversion Repositories SmartDukaan

Rev

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