Subversion Repositories SmartDukaan

Rev

Rev 472 | Rev 759 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 472 Rev 494
Line 58... Line 58...
58
     - id
58
     - id
59
     - params
59
     - params
60
    """
60
    """
61
    pass
61
    pass
62
 
62
 
-
 
63
  def addUser(self, username, password, warehouseId):
-
 
64
    """
-
 
65
    Parameters:
-
 
66
     - username
-
 
67
     - password
-
 
68
     - warehouseId
-
 
69
    """
-
 
70
    pass
-
 
71
 
-
 
72
  def deleteUser(self, username):
-
 
73
    """
-
 
74
    Parameters:
-
 
75
     - username
-
 
76
    """
-
 
77
    pass
-
 
78
 
-
 
79
  def authenticateUser(self, username, password):
-
 
80
    """
-
 
81
    Parameters:
-
 
82
     - username
-
 
83
     - password
-
 
84
    """
-
 
85
    pass
-
 
86
 
-
 
87
  def updatePassword(self, username, oldPassword, newPassword):
-
 
88
    """
-
 
89
    Parameters:
-
 
90
     - username
-
 
91
     - oldPassword
-
 
92
     - newPassword
-
 
93
    """
-
 
94
    pass
-
 
95
 
63
 
96
 
64
class Client(Iface):
97
class Client(Iface):
65
  def __init__(self, iprot, oprot=None):
98
  def __init__(self, iprot, oprot=None):
66
    self._iprot = self._oprot = iprot
99
    self._iprot = self._oprot = iprot
67
    if oprot != None:
100
    if oprot != None:
Line 254... Line 287...
254
      return result.success
287
      return result.success
255
    if result.se != None:
288
    if result.se != None:
256
      raise result.se
289
      raise result.se
257
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSubstitutedMessage failed: unknown result");
290
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSubstitutedMessage failed: unknown result");
258
 
291
 
-
 
292
  def addUser(self, username, password, warehouseId):
-
 
293
    """
-
 
294
    Parameters:
-
 
295
     - username
-
 
296
     - password
-
 
297
     - warehouseId
-
 
298
    """
-
 
299
    self.send_addUser(username, password, warehouseId)
-
 
300
    return self.recv_addUser()
-
 
301
 
-
 
302
  def send_addUser(self, username, password, warehouseId):
-
 
303
    self._oprot.writeMessageBegin('addUser', TMessageType.CALL, self._seqid)
-
 
304
    args = addUser_args()
-
 
305
    args.username = username
-
 
306
    args.password = password
-
 
307
    args.warehouseId = warehouseId
-
 
308
    args.write(self._oprot)
-
 
309
    self._oprot.writeMessageEnd()
-
 
310
    self._oprot.trans.flush()
-
 
311
 
-
 
312
  def recv_addUser(self, ):
-
 
313
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
314
    if mtype == TMessageType.EXCEPTION:
-
 
315
      x = TApplicationException()
-
 
316
      x.read(self._iprot)
-
 
317
      self._iprot.readMessageEnd()
-
 
318
      raise x
-
 
319
    result = addUser_result()
-
 
320
    result.read(self._iprot)
-
 
321
    self._iprot.readMessageEnd()
-
 
322
    if result.success != None:
-
 
323
      return result.success
-
 
324
    if result.se != None:
-
 
325
      raise result.se
-
 
326
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addUser failed: unknown result");
-
 
327
 
-
 
328
  def deleteUser(self, username):
-
 
329
    """
-
 
330
    Parameters:
-
 
331
     - username
-
 
332
    """
-
 
333
    self.send_deleteUser(username)
-
 
334
    return self.recv_deleteUser()
-
 
335
 
-
 
336
  def send_deleteUser(self, username):
-
 
337
    self._oprot.writeMessageBegin('deleteUser', TMessageType.CALL, self._seqid)
-
 
338
    args = deleteUser_args()
-
 
339
    args.username = username
-
 
340
    args.write(self._oprot)
-
 
341
    self._oprot.writeMessageEnd()
-
 
342
    self._oprot.trans.flush()
-
 
343
 
-
 
344
  def recv_deleteUser(self, ):
-
 
345
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
346
    if mtype == TMessageType.EXCEPTION:
-
 
347
      x = TApplicationException()
-
 
348
      x.read(self._iprot)
-
 
349
      self._iprot.readMessageEnd()
-
 
350
      raise x
-
 
351
    result = deleteUser_result()
-
 
