Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
349 ashish 1
#
2
# Autogenerated by Thrift
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
try:
13
  from thrift.protocol import fastbinary
14
except:
15
  fastbinary = None
16
 
17
 
18
class Iface:
765 rajveer 19
  def closeSession(self, ):
20
    """
21
    For closing the open session in sqlalchemy
22
    """
23
    pass
24
 
349 ashish 25
  def sendMail(self, mail):
26
    """
27
    Parameters:
28
     - mail
29
    """
30
    pass
31
 
32
  def sendText(self, message):
33
    """
34
    Parameters:
35
     - message
36
    """
37
    pass
38
 
39
  def addMessage(self, message):
40
    """
41
    Parameters:
42
     - message
43
    """
44
    pass
45
 
46
  def updateMessage(self, id, message):
47
    """
48
    Parameters:
49
     - id
50
     - message
51
    """
52
    pass
53
 
54
  def getMessage(self, id):
55
    """
56
    Parameters:
57
     - id
58
    """
59
    pass
60
 
61
  def getSubstitutedMessage(self, id, params):
62
    """
63
    Parameters:
64
     - id
65
     - params
66
    """
67
    pass
68
 
494 rajveer 69
  def addUser(self, username, password, warehouseId):
70
    """
71
    Parameters:
72
     - username
73
     - password
74
     - warehouseId
75
    """
76
    pass
349 ashish 77
 
494 rajveer 78
  def deleteUser(self, username):
79
    """
80
    Parameters:
81
     - username
82
    """
83
    pass
84
 
85
  def authenticateUser(self, username, password):
86
    """
759 chandransh 87
    Returns the warehouseId for the given user if the password matches. Returns -1 otherwise.
88
    The loggedOn timestamp for the dashboard user is updated as a timestamp.
89
    It's unclear to me when an exception is thrown : Chandranshu
90
 
494 rajveer 91
    Parameters:
92
     - username
93
     - password
94
    """
95
    pass
96
 
97
  def updatePassword(self, username, oldPassword, newPassword):
98
    """
99
    Parameters:
100
     - username
101
     - oldPassword
102
     - newPassword
103
    """
104
    pass
105
 
759 chandransh 106
  def authenticateLogisticsUser(self, username, password):
107
    """
108
    Returns the LogisticsUser struct associated with the given username and password if they match.
109
    Throws an exception otherwise.
110
 
111
    Parameters:
112
     - username
113
     - password
114
    """
115
    pass
494 rajveer 116
 
759 chandransh 117
 
349 ashish 118
class Client(Iface):
119
  def __init__(self, iprot, oprot=None):
120
    self._iprot = self._oprot = iprot
121
    if oprot != None:
122
      self._oprot = oprot
123
    self._seqid = 0
124
 
765 rajveer 125
  def closeSession(self, ):
126
    """
127
    For closing the open session in sqlalchemy
128
    """
129
    self.send_closeSession()
130
    self.recv_closeSession()
131
 
132
  def send_closeSession(self, ):
133
    self._oprot.writeMessageBegin('closeSession', TMessageType.CALL, self._seqid)
134
    args = closeSession_args()
135
    args.write(self._oprot)
136
    self._oprot.writeMessageEnd()
137
    self._oprot.trans.flush()
138
 
139
  def recv_closeSession(self, ):
140
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
141
    if mtype == TMessageType.EXCEPTION:
142
      x = TApplicationException()
143
      x.read(self._iprot)
144
      self._iprot.readMessageEnd()
145
      raise x
146
    result = closeSession_result()
147
    result.read(self._iprot)
148
    self._iprot.readMessageEnd()
149
    return
150
 
349 ashish 151
  def sendMail(self, mail):
152
    """
153
    Parameters:
154
     - mail
155
    """
156
    self.send_sendMail(mail)
157
    self.recv_sendMail()
158
 
159
  def send_sendMail(self, mail):
160
    self._oprot.writeMessageBegin('sendMail', TMessageType.CALL, self._seqid)
161
    args = sendMail_args()
162
    args.mail = mail
163
    args.write(self._oprot)
164
    self._oprot.writeMessageEnd()
165
    self._oprot.trans.flush()
166
 
167
  def recv_sendMail(self, ):
168
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
169
    if mtype == TMessageType.EXCEPTION:
170
      x = TApplicationException()
171
      x.read(self._iprot)
172
      self._iprot.readMessageEnd()
173
      raise x
174
    result = sendMail_result()
175
    result.read(self._iprot)
176
    self._iprot.readMessageEnd()
177
    if result.se != None:
178
      raise result.se
179
    return
180
 
181
  def sendText(self, message):
182
    """
183
    Parameters:
184
     - message
185
    """
186
    self.send_sendText(message)
187
    self.recv_sendText()
188
 
189
  def send_sendText(self, message):
190
    self._oprot.writeMessageBegin('sendText', TMessageType.CALL, self._seqid)
191
    args = sendText_args()
192
    args.message = message
193
    args.write(self._oprot)
194
    self._oprot.writeMessageEnd()
195
    self._oprot.trans.flush()
196
 
197
  def recv_sendText(self, ):
198
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
199
    if mtype == TMessageType.EXCEPTION:
200
      x = TApplicationException()
201
      x.read(self._iprot)
202
      self._iprot.readMessageEnd()
203
      raise x
204
    result = sendText_result()
205
    result.read(self._iprot)
206
    self._iprot.readMessageEnd()
207
    if result.se != None:
208
      raise result.se
209
    return
210
 
211
  def addMessage(self, message):
212
    """
213
    Parameters:
214
     - message
215
    """
216
    self.send_addMessage(message)
217
    self.recv_addMessage()
218
 
219
  def send_addMessage(self, message):
220
    self._oprot.writeMessageBegin('addMessage', TMessageType.CALL, self._seqid)
221
    args = addMessage_args()
222
    args.message = message
223
    args.write(self._oprot)
224
    self._oprot.writeMessageEnd()
225
    self._oprot.trans.flush()
226
 
227
  def recv_addMessage(self, ):
228
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
229
    if mtype == TMessageType.EXCEPTION:
230
      x = TApplicationException()
231
      x.read(self._iprot)
232
      self._iprot.readMessageEnd()
233
      raise x
234
    result = addMessage_result()
235
    result.read(self._iprot)
236
    self._iprot.readMessageEnd()
237
    if result.se != None:
238
      raise result.se
239
    return
240
 
241
  def updateMessage(self, id, message):
242
    """
243
    Parameters:
244
     - id
245
     - message
246
    """
247
    self.send_updateMessage(id, message)
248
    self.recv_updateMessage()
249
 
250
  def send_updateMessage(self, id, message):
251
    self._oprot.writeMessageBegin('updateMessage', TMessageType.CALL, self._seqid)
252
    args = updateMessage_args()
253
    args.id = id
254
    args.message = message
255
    args.write(self._oprot)
256
    self._oprot.writeMessageEnd()
257
    self._oprot.trans.flush()
258
 
259
  def recv_updateMessage(self, ):
260
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
261
    if mtype == TMessageType.EXCEPTION:
262
      x = TApplicationException()
263
      x.read(self._iprot)
264
      self._iprot.readMessageEnd()
265
      raise x
266
    result = updateMessage_result()
267
    result.read(self._iprot)
268
    self._iprot.readMessageEnd()
269
    if result.se != None:
270
      raise result.se
271
    return
272
 
273
  def getMessage(self, id):
274
    """
275
    Parameters:
276
     - id
277
    """
278
    self.send_getMessage(id)
353 ashish 279
    return self.recv_getMessage()
349 ashish 280
 
281
  def send_getMessage(self, id):
282
    self._oprot.writeMessageBegin('getMessage', TMessageType.CALL, self._seqid)
283
    args = getMessage_args()
284
    args.id = id
285
    args.write(self._oprot)
286
    self._oprot.writeMessageEnd()
287
    self._oprot.trans.flush()
288
 
289
  def recv_getMessage(self, ):
290
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
291
    if mtype == TMessageType.EXCEPTION:
292
      x = TApplicationException()
293
      x.read(self._iprot)
294
      self._iprot.readMessageEnd()
295
      raise x
296
    result = getMessage_result()
297
    result.read(self._iprot)
298
    self._iprot.readMessageEnd()
353 ashish 299
    if result.success != None:
300
      return result.success
349 ashish 301
    if result.se != None:
302
      raise result.se
353 ashish 303
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getMessage failed: unknown result");
349 ashish 304
 
305
  def getSubstitutedMessage(self, id, params):
306
    """
307
    Parameters:
308
     - id
309
     - params
310
    """
311
    self.send_getSubstitutedMessage(id, params)