352
    result.read(self._iprot)
-
 
353
    self._iprot.readMessageEnd()
-
 
354
    if result.success != None:
-
 
355
      return result.success
-
 
356
    if result.se != None:
-
 
357
      raise result.se
-
 
358
    raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
-
 
359
 
-
 
360
  def authenticateUser(self, username, password):
-
 
361
    """
-
 
362
    Parameters:
-
 
363
     - username
-
 
364
     - password
-
 
365
    """
-
 
366
    self.send_authenticateUser(username, password)
-
 
367
    return self.recv_authenticateUser()
-
 
368
 
-
 
369
  def send_authenticateUser(self, username, password):
-
 
370
    self._oprot.writeMessageBegin('authenticateUser', TMessageType.CALL, self._seqid)
-
 
371
    args = authenticateUser_args()
-
 
372
    args.username = username
-
 
373
    args.password = password
-
 
374
    args.write(self._oprot)
-
 
375
    self._oprot.writeMessageEnd()
-
 
376
    self._oprot.trans.flush()
-
 
377
 
-
 
378
  def recv_authenticateUser(self, ):
-
 
379
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
380
    if mtype == TMessageType.EXCEPTION:
-
 
381
      x = TApplicationException()
-
 
382
      x.read(self._iprot)
-
 
383
      self._iprot.readMessageEnd()
-
 
384
      raise x
-
 
385
    result = authenticateUser_result()
-
 
386
    result.read(self._iprot)
-
 
387
    self._iprot.readMessageEnd()
-
 
388
    if result.success != None:
-
 
389
      return result.success
-
 
390
    if result.se != None:
-
 
391
      raise result.se
-
 
392
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
-
 
393
 
-
 
394
  def updatePassword(self, username, oldPassword, newPassword):
-
 
395
    """
-
 
396
    Parameters:
-
 
397
     - username
-
 
398
     - oldPassword
-
 
399
     - newPassword
-
 
400
    """
-
 
401
    self.send_updatePassword(username, oldPassword, newPassword)
-
 
402
    return self.recv_updatePassword()
-
 
403
 
-
 
404
  def send_updatePassword(self, username, oldPassword, newPassword):
-
 
405
    self._oprot.writeMessageBegin('updatePassword', TMessageType.CALL, self._seqid)
-
 
406
    args = updatePassword_args()
-
 
407
    args.username = username
-
 
408
    args.oldPassword = oldPassword
-
 
409
    args.newPassword = newPassword
-
 
410
    args.write(self._oprot)
-
 
411
    self._oprot.writeMessageEnd()
-
 
412
    self._oprot.trans.flush()
-
 
413
 
-
 
414
  def recv_updatePassword(self, ):
-
 
415
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
416
    if mtype == TMessageType.EXCEPTION:
-
 
417
      x = TApplicationException()
-
 
418
      x.read(self._iprot)
-
 
419
      self._iprot.readMessageEnd()
-
 
420
      raise x
-
 
421
    result = updatePassword_result()
-
 
422
    result.read(self._iprot)
-
 
423
    self._iprot.readMessageEnd()
-
 
424
    if result.success != None:
-
 
425
      return result.success
-
 
426
    if result.se != None:
-
 
427
      raise result.se
-
 
428
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
-
 
429
 
259
 
430
 
260
class Processor(Iface, TProcessor):
431
class Processor(Iface, TProcessor):
261
  def __init__(self, handler):
432
  def __init__(self, handler):
262
    self._handler = handler
433
    self._handler = handler
263
    self._processMap = {}
434
    self._processMap = {}
Line 265... Line 436...
265
    self._processMap["sendText"] = Processor.process_sendText
436
    self._processMap["sendText"] = Processor.process_sendText
266
    self._processMap["addMessage"] = Processor.process_addMessage
437
    self._processMap["addMessage"] = Processor.process_addMessage
267
    self._processMap["updateMessage"] = Processor.process_updateMessage
438
    self._processMap["updateMessage"] = Processor.process_updateMessage
268
    self._processMap["getMessage"] = Processor.process_getMessage
439
    self._processMap["getMessage"] = Processor.process_getMessage
269
    self._processMap["getSubstitutedMessage"] = Processor.process_getSubstitutedMessage
440
    self._processMap["getSubstitutedMessage"] = Processor.process_getSubstitutedMessage
-
 
441
    self._processMap["addUser"] = Processor.process_addUser
-
 
442
    self._processMap["deleteUser"] = Processor.process_deleteUser