353 ashish 312
    return self.recv_getSubstitutedMessage()
349 ashish 313
 
314
  def send_getSubstitutedMessage(self, id, params):
315
    self._oprot.writeMessageBegin('getSubstitutedMessage', TMessageType.CALL, self._seqid)
316
    args = getSubstitutedMessage_args()
317
    args.id = id
318
    args.params = params
319
    args.write(self._oprot)
320
    self._oprot.writeMessageEnd()
321
    self._oprot.trans.flush()
322
 
323
  def recv_getSubstitutedMessage(self, ):
324
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
325
    if mtype == TMessageType.EXCEPTION:
326
      x = TApplicationException()
327
      x.read(self._iprot)
328
      self._iprot.readMessageEnd()
329
      raise x
330
    result = getSubstitutedMessage_result()
331
    result.read(self._iprot)
332
    self._iprot.readMessageEnd()
353 ashish 333
    if result.success != None:
334
      return result.success
349 ashish 335
    if result.se != None:
336
      raise result.se
353 ashish 337
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSubstitutedMessage failed: unknown result");
349 ashish 338
 
494 rajveer 339
  def addUser(self, username, password, warehouseId):
340
    """
341
    Parameters:
342
     - username
343
     - password
344
     - warehouseId
345
    """
346
    self.send_addUser(username, password, warehouseId)
347
    return self.recv_addUser()
349 ashish 348
 
494 rajveer 349
  def send_addUser(self, username, password, warehouseId):
350
    self._oprot.writeMessageBegin('addUser', TMessageType.CALL, self._seqid)
351
    args = addUser_args()
352
    args.username = username
353
    args.password = password
354
    args.warehouseId = warehouseId
355
    args.write(self._oprot)
356
    self._oprot.writeMessageEnd()
357
    self._oprot.trans.flush()
358
 
359
  def recv_addUser(self, ):
360
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
361
    if mtype == TMessageType.EXCEPTION:
362
      x = TApplicationException()
363
      x.read(self._iprot)
364
      self._iprot.readMessageEnd()
365
      raise x
366
    result = addUser_result()
367
    result.read(self._iprot)
368
    self._iprot.readMessageEnd()
369
    if result.success != None:
370
      return result.success
371
    if result.se != None:
372
      raise result.se
373
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addUser failed: unknown result");
374
 
375
  def deleteUser(self, username):
376
    """
377
    Parameters:
378
     - username
379
    """
380
    self.send_deleteUser(username)
381
    return self.recv_deleteUser()
382
 
383
  def send_deleteUser(self, username):
384
    self._oprot.writeMessageBegin('deleteUser', TMessageType.CALL, self._seqid)
385
    args = deleteUser_args()
386
    args.username = username
387
    args.write(self._oprot)
388
    self._oprot.writeMessageEnd()
389
    self._oprot.trans.flush()
390
 
391
  def recv_deleteUser(self, ):
392
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
393
    if mtype == TMessageType.EXCEPTION:
394
      x = TApplicationException()
395
      x.read(self._iprot)
396
      self._iprot.readMessageEnd()
397
      raise x
398
    result = deleteUser_result()
399
    result.read(self._iprot)
400
    self._iprot.readMessageEnd()
401
    if result.success != None:
402
      return result.success
403
    if result.se != None:
404
      raise result.se
405
    raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
406
 
407
  def authenticateUser(self, username, password):
408
    """
759 chandransh 409
    Returns the warehouseId for the given user if the password matches. Returns -1 otherwise.
410
    The loggedOn timestamp for the dashboard user is updated as a timestamp.
411
    It's unclear to me when an exception is thrown : Chandranshu
412
 
494 rajveer 413
    Parameters:
414
     - username
415
     - password
416
    """
417
    self.send_authenticateUser(username, password)
418
    return self.recv_authenticateUser()
419
 
420
  def send_authenticateUser(self, username, password):
421
    self._oprot.writeMessageBegin('authenticateUser', TMessageType.CALL, self._seqid)
422
    args = authenticateUser_args()
423
    args.username = username
424
    args.password = password
425
    args.write(self._oprot)
426
    self._oprot.writeMessageEnd()
427
    self._oprot.trans.flush()
428
 
429
  def recv_authenticateUser(self, ):
430
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
431
    if mtype == TMessageType.EXCEPTION:
432
      x = TApplicationException()
433
      x.read(self._iprot)
434
      self._iprot.readMessageEnd()
435
      raise x
436
    result = authenticateUser_result()
437
    result.read(self._iprot)
438
    self._iprot.readMessageEnd()
439
    if result.success != None:
440
      return result.success
441
    if result.se != None:
442
      raise result.se
443
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
444
 
445
  def updatePassword(self, username, oldPassword, newPassword):
446
    """
447
    Parameters:
448
     - username
449
     - oldPassword
450
     - newPassword
451
    """
452
    self.send_updatePassword(username, oldPassword, newPassword)
453
    return self.recv_updatePassword()
454
 
455
  def send_updatePassword(self, username, oldPassword, newPassword):
456
    self._oprot.writeMessageBegin('updatePassword', TMessageType.CALL, self._seqid)
457
    args = updatePassword_args()
458
    args.username = username
459
    args.oldPassword = oldPassword
460
    args.newPassword = newPassword
461
    args.write(self._oprot)
462
    self._oprot.writeMessageEnd()
463
    self._oprot.trans.flush()
464
 
465
  def recv_updatePassword(self, ):
466
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
467
    if mtype == TMessageType.EXCEPTION:
468
      x = TApplicationException()
469
      x.read(self._iprot)
470
      self._iprot.readMessageEnd()
471
      raise x
472
    result = updatePassword_result()
473
    result.read(self._iprot)
474
    self._iprot.readMessageEnd()
475
    if result.success != None:
476
      return result.success
477
    if result.se != None:
478
      raise result.se
479
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
480
 
759 chandransh 481
  def authenticateLogisticsUser(self, username, password):
482
    """
483
    Returns the LogisticsUser struct associated with the given username and password if they match.
484
    Throws an exception otherwise.
485
 
486
    Parameters:
487
     - username
488
     - password
489
    """
490
    self.send_authenticateLogisticsUser(username, password)
491
    return self.recv_authenticateLogisticsUser()
494 rajveer 492
 
759 chandransh 493
  def send_authenticateLogisticsUser(self, username, password):
494
    self._oprot.writeMessageBegin('authenticateLogisticsUser', TMessageType.CALL, self._seqid)
495
    args = authenticateLogisticsUser_args()
496
    args.username = username
497
    args.password = password
498
    args.write(self._oprot)
499
    self._oprot.writeMessageEnd()
500
    self._oprot.trans.flush()
501
 
502
  def recv_authenticateLogisticsUser(self, ):
503
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
504
    if mtype == TMessageType.EXCEPTION:
505
      x = TApplicationException()
506
      x.read(self._iprot)
507
      self._iprot.readMessageEnd()
508
      raise x
509
    result = authenticateLogisticsUser_result()
510
    result.read(self._iprot)
511
    self._iprot.readMessageEnd()
512
    if result.success != None:
513
      return result.success
514
    if result.hse != None:
515
      raise result.hse
516
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authenticateLogisticsUser failed: unknown result");
517
 
518
 
349 ashish 519
class Processor(Iface, TProcessor):
520
  def __init__(self, handler):
521
    self._handler = handler
522
    self._processMap = {}
765 rajveer 523
    self._processMap["closeSession"] = Processor.process_closeSession
349 ashish 524
    self._processMap["sendMail"] = Processor.process_sendMail
525
    self._processMap["sendText"] = Processor.process_sendText
526
    self._processMap["addMessage"] = Processor.process_addMessage
527
    self._processMap["updateMessage"] = Processor.process_updateMessage
528
    self._processMap["getMessage"] = Processor.process_getMessage
529
    self._processMap["getSubstitutedMessage"] = Processor.process_getSubstitutedMessage
494 rajveer 530
    self._processMap["addUser"] = Processor.process_addUser
531
    self._processMap["deleteUser"] = Processor.process_deleteUser
532
    self._processMap["authenticateUser"] = Processor.process_authenticateUser
533
    self._processMap["updatePassword"] = Processor.process_updatePassword
759 chandransh 534
    self._processMap["authenticateLogisticsUser"] = Processor.process_authenticateLogisticsUser
349 ashish 535
 
536
  def process(self, iprot, oprot):
537
    (name, type, seqid) = iprot.readMessageBegin()
538
    if name not in self._processMap:
539
      iprot.skip(TType.STRUCT)
540
      iprot.readMessageEnd()
541
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
542
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
543
      x.write(oprot)
544
      oprot.writeMessageEnd()
545
      oprot.trans.flush()
546
      return
547
    else:
548
      self._processMap[name](self, seqid, iprot, oprot)
549
    return True
550
 
765 rajveer 551
  def process_closeSession(self, seqid, iprot, oprot):
552
    args = closeSession_args()
553
    args.read(iprot)
554
    iprot.readMessageEnd()
555
    result = closeSession_result()
556
    self._handler.closeSession()
557
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
558
    result.write(oprot)
559
    oprot.writeMessageEnd()
560
    oprot.trans.flush()
561
 
349 ashish 562
  def process_sendMail(self, seqid, iprot, oprot):
563
    args = sendMail_args()
564
    args.read(iprot)
565
    iprot.readMessageEnd()
566
    result = sendMail_result()
567
    try:
568
      self._handler.sendMail(args.mail)
569
    except HelperServiceException, se:
570
      result.se = se
571
    oprot.writeMessageBegin("sendMail", TMessageType.REPLY, seqid)
572
    result.write(oprot)
573
    oprot.writeMessageEnd()
574
    oprot.trans.flush()
575
 
576
  def process_sendText(self, seqid, iprot, oprot):
577
    args = sendText_args()
578
    args.read(iprot)
579
    iprot.readMessageEnd()
580
    result = sendText_result()
581
    try:
582
      self._handler.sendText(args.message)
583
    except HelperServiceException, se:
584
      result.se = se
585
    oprot.writeMessageBegin("sendText", TMessageType.REPLY, seqid)
586
    result.write(oprot)
587
    oprot.writeMessageEnd()
588
    oprot.trans.flush()
589
 
590
  def process_addMessage(self, seqid, iprot, oprot):
591
    args = addMessage_args()
592
    args.read(iprot)
593
    iprot.readMessageEnd()
594
    result = addMessage_result()
595
    try:
596
      self._handler.addMessage(args.message)
597
    except HelperServiceException, se:
598
      result.se = se
599
    oprot.writeMessageBegin("addMessage", TMessageType.REPLY, seqid)
600
    result.write(oprot)
601
    oprot.writeMessageEnd()
602
    oprot.trans.flush()
603
 
604
  def process_updateMessage(self, seqid, iprot, oprot):
605
    args = updateMessage_args()
606
    args.read(iprot)
607
    iprot.readMessageEnd()
608
    result = updateMessage_result()
609
    try:
610
      self._handler.updateMessage(args.id, args.message)
611
    except HelperServiceException, se:
612
      result.se = se
613
    oprot.writeMessageBegin("updateMessage", TMessageType.REPLY, seqid)
614
    result.write(oprot)
615
    oprot.writeMessageEnd()
616
    oprot.trans.flush()
617
 
618
  def process_getMessage(self, seqid, iprot, oprot):
619
    args = getMessage_args()
620
    args.read(iprot)
621
    iprot.readMessageEnd()
622
    result = getMessage_result()
623
    try:
353 ashish 624
      result.success = self._handler.getMessage(args.id)
349 ashish 625
    except HelperServiceException, se:
626
      result.se = se
627
    oprot.writeMessageBegin("getMessage", TMessageType.REPLY, seqid)
628
    result.write(oprot)
629
    oprot.writeMessageEnd()
630
    oprot.trans.flush()
631
 
632
  def process_getSubstitutedMessage(self, seqid, iprot, oprot):
633
    args = getSubstitutedMessage_args()
634
    args.read(iprot)
635
    iprot.readMessageEnd()
636
    result = getSubstitutedMessage_result()
637
    try:
353 ashish 638
      result.success = self._handler.getSubstitutedMessage(args.id, args.params)
349 ashish 639
    except HelperServiceException, se:
640
      result.se = se
641
    oprot.writeMessageBegin("getSubstitutedMessage", TMessageType.REPLY, seqid)
642
    result.write(oprot)
643
    oprot.writeMessageEnd()
644
    oprot.trans.flush()
645
 
494 rajveer 646
  def process_addUser(self, seqid, iprot, oprot):
647
    args = addUser_args()
648
    args.read(iprot)
649
    iprot.readMessageEnd()
650
    result = addUser_result()
651
    try:
652
      result.success = self._handler.addUser(args.username, args.password, args.warehouseId)
653
    except HelperServiceException, se:
654
      result.se = se
655
    oprot.writeMessageBegin("addUser", TMessageType.REPLY, seqid)
656
    result.write(oprot)
657
    oprot.writeMessageEnd()
658
    oprot.trans.flush()
349 ashish 659
 
494 rajveer 660
  def process_deleteUser(self, seqid, iprot, oprot):
661
    args = deleteUser_args()
662
    args.read(iprot)
663
    iprot.readMessageEnd()
664
    result = deleteUser_result()
665
    try:
666
      result.success = self._handler.deleteUser(args.username)
667
    except HelperServiceException, se:
668
      result.se = se
669
    oprot.writeMessageBegin("deleteUser", TMessageType.REPLY, seqid)
670
    result.write(oprot)
671
    oprot.writeMessageEnd()
672
    oprot.trans.flush()
673
 
674
  def process_authenticateUser(self, seqid, iprot, oprot):
675
    args = authenticateUser_args()
676
    args.read(iprot)
677
    iprot.readMessageEnd()
678
    result = authenticateUser_result()
679
    try:
680
      result.success = self._handler.authenticateUser(args.username, args.password)
681
    except HelperServiceException, se:
682
      result.se = se
683
    oprot.writeMessageBegin("authenticateUser", TMessageType.REPLY, seqid)
684
    result.write(oprot)
685
    oprot.writeMessageEnd()
686
    oprot.trans.flush()
687
 
688
  def process_updatePassword(self, seqid, iprot, oprot):
689
    args = updatePassword_args()
690
    args.read(iprot)
691
    iprot.readMessageEnd()
692
    result = updatePassword_result()
693
    try:
694
      result.success = self._handler.updatePassword(args.username, args.oldPassword, args.newPassword)
695
    except HelperServiceException, se:
696
      result.se = se
697
    oprot.writeMessageBegin("updatePassword", TMessageType.REPLY, seqid)
698
    result.write(oprot)
699
    oprot.writeMessageEnd()
700
    oprot.trans.flush()
701
 
759 chandransh 702
  def process_authenticateLogisticsUser(self, seqid, iprot, oprot):
703
    args = authenticateLogisticsUser_args()
704
    args.read(iprot)
705
    iprot.readMessageEnd()
706
    result = authenticateLogisticsUser_result()
707
    try:
708
      result.success = self._handler.authenticateLogisticsUser(args.username, args.password)
709
    except HelperServiceException, hse:
710
      result.hse = hse
711
    oprot.writeMessageBegin("authenticateLogisticsUser", TMessageType.REPLY, seqid)
712
    result.write(oprot)
713
    oprot.writeMessageEnd()
714
    oprot.trans.flush()
494 rajveer 715
 
759 chandransh 716
 
349 ashish 717
# HELPER FUNCTIONS AND STRUCTURES
718
 
765 rajveer 719
class closeSession_args:
720
 
721
  thrift_spec = (
722
  )
723
 
724
  def read(self, iprot):
725
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
726
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
727
      return
728
    iprot.readStructBegin()
729
    while True:
730
      (fname, ftype, fid) = iprot.readFieldBegin()
731
      if ftype == TType.STOP:
732
        break
733
      else:
734
        iprot.skip(ftype)
735
      iprot.readFieldEnd()
736
    iprot.readStructEnd()
737
 
738
  def write(self, oprot):
739
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
740
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
741
      return
742
    oprot.writeStructBegin('closeSession_args')
743
    oprot.writeFieldStop()
744
    oprot.writeStructEnd()
745
 
746
  def __repr__(self):
747
    L = ['%s=%r' % (key, value)
748
      for key, value in self.__dict__.iteritems()]
749
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
750
 
751
  def __eq__(self, other):
752
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
753
 
754
  def __ne__(self, other):
755
    return not (self == other)
756
 
757
class closeSession_result:
758
 
759
  thrift_spec = (
760
  )
761
 
762
  def read(self, iprot):
763
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
764
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
765
      return
766
    iprot.readStructBegin()
767
    while True:
768
      (fname, ftype, fid) = iprot.readFieldBegin()
769
      if ftype == TType.STOP:
770
        break
771
      else:
772
        iprot.skip(ftype)
773
      iprot.readFieldEnd()
774
    iprot.readStructEnd()
775
 
776
  def write(self, oprot):
777
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
778
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
779
      return
780
    oprot.writeStructBegin('closeSession_result')
781
    oprot.writeFieldStop()
782
    oprot.writeStructEnd()
783
 
784
  def __repr__(self):