-
 
443
    self._processMap["authenticateUser"] = Processor.process_authenticateUser
-
 
444
    self._processMap["updatePassword"] = Processor.process_updatePassword
270
 
445
 
271
  def process(self, iprot, oprot):
446
  def process(self, iprot, oprot):
272
    (name, type, seqid) = iprot.readMessageBegin()
447
    (name, type, seqid) = iprot.readMessageBegin()
273
    if name not in self._processMap:
448
    if name not in self._processMap:
274
      iprot.skip(TType.STRUCT)
449
      iprot.skip(TType.STRUCT)
Line 365... Line 540...
365
    oprot.writeMessageBegin("getSubstitutedMessage", TMessageType.REPLY, seqid)
540
    oprot.writeMessageBegin("getSubstitutedMessage", TMessageType.REPLY, seqid)
366
    result.write(oprot)
541
    result.write(oprot)
367
    oprot.writeMessageEnd()
542
    oprot.writeMessageEnd()
368
    oprot.trans.flush()
543
    oprot.trans.flush()
369
 
544
 
-
 
545
  def process_addUser(self, seqid, iprot, oprot):
-
 
546
    args = addUser_args()
-
 
547
    args.read(iprot)
-
 
548
    iprot.readMessageEnd()
-
 
549
    result = addUser_result()
-
 
550
    try:
-
 
551
      result.success = self._handler.addUser(args.username, args.password, args.warehouseId)
-
 
552
    except HelperServiceException, se:
-
 
553
      result.se = se
-
 
554
    oprot.writeMessageBegin("addUser", TMessageType.REPLY, seqid)
-
 
555
    result.write(oprot)
-
 
556
    oprot.writeMessageEnd()
-
 
557
    oprot.trans.flush()
-
 
558
 
-
 
559
  def process_deleteUser(self, seqid, iprot, oprot):
-
 
560
    args = deleteUser_args()
-
 
561
    args.read(iprot)
-
 
562
    iprot.readMessageEnd()
-
 
563
    result = deleteUser_result()
-
 
564
    try:
-
 
565
      result.success = self._handler.deleteUser(args.username)
-
 
566
    except HelperServiceException, se:
-
 
567
      result.se = se
-
 
568
    oprot.writeMessageBegin("deleteUser", TMessageType.REPLY, seqid)
-
 
569
    result.write(oprot)
-
 
570
    oprot.writeMessageEnd()
-
 
571
    oprot.trans.flush()
-
 
572
 
-
 
573
  def process_authenticateUser(self, seqid, iprot, oprot):
-
 
574
    args = authenticateUser_args()
-
 
575
    args.read(iprot)
-
 
576
    iprot.readMessageEnd()
-
 
577
    result = authenticateUser_result()
-
 
578
    try:
-
 
579
      result.success = self._handler.authenticateUser(args.username, args.password)
-
 
580
    except HelperServiceException, se:
-
 
581
      result.se = se
-
 
582
    oprot.writeMessageBegin("authenticateUser", TMessageType.REPLY, seqid)
-
 
583
    result.write(oprot)
-
 
584
    oprot.writeMessageEnd()
-
 
585
    oprot.trans.flush()
-
 
586
 
-
 
587
  def process_updatePassword(self, seqid, iprot, oprot):
-
 
588
    args = updatePassword_args()
-
 
589
    args.read(iprot)
-
 
590
    iprot.readMessageEnd()
-
 
591
    result = updatePassword_result()
-
 
592
    try:
-
 
593
      result.success = self._handler.updatePassword(args.username, args.oldPassword, args.newPassword)
-
 
594
    except HelperServiceException, se:
-
 
595
      result.se = se
-
 
596
    oprot.writeMessageBegin("updatePassword", TMessageType.REPLY, seqid)
-
 
597
    result.write(oprot)
-
 
598
    oprot.writeMessageEnd()
-
 
599
    oprot.trans.flush()
-
 
600
 
370
 
601
 
371
# HELPER FUNCTIONS AND STRUCTURES
602
# HELPER FUNCTIONS AND STRUCTURES
372
 
603
 
373
class sendMail_args:
604
class sendMail_args:
374
  """
605
  """
Line 1093... Line 1324...
1093
      oprot.writeFieldEnd()
1324
      oprot.writeFieldEnd()
1094
    if self.se != None:
1325
    if self.se != None:
1095
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1326
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
1096
      self.se.write(oprot)
1327
      self.se.write(oprot)
1097
      oprot.writeFieldEnd()
1328
      oprot.writeFieldEnd()
-
 
1329
    oprot.writeFieldStop()
-
 
1330
    oprot.writeStructEnd()
-
 
1331
 
-
 
1332
  def __repr__(self):
-
 
1333
    L = ['%s=%r' % (key, value)
-
 
1334
      for key, value in self.__dict__.iteritems()]
-
 
1335
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1336
 
-
 
1337
  def __eq__(self, other):
-
 
1338
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1339
 
-
 
1340
  def __ne__(self, other):
-
 
1341
    return not (self == other)
-
 
1342
 
-
 
1343
class addUser_args:
-
 
1344
  """
-
 
1345
  Attributes:
-
 
1346
   - username
-
 
1347
   - password
-
 
1348
   - warehouseId
-
 
1349
  """
-
 
1350
 
-
 
1351
  thrift_spec = (
-
 
1352
    None, # 0
-
 
1353
    (1, TType.STRING, 'username', None, None, ), # 1
-
 
1354
    (2, TType.STRING, 'password', None, None, ), # 2
-
 
1355
    (3, TType.I64, 'warehouseId', None, None, ), # 3
-
 
1356
  )
-
 
1357
 
-
 
1358
  def __init__(self, username=None, password=None, warehouseId=None,):
-
 
1359
    self.username = username
-
 
1360
    self.password = password
-
 
1361
    self.warehouseId = warehouseId
-
 
1362
 
-
 
1363
  def read(self, iprot):
-
 
1364
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1365
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1366
      return
-
 
1367
    iprot.readStructBegin()
-
 
1368
    while True:
-
 
1369
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1370
      if ftype == TType.STOP:
-
 
1371
        break
-
 
1372
      if fid == 1:
-
 
1373
        if ftype == TType.STRING:
-
 
1374
          self.username = iprot.readString();
-
 
1375
        else:
-
 
1376
          iprot.skip(ftype)
-
 
1377
      elif fid == 2:
-
 
1378
        if ftype == TType.STRING:
-
 
1379
          self.password = iprot.readString();
-
 
1380
        else:
-
 
1381
          iprot.skip(ftype)
-
 
1382
      elif fid == 3:
-
 
1383
        if ftype == TType.I64:
-
 
1384
          self.warehouseId = iprot.readI64();
-
 
1385
        else:
-
 
1386
          iprot.skip(ftype)
-
 
1387
      else:
-
 
1388
        iprot.skip(ftype)
-
 
1389
      iprot.readFieldEnd()
-
 
1390
    iprot.readStructEnd()
-
 
1391
 
-
 
1392
  def write(self, oprot):
-
 
1393
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1394
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1395
      return
-
 
1396
    oprot.writeStructBegin('addUser_args')
-
 
1397
    if self.username != None:
-
 
1398
      oprot.writeFieldBegin('username', TType.STRING, 1)
-
 
1399
      oprot.writeString(self.username)
-
 
1400
      oprot.writeFieldEnd()
-
 
1401
    if self.password != None:
-
 
1402
      oprot.writeFieldBegin('password', TType.STRING, 2)
-
 
1403
      oprot.writeString(self.password)
-
 
1404
      oprot.writeFieldEnd()
-
 
1405
    if self.warehouseId != None:
-
 
1406
      oprot.writeFieldBegin('warehouseId', TType.I64, 3)
-
 
1407
      oprot.writeI64(self.warehouseId)
-
 
1408
      oprot.writeFieldEnd()
-
 
1409
    oprot.writeFieldStop()
-
 
1410
    oprot.writeStructEnd()
-
 
1411
 
-
 
1412
  def __repr__(self):
-
 
1413
    L = ['%s=%r' % (key, value)
-
 
1414
      for key, value in self.__dict__.iteritems()]
-
 
1415
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1416
 
-
 
1417
  def __eq__(self, other):
-
 
1418
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1419
 
-
 
1420
  def __ne__(self, other):
-
 
1421
    return not (self == other)
-
 
1422
 
-
 
1423
class addUser_result:
-
 
1424
  """
-
 
1425
  Attributes:
-
 
1426
   - success
-
 
1427
   - se
-
 
1428
  """
-
 
1429
 
-
 
1430
  thrift_spec = (
-
 
1431
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
1432
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
-
 
1433
  )
-
 
1434
 
-
 
1435
  def __init__(self, success=None, se=None,):
-
 
1436
    self.success = success
-
 
1437
    self.se = se