785
    L = ['%s=%r' % (key, value)
786
      for key, value in self.__dict__.iteritems()]
787
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
788
 
789
  def __eq__(self, other):
790
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
791
 
792
  def __ne__(self, other):
793
    return not (self == other)
794
 
349 ashish 795
class sendMail_args:
796
  """
797
  Attributes:
798
   - mail
799
  """
800
 
801
  thrift_spec = (
802
    None, # 0
803
    (1, TType.STRUCT, 'mail', (Mail, Mail.thrift_spec), None, ), # 1
804
  )
805
 
806
  def __init__(self, mail=None,):
807
    self.mail = mail
808
 
809
  def read(self, iprot):
810
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
811
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
812
      return
813
    iprot.readStructBegin()
814
    while True:
815
      (fname, ftype, fid) = iprot.readFieldBegin()
816
      if ftype == TType.STOP:
817
        break
818
      if fid == 1:
819
        if ftype == TType.STRUCT:
820
          self.mail = Mail()
821
          self.mail.read(iprot)
822
        else:
823
          iprot.skip(ftype)
824
      else:
825
        iprot.skip(ftype)
826
      iprot.readFieldEnd()
827
    iprot.readStructEnd()
828
 
829
  def write(self, oprot):
830
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
831
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
832
      return
833
    oprot.writeStructBegin('sendMail_args')
834
    if self.mail != None:
835
      oprot.writeFieldBegin('mail', TType.STRUCT, 1)
836
      self.mail.write(oprot)
837
      oprot.writeFieldEnd()
838
    oprot.writeFieldStop()
839
    oprot.writeStructEnd()
840
 
841
  def __repr__(self):
842
    L = ['%s=%r' % (key, value)
843
      for key, value in self.__dict__.iteritems()]
844
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
845
 
846
  def __eq__(self, other):
847
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
848
 
849
  def __ne__(self, other):
850
    return not (self == other)
851
 
852
class sendMail_result:
853
  """
854
  Attributes:
855
   - se
856
  """
857
 
858
  thrift_spec = (
859
    None, # 0
860
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
861
  )
862
 
863
  def __init__(self, se=None,):
864
    self.se = se
865
 
866
  def read(self, iprot):
867
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
868
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
869
      return
870
    iprot.readStructBegin()
871
    while True:
872
      (fname, ftype, fid) = iprot.readFieldBegin()
873
      if ftype == TType.STOP:
874
        break
875
      if fid == 1:
876
        if ftype == TType.STRUCT:
877
          self.se = HelperServiceException()
878
          self.se.read(iprot)
879
        else:
880
          iprot.skip(ftype)
881
      else:
882
        iprot.skip(ftype)
883
      iprot.readFieldEnd()
884
    iprot.readStructEnd()
885
 
886
  def write(self, oprot):
887
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
888
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
889
      return
890
    oprot.writeStructBegin('sendMail_result')
891
    if self.se != None:
892
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
893
      self.se.write(oprot)
894
      oprot.writeFieldEnd()
895
    oprot.writeFieldStop()
896
    oprot.writeStructEnd()
897
 
898
  def __repr__(self):
899
    L = ['%s=%r' % (key, value)
900
      for key, value in self.__dict__.iteritems()]
901
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
902
 
903
  def __eq__(self, other):
904
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
905
 
906
  def __ne__(self, other):
907
    return not (self == other)
908
 
909
class sendText_args:
910
  """
911
  Attributes:
912
   - message
913
  """
914
 
915
  thrift_spec = (
916
    None, # 0
917
    (1, TType.STRUCT, 'message', (TextMessage, TextMessage.thrift_spec), None, ), # 1
918
  )
919
 
920
  def __init__(self, message=None,):
921
    self.message = message
922
 
923
  def read(self, iprot):
924
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
925
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
926
      return
927
    iprot.readStructBegin()
928
    while True:
929
      (fname, ftype, fid) = iprot.readFieldBegin()
930
      if ftype == TType.STOP:
931
        break
932
      if fid == 1:
933
        if ftype == TType.STRUCT:
934
          self.message = TextMessage()
935
          self.message.read(iprot)
936
        else:
937
          iprot.skip(ftype)
938
      else:
939
        iprot.skip(ftype)
940
      iprot.readFieldEnd()
941
    iprot.readStructEnd()
942
 
943
  def write(self, oprot):
944
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
945
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
946
      return
947
    oprot.writeStructBegin('sendText_args')
948
    if self.message != None:
949
      oprot.writeFieldBegin('message', TType.STRUCT, 1)
950
      self.message.write(oprot)
951
      oprot.writeFieldEnd()
952
    oprot.writeFieldStop()
953
    oprot.writeStructEnd()
954
 
955
  def __repr__(self):
956
    L = ['%s=%r' % (key, value)
957
      for key, value in self.__dict__.iteritems()]
958
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
959
 
960
  def __eq__(self, other):
961
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
962
 
963
  def __ne__(self, other):
964
    return not (self == other)
965
 
966
class sendText_result:
967
  """
968
  Attributes:
969
   - se
970
  """
971
 
972
  thrift_spec = (
973
    None, # 0
974
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
975
  )
976
 
977
  def __init__(self, se=None,):
978
    self.se = se
979
 
980
  def read(self, iprot):
981
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
982
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
983
      return
984
    iprot.readStructBegin()
985
    while True:
986
      (fname, ftype, fid) = iprot.readFieldBegin()
987
      if ftype == TType.STOP:
988
        break
989
      if fid == 1:
990
        if ftype == TType.STRUCT:
991
          self.se = HelperServiceException()
992
          self.se.read(iprot)
993
        else:
994
          iprot.skip(ftype)
995
      else:
996
        iprot.skip(ftype)
997
      iprot.readFieldEnd()
998
    iprot.readStructEnd()
999
 
1000
  def write(self, oprot):
1001
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1002
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1003
      return
1004
    oprot.writeStructBegin('sendText_result')
1005
    if self.se != None:
1006
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1007
      self.se.write(oprot)
1008
      oprot.writeFieldEnd()
1009
    oprot.writeFieldStop()
1010
    oprot.writeStructEnd()
1011
 
1012
  def __repr__(self):
1013
    L = ['%s=%r' % (key, value)
1014
      for key, value in self.__dict__.iteritems()]
1015
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1016
 
1017
  def __eq__(self, other):
1018
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1019
 
1020
  def __ne__(self, other):
1021
    return not (self == other)
1022
 
1023
class addMessage_args:
1024
  """
1025
  Attributes:
1026
   - message
1027
  """
1028
 
1029
  thrift_spec = (
1030
    None, # 0
1031
    (1, TType.STRUCT, 'message', (Message, Message.thrift_spec), None, ), # 1
1032
  )
1033
 
1034
  def __init__(self, message=None,):
1035
    self.message = message
1036
 
1037
  def read(self, iprot):
1038
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1039
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1040
      return
1041
    iprot.readStructBegin()
1042
    while True:
1043
      (fname, ftype, fid) = iprot.readFieldBegin()
1044
      if ftype == TType.STOP:
1045
        break
1046
      if fid == 1:
1047
        if ftype == TType.STRUCT:
1048
          self.message = Message()
1049
          self.message.read(iprot)
1050
        else:
1051
          iprot.skip(ftype)
1052
      else:
1053
        iprot.skip(ftype)
1054
      iprot.readFieldEnd()
1055
    iprot.readStructEnd()
1056
 
1057
  def write(self, oprot):
1058
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1059
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1060
      return
1061
    oprot.writeStructBegin('addMessage_args')
1062
    if self.message != None:
1063
      oprot.writeFieldBegin('message', TType.STRUCT, 1)
1064
      self.message.write(oprot)
1065
      oprot.writeFieldEnd()
1066
    oprot.writeFieldStop()
1067
    oprot.writeStructEnd()
1068
 
1069
  def __repr__(self):
1070
    L = ['%s=%r' % (key, value)
1071
      for key, value in self.__dict__.iteritems()]
1072
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1073
 
1074
  def __eq__(self, other):
1075
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1076
 
1077
  def __ne__(self, other):
1078
    return not (self == other)
1079
 
1080
class addMessage_result:
1081
  """
1082
  Attributes:
1083
   - se
1084
  """
1085
 
1086
  thrift_spec = (
1087
    None, # 0
1088
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
1089
  )
1090
 
1091
  def __init__(self, se=None,):
1092
    self.se = se
1093
 
1094
  def read(self, iprot):
1095
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1096
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1097
      return
1098
    iprot.readStructBegin()
1099
    while True:
1100
      (fname, ftype, fid) = iprot.readFieldBegin()
1101
      if ftype == TType.STOP:
1102
        break
1103
      if fid == 1:
1104
        if ftype == TType.STRUCT:
1105
          self.se = HelperServiceException()
1106
          self.se.read(iprot)
1107
        else:
1108
          iprot.skip(ftype)
1109
      else:
1110
        iprot.skip(ftype)
1111
      iprot.readFieldEnd()
1112
    iprot.readStructEnd()
1113
 
1114
  def write(self, oprot):
1115
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1116
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1117
      return
1118
    oprot.writeStructBegin('addMessage_result')
1119
    if self.se != None:
1120
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1121
      self.se.write(oprot)
1122
      oprot.writeFieldEnd()
1123
    oprot.writeFieldStop()
1124
    oprot.writeStructEnd()
1125
 
1126
  def __repr__(self):
1127
    L = ['%s=%r' % (key, value)
1128
      for key, value in self.__dict__.iteritems()]
1129
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1130
 
1131
  def __eq__(self, other):
1132
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1133
 
1134
  def __ne__(self, other):
1135
    return not (self == other)
1136
 
1137
class updateMessage_args:
1138
  """
1139
  Attributes:
1140
   - id
1141
   - message
1142
  """
1143
 
1144
  thrift_spec = (
1145
    None, # 0
1146
    (1, TType.I64, 'id', None, None, ), # 1
1147
    (2, TType.STRING, 'message', None, None, ), # 2
1148
  )
1149
 
1150
  def __init__(self, id=None, message=None,):
1151
    self.id = id
1152
    self.message = message
1153
 
1154
  def read(self, iprot):
1155
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1156
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1157
      return
1158
    iprot.readStructBegin()
1159
    while True:
1160
      (fname, ftype, fid) = iprot.readFieldBegin()
1161
      if ftype == TType.STOP:
1162
        break
1163
      if fid == 1:
1164
        if ftype == TType.I64:
1165
          self.id = iprot.readI64();
1166
        else:
1167
          iprot.skip(ftype)
1168
      elif fid == 2:
1169
        if ftype == TType.STRING:
1170
          self.message = iprot.readString();
1171
        else:
1172
          iprot.skip(ftype)
1173
      else:
1174
        iprot.skip(ftype)
1175
      iprot.readFieldEnd()
1176
    iprot.readStructEnd()
1177
 
1178
  def write(self, oprot):
1179
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1180
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1181
      return
1182
    oprot.writeStructBegin('updateMessage_args')
1183
    if self.id != None:
1184
      oprot.writeFieldBegin('id', TType.I64, 1)
1185
      oprot.writeI64(self.id)
1186
      oprot.writeFieldEnd()
1187
    if self.message != None:
1188
      oprot.writeFieldBegin('message', TType.STRING, 2)
1189
      oprot.writeString(self.message)
1190
      oprot.writeFieldEnd()
1191
    oprot.writeFieldStop()
1192
    oprot.writeStructEnd()
1193
 
1194
  def __repr__(self):
1195
    L = ['%s=%r' % (key, value)
1196
      for key, value in self.__dict__.iteritems()]
1197
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1198
 
1199
  def __eq__(self, other):
1200
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1201
 
1202
  def __ne__(self, other):
1203
    return not (self == other)
1204
 
1205
class updateMessage_result:
1206
  """
1207
  Attributes:
1208
   - se
1209
  """
1210
 
1211
  thrift_spec = (
1212
    None, # 0
1213
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
1214
  )
1215
 
1216
  def __init__(self, se=None,):
1217
    self.se = se
1218
 
1219
  def read(self, iprot):
1220
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1221
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1222
      return
1223
    iprot.readStructBegin()
1224
    while True:
1225
      (fname, ftype, fid) = iprot.readFieldBegin()
1226
      if ftype == TType.STOP:
1227
        break
1228
      if fid == 1:
1229
        if ftype == TType.STRUCT:
1230
          self.se = HelperServiceException()
1231
          self.se.read(iprot)
1232
        else:
1233
          iprot.skip(ftype)
1234
      else:
1235
        iprot.skip(ftype)
1236
      iprot.readFieldEnd()
1237
    iprot.readStructEnd()
1238
 
1239
  def write(self, oprot):
1240
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1241
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1242
      return
1243
    oprot.writeStructBegin('updateMessage_result')
1244
    if self.se != None:
1245
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1246
      self.se.write(oprot)
1247
      oprot.writeFieldEnd()
1248
    oprot.writeFieldStop()
1249
    oprot.writeStructEnd()
1250
 
1251
  def __repr__(self):
1252
    L = ['%s=%r' % (key, value)
1253
      for key, value in self.__dict__.iteritems()]
1254
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1255
 
1256
  def __eq__(self, other):
1257
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1258
 
1259
  def __ne__(self, other):
1260
    return not (self == other)
1261
 
1262
class getMessage_args:
1263
  """
1264
  Attributes:
1265
   - id
1266
  """
1267
 
1268
  thrift_spec = (
1269
    None, # 0
1270
    (1, TType.I64, 'id', None, None, ), # 1
1271
  )
1272
 
1273
  def __init__(self, id=None,):
1274
    self.id = id
1275
 
1276
  def read(self, iprot):
1277
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1278
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1279
      return
1280
    iprot.readStructBegin()
1281
    while True:
1282
      (fname, ftype, fid) = iprot.readFieldBegin()
1283
      if ftype == TType.STOP:
1284
        break
1285
      if fid == 1:
1286
        if ftype == TType.I64:
1287
          self.id = iprot.readI64();
1288
        else:
1289
          iprot.skip(ftype)
1290
      else:
1291
        iprot.skip(ftype)
1292
      iprot.readFieldEnd()
1293
    iprot.readStructEnd()
1294
 
1295
  def write(self, oprot):
1296
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1297
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1298
      return
1299
    oprot.writeStructBegin('getMessage_args')
1300
    if self.id != None:
1301
      oprot.writeFieldBegin('id', TType.I64, 1)
1302
      oprot.writeI64(self.id)
1303
      oprot.writeFieldEnd()
1304
    oprot.writeFieldStop()
1305
    oprot.writeStructEnd()
1306
 
1307
  def __repr__(self):
1308
    L = ['%s=%r' % (key, value)
1309
      for key, value in self.__dict__.iteritems()]
1310
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1311
 
1312
  def __eq__(self, other):
1313
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1314
 
1315
  def __ne__(self, other):
1316
    return not (self == other)
1317
 
1318
class getMessage_result:
1319
  """
1320
  Attributes:
353 ashish 1321
   - success
349 ashish 1322
   - se
1323
  """
1324
 
1325
  thrift_spec = (
353 ashish 1326
    (0, TType.STRUCT, 'success', (Message, Message.thrift_spec), None, ), # 0
349 ashish 1327
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
1328
  )
1329
 
353 ashish 1330
  def __init__(self, success=None, se=None,):
1331
    self.success = success
349 ashish 1332
    self.se = se
1333
 
1334
  def read(self, iprot):
1335
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1336
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1337
      return
1338
    iprot.readStructBegin()
1339
    while True:
1340
      (fname, ftype, fid) = iprot.readFieldBegin()
1341
      if ftype == TType.STOP:
1342
        break
353 ashish 1343
      if fid == 0:
349 ashish 1344
        if ftype == TType.STRUCT:
353 ashish 1345
          self.success = Message()
1346
          self.success.read(iprot)
1347
        else:
1348
          iprot.skip(ftype)
1349
      elif fid == 1:
1350
        if ftype == TType.STRUCT:
349 ashish 1351
          self.se = HelperServiceException()
1352
          self.se.read(iprot)
1353
        else:
1354
          iprot.skip(ftype)
1355
      else:
1356
        iprot.skip(ftype)
1357
      iprot.readFieldEnd()
1358
    iprot.readStructEnd()
1359
 
1360
  def write(self, oprot):
1361
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1362
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1363
      return
1364
    oprot.writeStructBegin('getMessage_result')
353 ashish 1365
    if self.success != None:
1366
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1367
      self.success.write(oprot)
1368
      oprot.writeFieldEnd()
349 ashish 1369
    if self.se != None:
1370
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1371
      self.se.write(oprot)
1372
      oprot.writeFieldEnd()
1373
    oprot.writeFieldStop()
1374
    oprot.writeStructEnd()
1375
 
1376
  def __repr__(self):
1377
    L = ['%s=%r' % (key, value)
1378
      for key, value in self.__dict__.iteritems()]
1379
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1380
 
1381
  def __eq__(self, other):
1382
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1383
 
1384
  def __ne__(self, other):
1385
    return not (self == other)
1386
 
1387
class getSubstitutedMessage_args:
1388
  """
1389
  Attributes:
1390
   - id
1391
   - params
1392
  """