-
 
1438
 
-
 
1439
  def read(self, iprot):
-
 
1440
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1441
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1442
      return
-
 
1443
    iprot.readStructBegin()
-
 
1444
    while True:
-
 
1445
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1446
      if ftype == TType.STOP:
-
 
1447
        break
-
 
1448
      if fid == 0:
-
 
1449
        if ftype == TType.BOOL:
-
 
1450
          self.success = iprot.readBool();
-
 
1451
        else:
-
 
1452
          iprot.skip(ftype)
-
 
1453
      elif fid == 1:
-
 
1454
        if ftype == TType.STRUCT:
-
 
1455
          self.se = HelperServiceException()
-
 
1456
          self.se.read(iprot)
-
 
1457
        else:
-
 
1458
          iprot.skip(ftype)
-
 
1459
      else:
-
 
1460
        iprot.skip(ftype)
-
 
1461
      iprot.readFieldEnd()
-
 
1462
    iprot.readStructEnd()
-
 
1463
 
-
 
1464
  def write(self, oprot):
-
 
1465
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1466
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1467
      return
-
 
1468
    oprot.writeStructBegin('addUser_result')
-
 
1469
    if self.success != None:
-
 
1470
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
1471
      oprot.writeBool(self.success)
-
 
1472
      oprot.writeFieldEnd()
-
 
1473
    if self.se != None:
-
 
1474
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
-
 
1475
      self.se.write(oprot)
-
 
1476
      oprot.writeFieldEnd()
-
 
1477
    oprot.writeFieldStop()
-
 
1478
    oprot.writeStructEnd()
-
 
1479
 
-
 
1480
  def __repr__(self):
-
 
1481
    L = ['%s=%r' % (key, value)
-
 
1482
      for key, value in self.__dict__.iteritems()]
-
 
1483
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1484
 
-
 
1485
  def __eq__(self, other):
-
 
1486
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1487
 
-
 
1488
  def __ne__(self, other):
-
 
1489
    return not (self == other)
-
 
1490
 
-
 
1491
class deleteUser_args:
-
 
1492
  """
-
 
1493
  Attributes:
-
 
1494
   - username
-
 
1495
  """
-
 
1496
 
-
 
1497
  thrift_spec = (
-
 
1498
    None, # 0
-
 
1499
    (1, TType.STRING, 'username', None, None, ), # 1
-
 
1500
  )
-
 
1501
 
-
 
1502
  def __init__(self, username=None,):
-
 
1503
    self.username = username
-
 
1504
 
-
 
1505
  def read(self, iprot):
-
 
1506
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1507
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1508
      return
-
 
1509
    iprot.readStructBegin()
-
 
1510
    while True:
-
 
1511
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1512
      if ftype == TType.STOP:
-
 
1513
        break
-
 
1514
      if fid == 1:
-
 
1515
        if ftype == TType.STRING:
-
 
1516
          self.username = iprot.readString();
-
 
1517
        else:
-
 
1518
          iprot.skip(ftype)
-
 
1519
      else:
-
 
1520
        iprot.skip(ftype)
-
 
1521
      iprot.readFieldEnd()
-
 
1522
    iprot.readStructEnd()
-
 
1523
 
-
 
1524
  def write(self, oprot):
-
 
1525
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1526
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1527
      return
-
 
1528
    oprot.writeStructBegin('deleteUser_args')
-
 
1529
    if self.username != None:
-
 
1530
      oprot.writeFieldBegin('username', TType.STRING, 1)
-
 
1531
      oprot.writeString(self.username)
-
 
1532
      oprot.writeFieldEnd()
-
 
1533
    oprot.writeFieldStop()
-
 
1534
    oprot.writeStructEnd()
-
 
1535
 
-
 
1536
  def __repr__(self):
-
 
1537
    L = ['%s=%r' % (key, value)
-
 
1538
      for key, value in self.__dict__.iteritems()]
-
 
1539
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1540
 
-
 
1541
  def __eq__(self, other):
-
 
1542
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1543
 
-
 
1544
  def __ne__(self, other):
-
 
1545
    return not (self == other)
-
 
1546
 
-
 
1547
class deleteUser_result:
-
 
1548
  """
-
 
1549
  Attributes:
-
 
1550
   - success
-
 
1551
   - se
-
 
1552
  """
-
 
1553
 
-
 
1554
  thrift_spec = (
-
 
1555
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
1556
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
-
 
1557
  )
-
 
1558
 
-
 