1393
 
1394
  thrift_spec = (
1395
    None, # 0
1396
    (1, TType.I64, 'id', None, None, ), # 1
1397
    (2, TType.MAP, 'params', (TType.STRING,None,TType.STRING,None), None, ), # 2
1398
  )
1399
 
1400
  def __init__(self, id=None, params=None,):
1401
    self.id = id
1402
    self.params = params
1403
 
1404
  def read(self, iprot):
1405
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1406
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1407
      return
1408
    iprot.readStructBegin()
1409
    while True:
1410
      (fname, ftype, fid) = iprot.readFieldBegin()
1411
      if ftype == TType.STOP:
1412
        break
1413
      if fid == 1:
1414
        if ftype == TType.I64:
1415
          self.id = iprot.readI64();
1416
        else:
1417
          iprot.skip(ftype)
1418
      elif fid == 2:
1419
        if ftype == TType.MAP:
1420
          self.params = {}
472 rajveer 1421
          (_ktype15, _vtype16, _size14 ) = iprot.readMapBegin() 
1422
          for _i18 in xrange(_size14):
1423
            _key19 = iprot.readString();
1424
            _val20 = iprot.readString();
1425
            self.params[_key19] = _val20
349 ashish 1426
          iprot.readMapEnd()
1427
        else:
1428
          iprot.skip(ftype)
1429
      else:
1430
        iprot.skip(ftype)
1431
      iprot.readFieldEnd()
1432
    iprot.readStructEnd()
1433
 
1434
  def write(self, oprot):
1435
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1436
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1437
      return
1438
    oprot.writeStructBegin('getSubstitutedMessage_args')
1439
    if self.id != None:
1440
      oprot.writeFieldBegin('id', TType.I64, 1)
1441
      oprot.writeI64(self.id)
1442
      oprot.writeFieldEnd()
1443
    if self.params != None:
1444
      oprot.writeFieldBegin('params', TType.MAP, 2)
1445
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.params))
472 rajveer 1446
      for kiter21,viter22 in self.params.items():
1447
        oprot.writeString(kiter21)
1448
        oprot.writeString(viter22)
349 ashish 1449
      oprot.writeMapEnd()
1450
      oprot.writeFieldEnd()
1451
    oprot.writeFieldStop()
1452
    oprot.writeStructEnd()
1453
 
1454
  def __repr__(self):
1455
    L = ['%s=%r' % (key, value)
1456
      for key, value in self.__dict__.iteritems()]
1457
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1458
 
1459
  def __eq__(self, other):
1460
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1461
 
1462
  def __ne__(self, other):
1463
    return not (self == other)
1464
 
1465
class getSubstitutedMessage_result:
1466
  """
1467
  Attributes:
353 ashish 1468
   - success
349 ashish 1469
   - se
1470
  """
1471
 
1472
  thrift_spec = (
353 ashish 1473
    (0, TType.STRUCT, 'success', (Message, Message.thrift_spec), None, ), # 0
349 ashish 1474
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
1475
  )
1476
 
353 ashish 1477
  def __init__(self, success=None, se=None,):
1478
    self.success = success
349 ashish 1479
    self.se = se
1480
 
1481
  def read(self, iprot):
1482
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1483
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1484
      return
1485
    iprot.readStructBegin()
1486
    while True:
1487
      (fname, ftype, fid) = iprot.readFieldBegin()
1488
      if ftype == TType.STOP:
1489
        break
353 ashish 1490
      if fid == 0:
349 ashish 1491
        if ftype == TType.STRUCT:
353 ashish 1492
          self.success = Message()
1493
          self.success.read(iprot)
1494
        else:
1495
          iprot.skip(ftype)
1496
      elif fid == 1:
1497
        if ftype == TType.STRUCT:
349 ashish 1498
          self.se = HelperServiceException()
1499
          self.se.read(iprot)
1500
        else:
1501
          iprot.skip(ftype)
1502
      else:
1503
        iprot.skip(ftype)
1504
      iprot.readFieldEnd()
1505
    iprot.readStructEnd()
1506
 
1507
  def write(self, oprot):
1508
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1509
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1510
      return
1511
    oprot.writeStructBegin('getSubstitutedMessage_result')
353 ashish 1512
    if self.success != None:
1513
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1514
      self.success.write(oprot)
1515
      oprot.writeFieldEnd()
349 ashish 1516
    if self.se != None:
1517
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1518
      self.se.write(oprot)
1519
      oprot.writeFieldEnd()
1520
    oprot.writeFieldStop()
1521
    oprot.writeStructEnd()
1522
 
1523
  def __repr__(self):
1524
    L = ['%s=%r' % (key, value)
1525
      for key, value in self.__dict__.iteritems()]
1526
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1527
 
1528
  def __eq__(self, other):
1529
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1530
 
1531
  def __ne__(self, other):
1532
    return not (self == other)
1533
 
494 rajveer 1534
class addUser_args:
1535
  """
1536
  Attributes:
1537
   - username
1538
   - password
1539
   - warehouseId
1540
  """
349 ashish 1541
 
494 rajveer 1542
  thrift_spec = (
1543
    None, # 0
1544
    (1, TType.STRING, 'username', None, None, ), # 1
1545
    (2, TType.STRING, 'password', None, None, ), # 2
1546
    (3, TType.I64, 'warehouseId', None, None, ), # 3
1547
  )
1548
 
1549
  def __init__(self, username=None, password=None, warehouseId=None,):
1550
    self.username = username
1551
    self.password = password
1552
    self.warehouseId = warehouseId
1553
 
1554
  def read(self, iprot):
1555
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1556
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1557
      return
1558
    iprot.readStructBegin()
1559
    while True:
1560
      (fname, ftype, fid) = iprot.readFieldBegin()
1561
      if ftype == TType.STOP:
1562
        break
1563
      if fid == 1:
1564
        if ftype == TType.STRING:
1565
          self.username = iprot.readString();
1566
        else:
1567
          iprot.skip(ftype)
1568
      elif fid == 2:
1569
        if ftype == TType.STRING:
1570
          self.password = iprot.readString();
1571
        else:
1572
          iprot.skip(ftype)
1573
      elif fid == 3:
1574
        if ftype == TType.I64:
1575
          self.warehouseId = iprot.readI64();
1576
        else:
1577
          iprot.skip(ftype)
1578
      else:
1579
        iprot.skip(ftype)
1580
      iprot.readFieldEnd()
1581
    iprot.readStructEnd()
1582
 
1583
  def write(self, oprot):
1584
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1585
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1586
      return
1587
    oprot.writeStructBegin('addUser_args')
1588
    if self.username != None:
1589
      oprot.writeFieldBegin('username', TType.STRING, 1)
1590
      oprot.writeString(self.username)
1591
      oprot.writeFieldEnd()
1592
    if self.password != None:
1593
      oprot.writeFieldBegin('password', TType.STRING, 2)
1594
      oprot.writeString(self.password)
1595
      oprot.writeFieldEnd()
1596
    if self.warehouseId != None:
1597
      oprot.writeFieldBegin('warehouseId', TType.I64, 3)
1598
      oprot.writeI64(self.warehouseId)
1599
      oprot.writeFieldEnd()
1600
    oprot.writeFieldStop()
1601
    oprot.writeStructEnd()
1602
 
1603
  def __repr__(self):
1604
    L = ['%s=%r' % (key, value)
1605
      for key, value in self.__dict__.iteritems()]
1606
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1607
 
1608
  def __eq__(self, other):
1609
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1610
 
1611
  def __ne__(self, other):
1612
    return not (self == other)
1613
 
1614
class addUser_result:
1615
  """
1616
  Attributes:
1617
   - success
1618
   - se
1619
  """
1620
 
1621
  thrift_spec = (
1622
    (0, TType.BOOL, 'success', None, None, ), # 0
1623
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
1624
  )
1625
 
1626
  def __init__(self, success=None, se=None,):
1627
    self.success = success
1628
    self.se = se
1629
 
1630
  def read(self, iprot):
1631
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1632
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1633
      return
1634
    iprot.readStructBegin()
1635
    while True:
1636
      (fname, ftype, fid) = iprot.readFieldBegin()
1637
      if ftype == TType.STOP:
1638
        break
1639
      if fid == 0:
1640
        if ftype == TType.BOOL:
1641
          self.success = iprot.readBool();
1642
        else:
1643
          iprot.skip(ftype)
1644
      elif fid == 1:
1645
        if ftype == TType.STRUCT:
1646
          self.se = HelperServiceException()
1647
          self.se.read(iprot)
1648
        else:
1649
          iprot.skip(ftype)
1650
      else:
1651
        iprot.skip(ftype)