1559
  def __init__(self, success=None, se=None,):
-
 
1560
    self.success = success
-
 
1561
    self.se = se
-
 
1562
 
-
 
1563
  def read(self, iprot):
-
 
1564
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1565
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1566
      return
-
 
1567
    iprot.readStructBegin()
-
 
1568
    while True:
-
 
1569
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1570
      if ftype == TType.STOP:
-
 
1571
        break
-
 
1572
      if fid == 0:
-
 
1573
        if ftype == TType.BOOL:
-
 
1574
          self.success = iprot.readBool();
-
 
1575
        else:
-
 
1576
          iprot.skip(ftype)
-
 
1577
      elif fid == 1:
-
 
1578
        if ftype == TType.STRUCT:
-
 
1579
          self.se = HelperServiceException()
-
 
1580
          self.se.read(iprot)
-
 
1581
        else:
-
 
1582
          iprot.skip(ftype)
-
 
1583
      else:
-
 
1584
        iprot.skip(ftype)
-
 
1585
      iprot.readFieldEnd()
-
 
1586
    iprot.readStructEnd()
-
 
1587
 
-
 
1588
  def write(self, oprot):
-
 
1589
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1590
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1591
      return
-
 
1592
    oprot.writeStructBegin('deleteUser_result')
-
 
1593
    if self.success != None:
-
 
1594
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
1595
      oprot.writeBool(self.success)
-
 
1596
      oprot.writeFieldEnd()
-
 
1597
    if self.se != None:
-
 
1598
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
-
 
1599
      self.se.write(oprot)
-
 
1600
      oprot.writeFieldEnd()
-
 
1601
    oprot.writeFieldStop()
-
 
1602
    oprot.writeStructEnd()
-
 
1603
 
-
 
1604
  def __repr__(self):
-
 
1605
    L = ['%s=%r' % (key, value)
-
 
1606
      for key, value in self.__dict__.iteritems()]
-
 
1607
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1608
 
-
 
1609
  def __eq__(self, other):
-
 
1610
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1611
 
-
 
1612
  def __ne__(self, other):
-
 
1613
    return not (self == other)
-
 
1614
 
-
 
1615
class authenticateUser_args:
-
 
1616
  """
-
 
1617
  Attributes:
-
 
1618
   - username
-
 
1619
   - password
-
 
1620
  """
-
 
1621
 
-
 
1622
  thrift_spec = (
-
 
1623
    None, # 0
-
 
1624
    (1, TType.STRING, 'username', None, None, ), # 1
-
 
1625
    (2, TType.STRING, 'password', None, None, ), # 2
-
 
1626
  )
-
 
1627
 
-
 
1628
  def __init__(self, username=None, password=None,):
-
 
1629
    self.username = username
-
 
1630
    self.password = password
-
 
1631
 
-
 
1632
  def read(self, iprot):
-
 
1633
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1634
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1635
      return
-
 
1636
    iprot.readStructBegin()
-
 
1637
    while True:
-
 
1638
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1639
      if ftype == TType.STOP:
-
 
1640
        break
-
 
1641
      if fid == 1:
-
 
1642
        if ftype == TType.STRING:
-
 
1643
          self.username = iprot.readString();
-
 
1644
        else:
-
 
1645
          iprot.skip(ftype)
-
 
1646
      elif fid == 2:
-
 
1647
        if ftype == TType.STRING:
-
 
1648
          self.password = iprot.readString();
-
 
1649
        else:
-
 
1650
          iprot.skip(ftype)
-
 
1651
      else:
-
 
1652
        iprot.skip(ftype)
-
 
1653
      iprot.readFieldEnd()
-
 
1654
    iprot.readStructEnd()
-
 
1655
 
-
 
1656
  def write(self, oprot):
-
 
1657
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1658
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1659
      return
-
 
1660
    oprot.writeStructBegin('authenticateUser_args')
-
 
1661
    if self.username != None:
-
 
1662
      oprot.writeFieldBegin('username', TType.STRING, 1)
-
 
1663
      oprot.writeString(self.username)
-
 
1664
      oprot.writeFieldEnd()
-
 
1665
    if self.password != None:
-
 
1666
      oprot.writeFieldBegin('password', TType.STRING, 2)
-
 
1667
      oprot.writeString(self.password)
-
 
1668
      oprot.writeFieldEnd()
-
 
1669
    oprot.writeFieldStop()
-
 
1670
    oprot.writeStructEnd()
-
 
1671
 
-
 
1672
  def __repr__(self):
-
 
1673
    L = ['%s=%r' % (key, value)
-
 
1674
      for key, value in self.__dict__.iteritems()]
-
 
1675
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1676
 
-
 
1677
  def __eq__(self, other):
-
 
1678
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1679
 
-
 
1680
  def __ne__(self, other):
-
 
1681
    return not (self == other)
-
 
1682
 
-
 
1683
class authenticateUser_result:
-
 
1684
  """
-
 
1685
  Attributes:
-
 
1686
   - success
-
 
1687
   - se
-
 
1688
  """
-
 
1689
 
-
 
1690
  thrift_spec = (
-
 
1691
    (0, TType.I64, 'success', None, None, ), # 0
-
 
1692
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
-
 
1693
  )
-
 
1694
 
-
 
1695
  def __init__(self, success=None, se=None,):
-
 
1696
    self.success = success
-
 
1697
    self.se = se
-
 
1698
 
-
 
1699
  def read(self, iprot):
-
 
1700
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1701
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1702
      return
-
 
1703
    iprot.readStructBegin()
-
 
1704
    while True:
-
 
1705
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1706
      if ftype == TType.STOP:
-
 
1707
        break
-
 
1708
      if fid == 0:
-
 
1709
        if ftype == TType.I64:
-
 
1710
          self.success = iprot.readI64();
-
 
1711
        else:
-
 
1712
          iprot.skip(ftype)
-
 
1713
      elif fid == 1:
-
 
1714
        if ftype == TType.STRUCT:
-
 
1715
          self.se = HelperServiceException()
-
 
1716
          self.se.read(iprot)
-
 
1717
        else:
-
 
1718
          iprot.skip(ftype)
-
 
1719
      else:
-
 
1720
        iprot.skip(ftype)
-
 
1721
      iprot.readFieldEnd()
-
 
1722
    iprot.readStructEnd()
-
 
1723
 
-
 
1724
  def write(self, oprot):
-
 
1725
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1726
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1727
      return
-
 
1728
    oprot.writeStructBegin('authenticateUser_result')
-
 
1729
    if self.success != None:
-
 
1730
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
1731
      oprot.writeI64(self.success)
-
 
1732
      oprot.writeFieldEnd()
-
 
1733
    if self.se != None:
-
 
1734
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
-
 
1735
      self.se.write(oprot)
-
 
1736
      oprot.writeFieldEnd()
-
 
1737
    oprot.writeFieldStop()
-
 
1738
    oprot.writeStructEnd()
-
 
1739
 
-
 
1740
  def __repr__(self):
-
 
1741
    L = ['%s=%r' % (key, value)
-
 
1742
      for key, value in self.__dict__.iteritems()]
-
 
1743
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1744
 
-
 
1745
  def __eq__(self, other):
-
 
1746
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1747
 
-
 
1748
  def __ne__(self, other):
-
 
1749
    return not (self == other)
-
 
1750
 
-
 
1751
class updatePassword_args:
-
 
1752
  """
-
 
1753
  Attributes:
-
 
1754
   - username
-
 
1755
   - oldPassword
-
 
1756
   - newPassword
-
 
1757
  """
-
 
1758
 
-
 
1759
  thrift_spec = (
-
 
1760
    None, # 0
-
 
1761
    (1, TType.STRING, 'username', None, None, ), # 1
-
 
1762
    (2, TType.STRING, 'oldPassword', None, None, ), # 2
-
 
1763
    (3, TType.STRING, 'newPassword', None, None, ), # 3
-
 
1764
  )
-
 
1765
 
-
 
1766
  def __init__(self, username=None, oldPassword=None, newPassword=None,):
-
 
1767
    self.username = username
-
 
1768
    self.oldPassword = oldPassword
-
 
1769
    self.newPassword = newPassword
-
 
1770
 
-
 
1771
  def read(self, iprot):
-
 
1772
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1773
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1774
      return
-
 
1775
    iprot.readStructBegin()
-
 
1776
    while True:
-
 
1777
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1778
      if ftype == TType.STOP:
-
 
1779
        break
-
 
1780
      if fid == 1:
-
 
1781
        if ftype == TType.STRING:
-
 
1782
          self.username = iprot.readString();
-
 
1783
        else:
-
 
1784
          iprot.skip(ftype)
-
 
1785
      elif fid == 2:
-
 
1786
        if ftype == TType.STRING:
-
 
1787
          self.oldPassword = iprot.readString();