1652
      iprot.readFieldEnd()
1653
    iprot.readStructEnd()
1654
 
1655
  def write(self, oprot):
1656
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1657
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1658
      return
1659
    oprot.writeStructBegin('addUser_result')
1660
    if self.success != None:
1661
      oprot.writeFieldBegin('success', TType.BOOL, 0)
1662
      oprot.writeBool(self.success)
1663
      oprot.writeFieldEnd()
1664
    if self.se != None:
1665
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1666
      self.se.write(oprot)
1667
      oprot.writeFieldEnd()
1668
    oprot.writeFieldStop()
1669
    oprot.writeStructEnd()
1670
 
1671
  def __repr__(self):
1672
    L = ['%s=%r' % (key, value)
1673
      for key, value in self.__dict__.iteritems()]
1674
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1675
 
1676
  def __eq__(self, other):
1677
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1678
 
1679
  def __ne__(self, other):
1680
    return not (self == other)
1681
 
1682
class deleteUser_args:
1683
  """
1684
  Attributes:
1685
   - username
1686
  """
1687
 
1688
  thrift_spec = (
1689
    None, # 0
1690
    (1, TType.STRING, 'username', None, None, ), # 1
1691
  )
1692
 
1693
  def __init__(self, username=None,):
1694
    self.username = username
1695
 
1696
  def read(self, iprot):
1697
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1698
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1699
      return
1700
    iprot.readStructBegin()
1701
    while True:
1702
      (fname, ftype, fid) = iprot.readFieldBegin()
1703
      if ftype == TType.STOP:
1704
        break
1705
      if fid == 1:
1706
        if ftype == TType.STRING:
1707
          self.username = iprot.readString();
1708
        else:
1709
          iprot.skip(ftype)
1710
      else:
1711
        iprot.skip(ftype)
1712
      iprot.readFieldEnd()
1713
    iprot.readStructEnd()
1714
 
1715
  def write(self, oprot):
1716
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1717
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1718
      return
1719
    oprot.writeStructBegin('deleteUser_args')
1720
    if self.username != None:
1721
      oprot.writeFieldBegin('username', TType.STRING, 1)
1722
      oprot.writeString(self.username)
1723
      oprot.writeFieldEnd()
1724
    oprot.writeFieldStop()
1725
    oprot.writeStructEnd()
1726
 
1727
  def __repr__(self):
1728
    L = ['%s=%r' % (key, value)
1729
      for key, value in self.__dict__.iteritems()]
1730
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1731
 
1732
  def __eq__(self, other):
1733
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1734
 
1735
  def __ne__(self, other):
1736
    return not (self == other)
1737
 
1738
class deleteUser_result:
1739
  """
1740
  Attributes:
1741
   - success
1742
   - se
1743
  """
1744
 
1745
  thrift_spec = (
1746
    (0, TType.BOOL, 'success', None, None, ), # 0
1747
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
1748
  )
1749
 
1750
  def __init__(self, success=None, se=None,):
1751
    self.success = success
1752
    self.se = se
1753
 
1754
  def read(self, iprot):
1755
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1756
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1757
      return
1758
    iprot.readStructBegin()
1759
    while True:
1760
      (fname, ftype, fid) = iprot.readFieldBegin()
1761
      if ftype == TType.STOP:
1762
        break
1763
      if fid == 0:
1764
        if ftype == TType.BOOL:
1765
          self.success = iprot.readBool();
1766
        else:
1767
          iprot.skip(ftype)
1768
      elif fid == 1:
1769
        if ftype == TType.STRUCT:
1770
          self.se = HelperServiceException()
1771
          self.se.read(iprot)
1772
        else:
1773
          iprot.skip(ftype)
1774
      else:
1775
        iprot.skip(ftype)
1776
      iprot.readFieldEnd()
1777
    iprot.readStructEnd()
1778
 
1779
  def write(self, oprot):
1780
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1781
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1782
      return
1783
    oprot.writeStructBegin('deleteUser_result')
1784
    if self.success != None:
1785
      oprot.writeFieldBegin('success', TType.BOOL, 0)
1786
      oprot.writeBool(self.success)
1787
      oprot.writeFieldEnd()
1788
    if self.se != None:
1789
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1790
      self.se.write(oprot)
1791
      oprot.writeFieldEnd()
1792
    oprot.writeFieldStop()
1793
    oprot.writeStructEnd()
1794
 
1795
  def __repr__(self):
1796
    L = ['%s=%r' % (key, value)
1797
      for key, value in self.__dict__.iteritems()]
1798
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1799
 
1800
  def __eq__(self, other):
1801
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1802
 
1803
  def __ne__(self, other):
1804
    return not (self == other)
1805
 
1806
class authenticateUser_args:
1807
  """
1808
  Attributes:
1809
   - username
1810
   - password
1811
  """
1812
 
1813
  thrift_spec = (
1814
    None, # 0
1815
    (1, TType.STRING, 'username', None, None, ), # 1
1816
    (2, TType.STRING, 'password', None, None, ), # 2
1817
  )
1818
 
1819
  def __init__(self, username=None, password=None,):
1820
    self.username = username
1821
    self.password = password
1822
 
1823
  def read(self, iprot):
1824
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1825
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1826
      return
1827
    iprot.readStructBegin()
1828
    while True:
1829
      (fname, ftype, fid) = iprot.readFieldBegin()
1830
      if ftype == TType.STOP:
1831
        break
1832
      if fid == 1:
1833
        if ftype == TType.STRING:
1834
          self.username = iprot.readString();
1835
        else:
1836
          iprot.skip(ftype)
1837
      elif fid == 2:
1838
        if ftype == TType.STRING:
1839
          self.password = iprot.readString();
1840
        else:
1841
          iprot.skip(ftype)
1842
      else:
1843
        iprot.skip(ftype)
1844
      iprot.readFieldEnd()
1845
    iprot.readStructEnd()
1846
 
1847
  def write(self, oprot):
1848
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1849
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1850
      return
1851
    oprot.writeStructBegin('authenticateUser_args')
1852
    if self.username != None:
1853
      oprot.writeFieldBegin('username', TType.STRING, 1)
1854
      oprot.writeString(self.username)
1855
      oprot.writeFieldEnd()
1856
    if self.password != None:
1857
      oprot.writeFieldBegin('password', TType.STRING, 2)
1858
      oprot.writeString(self.password)
1859
      oprot.writeFieldEnd()
1860
    oprot.writeFieldStop()
1861
    oprot.writeStructEnd()
1862
 
1863
  def __repr__(self):
1864
    L = ['%s=%r' % (key, value)
1865
      for key, value in self.__dict__.iteritems()]
1866
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1867
 
1868
  def __eq__(self, other):
1869
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1870
 
1871
  def __ne__(self, other):
1872
    return not (self == other)
1873
 
1874
class authenticateUser_result:
1875
  """
1876
  Attributes:
1877
   - success
1878
   - se
1879
  """
1880
 
1881
  thrift_spec = (
1882
    (0, TType.I64, 'success', None, None, ), # 0
1883
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
1884
  )
1885
 
1886
  def __init__(self, success=None, se=None,):
1887
    self.success = success
1888
    self.se = se
1889
 
1890
  def read(self, iprot):
1891
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1892
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1893
      return
1894
    iprot.readStructBegin()
1895
    while True:
1896
      (fname, ftype, fid) = iprot.readFieldBegin()
1897
      if ftype == TType.STOP:
1898
        break
1899
      if fid == 0:
1900
        if ftype == TType.I64:
1901
          self.success = iprot.readI64();
1902
        else:
1903
          iprot.skip(ftype)
1904
      elif fid == 1:
1905
        if ftype == TType.STRUCT:
1906
          self.se = HelperServiceException()
1907
          self.se.read(iprot)
1908
        else:
1909
          iprot.skip(ftype)
1910
      else:
1911
        iprot.skip(ftype)
1912
      iprot.readFieldEnd()
1913
    iprot.readStructEnd()
1914
 
1915
  def write(self, oprot):
1916
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1917
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1918
      return
1919
    oprot.writeStructBegin('authenticateUser_result')
1920
    if self.success != None:
1921
      oprot.writeFieldBegin('success', TType.I64, 0)
1922
      oprot.writeI64(self.success)
1923
      oprot.writeFieldEnd()
1924
    if self.se != None:
1925
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1926
      self.se.write(oprot)
1927
      oprot.writeFieldEnd()
1928
    oprot.writeFieldStop()
1929
    oprot.writeStructEnd()
1930
 
1931
  def __repr__(self):
1932
    L = ['%s=%r' % (key, value)
1933
      for key, value in self.__dict__.iteritems()]
1934
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1935
 
1936
  def __eq__(self, other):