-
 
1788
        else:
-
 
1789
          iprot.skip(ftype)
-
 
1790
      elif fid == 3:
-
 
1791
        if ftype == TType.STRING:
-
 
1792
          self.newPassword = iprot.readString();
-
 
1793
        else:
-
 
1794
          iprot.skip(ftype)
-
 
1795
      else:
-
 
1796
        iprot.skip(ftype)
-
 
1797
      iprot.readFieldEnd()
-
 
1798
    iprot.readStructEnd()
-
 
1799
 
-
 
1800
  def write(self, oprot):
-
 
1801
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1802
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1803
      return
-
 
1804
    oprot.writeStructBegin('updatePassword_args')
-
 
1805
    if self.username != None:
-
 
1806
      oprot.writeFieldBegin('username', TType.STRING, 1)
-
 
1807
      oprot.writeString(self.username)
-
 
1808
      oprot.writeFieldEnd()
-
 
1809
    if self.oldPassword != None:
-
 
1810
      oprot.writeFieldBegin('oldPassword', TType.STRING, 2)
-
 
1811
      oprot.writeString(self.oldPassword)
-
 
1812
      oprot.writeFieldEnd()
-
 
1813
    if self.newPassword != None:
-
 
1814
      oprot.writeFieldBegin('newPassword', TType.STRING, 3)
-
 
1815
      oprot.writeString(self.newPassword)
-
 
1816
      oprot.writeFieldEnd()
-
 
1817
    oprot.writeFieldStop()
-
 
1818
    oprot.writeStructEnd()
-
 
1819
 
-
 
1820
  def __repr__(self):
-
 
1821
    L = ['%s=%r' % (key, value)
-
 
1822
      for key, value in self.__dict__.iteritems()]
-
 
1823
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1824
 
-
 
1825
  def __eq__(self, other):
-
 
1826
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1827
 
-
 
1828
  def __ne__(self, other):
-
 
1829
    return not (self == other)
-
 
1830
 
-
 
1831
class updatePassword_result:
-
 
1832
  """
-
 
1833
  Attributes:
-
 
1834
   - success
-
 
1835
   - se
-
 
1836
  """
-
 
1837
 
-
 
1838
  thrift_spec = (
-
 
1839
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
1840
    (1, TType.STRUCT, 'se', (HelperServiceException, HelperServiceException.thrift_spec), None, ), # 1
-
 
1841
  )
-
 
1842
 
-
 
1843
  def __init__(self, success=None, se=None,):
-
 
1844
    self.success = success
-
 
1845
    self.se = se
-
 
1846
 
-
 
1847
  def read(self, iprot):
-
 
1848
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1849
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1850
      return
-
 
1851
    iprot.readStructBegin()
-
 
1852
    while True:
-
 
1853
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1854
      if ftype == TType.STOP:
-
 
1855
        break
-
 
1856
      if fid == 0:
-
 
1857
        if ftype == TType.BOOL:
-
 
1858
          self.success = iprot.readBool();
-
 
1859
        else:
-
 
1860
          iprot.skip(ftype)
-
 
1861
      elif fid == 1:
-
 
1862
        if ftype == TType.STRUCT:
-
 
1863
          self.se = HelperServiceException()
-
 
1864
          self.se.read(iprot)
-
 
1865
        else:
-
 
1866
          iprot.skip(ftype)
-
 
1867
      else:
-
 
1868
        iprot.skip(ftype)
-
 
1869
      iprot.readFieldEnd()
-
 
1870
    iprot.readStructEnd()
-
 
1871
 
-
 
1872
  def write(self, oprot):
-
 
1873
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1874
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1875
      return
-
 
1876
    oprot.writeStructBegin('updatePassword_result')
-
 
1877
    if self.success != None:
-
 
1878
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
1879
      oprot.writeBool(self.success)
-
 
1880
      oprot.writeFieldEnd()
-
 
1881
    if self.se != None:
-
 
1882
      oprot.writeFieldBegin('se', TType.STRUCT, 1)
-
 
1883
      self.se.write(oprot)
-
 
1884
      oprot.writeFieldEnd()
1098
    oprot.writeFieldStop()
1885
    oprot.writeFieldStop()
1099
    oprot.writeStructEnd()
1886
    oprot.writeStructEnd()
1100
 
1887
 
1101
  def __repr__(self):
1888
  def __repr__(self):
1102
    L = ['%s=%r' % (key, value)
1889
    L = ['%s=%r' % (key, value)