1937
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1938
 
1939
  def __ne__(self, other):
1940
    return not (self == other)
1941
 
1942
class updatePassword_args:
1943
  """
1944
  Attributes:
1945
   - username
1946
   - oldPassword
1947
   - newPassword
1948
  """
1949
 
1950
  thrift_spec = (
1951
    None, # 0
1952
    (1, TType.STRING, 'username', None, None, ), # 1
1953
    (2, TType.STRING, 'oldPassword', None, None, ), # 2
1954
    (3, TType.STRING, 'newPassword', None, None, ), # 3
1955
  )
1956
 
1957
  def __init__(self, username=None, oldPassword=None, newPassword=None,):
1958
    self.username = username
1959
    self.oldPassword = oldPassword
1960
    self.newPassword = newPassword
1961
 
1962
  def read(self, iprot):
1963
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1964
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1965
      return
1966
    iprot.readStructBegin()
1967
    while True:
1968
      (fname, ftype, fid) = iprot.readFieldBegin()
1969
      if ftype == TType.STOP:
1970
        break
1971
      if fid == 1:
1972
        if ftype == TType.STRING:
1973
          self.username = iprot.readString();
1974
        else:
1975
          iprot.skip(ftype)
1976
      elif fid == 2:
1977
        if ftype == TType.STRING:
1978
          self.oldPassword = iprot.readString();
1979
        else:
1980
          iprot.skip(ftype)
1981
      elif fid == 3:
1982
        if ftype == TType.STRING:
1983
          self.newPassword = iprot.readString();
1984
        else:
1985
          iprot.skip(ftype)
1986
      else:
1987
        iprot.skip(ftype)
1988
      iprot.readFieldEnd()
1989
    iprot.readStructEnd()
1990
 
1991
  def write(self, oprot):
1992
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1993
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1994
      return
1995
    oprot.writeStructBegin('updatePassword_args')
1996
    if self.username != None:
1997
      oprot.writeFieldBegin('username', TType.STRING, 1)
1998
      oprot.writeString(self.username)
1999
      oprot.writeFieldEnd()
2000
    if self.oldPassword != None:
2001
      oprot.writeFieldBegin('oldPassword', TType.STRING, 2)
2002
      oprot.writeString(self.oldPassword)
2003
      oprot.writeFieldEnd()
2004
    if self.newPassword != None:
2005
      oprot.writeFieldBegin('newPassword', TType.STRING, 3)
2006
      oprot.writeString(self.newPassword)
2007
      oprot.writeFieldEnd()
2008
    oprot.writeFieldStop()
2009
    oprot.writeStructEnd()
2010
 
2011
  def __repr__(self):
2012
    L = ['%s=%r' % (key, value)
2013
      for key, value in self.__dict__.iteritems()]
2014
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2015
 
2016
  def __eq__(self, other):
2017
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2018
 
2019
  def __ne__(self, other):
2020
    return not (self == other)
2021
 
2022
class updatePassword_result:
2023
  """
2024
  Attributes:
2025
   - success
2026
   - se
2027
  """
2028
 
2029
  thrift_spec = (
2030
    (0, TType.BOOL, 'success', None, None, ), # 0
2031
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
2032
  )
2033
 
2034
  def __init__(self, success=None, se=None,):
2035
    self.success = success
2036
    self.se = se
2037
 
2038
  def read(self, iprot):
2039
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2040
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2041
      return
2042
    iprot.readStructBegin()
2043
    while True:
2044
      (fname, ftype, fid) = iprot.readFieldBegin()
2045
      if ftype == TType.STOP:
2046
        break
2047
      if fid == 0:
2048
        if ftype == TType.BOOL:
2049
          self.success = iprot.readBool();
2050
        else:
2051
          iprot.skip(ftype)
2052
      elif fid == 1:
2053
        if ftype == TType.STRUCT:
2054
          self.se = HelperServiceException()
2055
          self.se.read(iprot)
2056
        else:
2057
          iprot.skip(ftype)
2058
      else:
2059
        iprot.skip(ftype)
2060
      iprot.readFieldEnd()
2061
    iprot.readStructEnd()
2062
 
2063
  def write(self, oprot):
2064
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2065
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2066
      return
2067
    oprot.writeStructBegin('updatePassword_result')
2068
    if self.success != None:
2069
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2070
      oprot.writeBool(self.success)
2071
      oprot.writeFieldEnd()
2072
    if self.se != None:
2073
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
2074
      self.se.write(oprot)
2075
      oprot.writeFieldEnd()
2076
    oprot.writeFieldStop()
2077
    oprot.writeStructEnd()
2078
 
2079
  def __repr__(self):
2080
    L = ['%s=%r' % (key, value)
2081
      for key, value in self.__dict__.iteritems()]
2082
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2083
 
2084
  def __eq__(self, other):
2085
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2086
 
2087
  def __ne__(self, other):
2088
    return not (self == other)
2089
 
759 chandransh 2090
class authenticateLogisticsUser_args:
2091
  """
2092
  Attributes:
2093
   - username
2094
   - password
2095
  """
494 rajveer 2096
 
759 chandransh 2097
  thrift_spec = (
2098
    None, # 0
2099
    (1, TType.STRING, 'username', None, None, ), # 1
2100
    (2, TType.STRING, 'password', None, None, ), # 2
2101
  )
2102
 
2103
  def __init__(self, username=None, password=None,):
2104
    self.username = username
2105
    self.password = password
2106
 
2107
  def read(self, iprot):
2108
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2109
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2110
      return
2111
    iprot.readStructBegin()
2112
    while True:
2113
      (fname, ftype, fid) = iprot.readFieldBegin()
2114
      if ftype == TType.STOP:
2115
        break
2116
      if fid == 1:
2117
        if ftype == TType.STRING:
2118
          self.username = iprot.readString();
2119
        else:
2120
          iprot.skip(ftype)
2121
      elif fid == 2:
2122
        if ftype == TType.STRING:
2123
          self.password = iprot.readString();
2124
        else:
2125
          iprot.skip(ftype)
2126
      else:
2127
        iprot.skip(ftype)
2128
      iprot.readFieldEnd()
2129
    iprot.readStructEnd()
2130
 
2131
  def write(self, oprot):
2132
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2133
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2134
      return
2135
    oprot.writeStructBegin('authenticateLogisticsUser_args')
2136
    if self.username != None:
2137
      oprot.writeFieldBegin('username', TType.STRING, 1)
2138
      oprot.writeString(self.username)
2139
      oprot.writeFieldEnd()
2140
    if self.password != None:
2141
      oprot.writeFieldBegin('password', TType.STRING, 2)
2142
      oprot.writeString(self.password)
2143
      oprot.writeFieldEnd()
2144
    oprot.writeFieldStop()
2145
    oprot.writeStructEnd()
2146
 
2147
  def __repr__(self):
2148
    L = ['%s=%r' % (key, value)
2149
      for key, value in self.__dict__.iteritems()]
2150
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2151
 
2152
  def __eq__(self, other):
2153
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2154
 
2155
  def __ne__(self, other):
2156
    return not (self == other)
2157
 
2158
class authenticateLogisticsUser_result:
2159
  """
2160
  Attributes:
2161
   - success
2162
   - hse
2163
  """
2164
 
2165
  thrift_spec = (
2166
    (0, TType.STRUCT, 'success', (LogisticsUser, LogisticsUser.thrift_spec), None, ), # 0
2167
    (1, TType.STRUCT, 'hse', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
2168
  )
2169
 
2170
  def __init__(self, success=None, hse=None,):
2171
    self.success = success
2172
    self.hse = hse
2173
 
2174
  def read(self, iprot):
2175
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2176
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2177
      return
2178
    iprot.readStructBegin()
2179
    while True:
2180
      (fname, ftype, fid) = iprot.readFieldBegin()
2181
      if ftype == TType.STOP:
2182
        break
2183
      if fid == 0:
2184
        if ftype == TType.STRUCT:
2185
          self.success = LogisticsUser()
2186
          self.success.read(iprot)
2187
        else:
2188
          iprot.skip(ftype)
2189
      elif fid == 1:
2190
        if ftype == TType.STRUCT:
2191
          self.hse = HelperServiceException()
2192
          self.hse.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('authenticateLogisticsUser_result')
2205
    if self.success != None:
2206
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2207
      self.success.write(oprot)
2208
      oprot.writeFieldEnd()
2209
    if self.hse != None:
2210
      oprot.writeFieldBegin('hse', TType.STRUCT, 1)
2211
      self.hse.write(oprot)
2212
      oprot.writeFieldEnd()
2213
    oprot.writeFieldStop()
2214
    oprot.writeStructEnd()
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