Subversion Repositories SmartDukaan

Rev

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

Rev 3293 Rev 3376
Line 3... Line 3...
3
#
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
5
#
6
 
6
 
7
from thrift.Thrift import *
7
from thrift.Thrift import *
-
 
8
import shop2020.thriftpy.generic.GenericService
8
from ttypes import *
9
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
from thrift.protocol import TBinaryProtocol
12
try:
13
try:
13
  from thrift.protocol import fastbinary
14
  from thrift.protocol import fastbinary
14
except:
15
except:
15
  fastbinary = None
16
  fastbinary = None
16
 
17
 
17
 
18
 
18
class Iface:
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
19
  """
20
  """
20
  service
21
  service
21
  """
22
  """
22
  def closeSession(self, ):
-
 
23
    """
-
 
24
    For closing the open session in sqlalchemy
-
 
25
    """
-
 
26
    pass
-
 
27
 
-
 
28
  def createAnonymousUser(self, jsessionId):
23
  def createAnonymousUser(self, jsessionId):
29
    """
24
    """
30
    Parameters:
25
    Parameters:
31
     - jsessionId
26
     - jsessionId
32
    """
27
    """
Line 578... Line 573...
578
     - itemId
573
     - itemId
579
    """
574
    """
580
    pass
575
    pass
581
 
576
 
582
 
577
 
583
class Client(Iface):
578
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
584
  """
579
  """
585
  service
580
  service
586
  """
581
  """
587
  def __init__(self, iprot, oprot=None):
582
  def __init__(self, iprot, oprot=None):
588
    self._iprot = self._oprot = iprot
-
 
589
    if oprot != None:
-
 
590
      self._oprot = oprot
-
 
591
    self._seqid = 0
-
 
592
 
-
 
593
  def closeSession(self, ):
-
 
594
    """
-
 
595
    For closing the open session in sqlalchemy
-
 
596
    """
-
 
597
    self.send_closeSession()
-
 
598
    self.recv_closeSession()
-
 
599
 
-
 
600
  def send_closeSession(self, ):
-
 
601
    self._oprot.writeMessageBegin('closeSession', TMessageType.CALL, self._seqid)
583
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
602
    args = closeSession_args()
-
 
603
    args.write(self._oprot)
-
 
604
    self._oprot.writeMessageEnd()
-
 
605
    self._oprot.trans.flush()
-
 
606
 
-
 
607
  def recv_closeSession(self, ):
-
 
608
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
609
    if mtype == TMessageType.EXCEPTION:
-
 
610
      x = TApplicationException()
-
 
611
      x.read(self._iprot)
-
 
612
      self._iprot.readMessageEnd()
-
 
613
      raise x
-
 
614
    result = closeSession_result()
-
 
615
    result.read(self._iprot)
-
 
616
    self._iprot.readMessageEnd()
-
 
617
    return
-
 
618
 
584
 
619
  def createAnonymousUser(self, jsessionId):
585
  def createAnonymousUser(self, jsessionId):
620
    """
586
    """
621
    Parameters:
587
    Parameters:
622
     - jsessionId
588
     - jsessionId
Line 2866... Line 2832...
2866
    result.read(self._iprot)
2832
    result.read(self._iprot)
2867
    self._iprot.readMessageEnd()
2833
    self._iprot.readMessageEnd()
2868
    return
2834
    return
2869
 
2835
 
2870
 
2836
 
2871
class Processor(Iface, TProcessor):
2837
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2872
  def __init__(self, handler):
2838
  def __init__(self, handler):
2873
    self._handler = handler
-
 
2874
    self._processMap = {}
-
 
2875
    self._processMap["closeSession"] = Processor.process_closeSession
2839
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2876
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
2840
    self._processMap["createAnonymousUser"] = Processor.process_createAnonymousUser
2877
    self._processMap["getUserById"] = Processor.process_getUserById
2841
    self._processMap["getUserById"] = Processor.process_getUserById
2878
    self._processMap["getUserByEmail"] = Processor.process_getUserByEmail
2842
    self._processMap["getUserByEmail"] = Processor.process_getUserByEmail
2879
    self._processMap["getUserByMobileNumber"] = Processor.process_getUserByMobileNumber
2843
    self._processMap["getUserByMobileNumber"] = Processor.process_getUserByMobileNumber
2880
    self._processMap["createUser"] = Processor.process_createUser
2844
    self._processMap["createUser"] = Processor.process_createUser
Line 2954... Line 2918...
2954
      return
2918
      return
2955
    else:
2919
    else:
2956
      self._processMap[name](self, seqid, iprot, oprot)
2920
      self._processMap[name](self, seqid, iprot, oprot)
2957
    return True
2921
    return True
2958
 
2922
 
2959
  def process_closeSession(self, seqid, iprot, oprot):
-
 
2960
    args = closeSession_args()
-
 
2961
    args.read(iprot)
-
 
2962
    iprot.readMessageEnd()
-
 
2963
    result = closeSession_result()
-
 
2964
    self._handler.closeSession()
-
 
2965
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
-
 
2966
    result.write(oprot)
-
 
2967
    oprot.writeMessageEnd()
-
 
2968
    oprot.trans.flush()
-
 
2969
 
-
 
2970
  def process_createAnonymousUser(self, seqid, iprot, oprot):
2923
  def process_createAnonymousUser(self, seqid, iprot, oprot):
2971
    args = createAnonymousUser_args()
2924
    args = createAnonymousUser_args()
2972
    args.read(iprot)
2925
    args.read(iprot)
2973
    iprot.readMessageEnd()
2926
    iprot.readMessageEnd()
2974
    result = createAnonymousUser_result()
2927
    result = createAnonymousUser_result()
Line 3888... Line 3841...
3888
    oprot.trans.flush()
3841
    oprot.trans.flush()
3889
 
3842
 
3890
 
3843
 
3891
# HELPER FUNCTIONS AND STRUCTURES
3844
# HELPER FUNCTIONS AND STRUCTURES
3892
 
3845
 
3893
class closeSession_args:
-
 
3894
 
-
 
3895
  thrift_spec = (
-
 
3896
  )
-
 
3897
 
-
 
3898
  def read(self, iprot):
-
 
3899
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3900
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3901
      return
-
 
3902
    iprot.readStructBegin()
-
 
3903
    while True:
-
 
3904
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3905
      if ftype == TType.STOP:
-
 
3906
        break
-
 
3907
      else:
-
 
3908
        iprot.skip(ftype)
-
 
3909
      iprot.readFieldEnd()
-
 
3910
    iprot.readStructEnd()
-
 
3911
 
-
 
3912
  def write(self, oprot):
-
 
3913
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3914
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3915
      return
-
 
3916
    oprot.writeStructBegin('closeSession_args')
-
 
3917
    oprot.writeFieldStop()
-
 
3918
    oprot.writeStructEnd()
-
 
3919
 
-
 
3920
  def __repr__(self):
-
 
3921
    L = ['%s=%r' % (key, value)
-
 
3922
      for key, value in self.__dict__.iteritems()]
-
 
3923
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3924
 
-
 
3925
  def __eq__(self, other):
-
 
3926
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3927
 
-
 
3928
  def __ne__(self, other):
-
 
3929
    return not (self == other)
-
 
3930
 
-
 
3931
class closeSession_result:
-
 
3932
 
-
 
3933
  thrift_spec = (
-
 
3934
  )
-
 
3935
 
-
 
3936
  def read(self, iprot):
-
 
3937
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3938
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3939
      return
-
 
3940
    iprot.readStructBegin()
-
 
3941
    while True:
-
 
3942
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3943
      if ftype == TType.STOP:
-
 
3944
        break
-
 
3945
      else:
-
 
3946
        iprot.skip(ftype)
-
 
3947
      iprot.readFieldEnd()
-
 
3948
    iprot.readStructEnd()
-
 
3949
 
-
 
3950
  def write(self, oprot):
-
 
3951
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3952
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3953
      return
-
 
3954
    oprot.writeStructBegin('closeSession_result')
-
 
3955
    oprot.writeFieldStop()
-
 
3956
    oprot.writeStructEnd()
-
 
3957
 
-
 
3958
  def __repr__(self):
-
 
3959
    L = ['%s=%r' % (key, value)
-
 
3960
      for key, value in self.__dict__.iteritems()]
-
 
3961
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3962
 
-
 
3963
  def __eq__(self, other):
-
 
3964
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3965
 
-
 
3966
  def __ne__(self, other):
-
 
3967
    return not (self == other)
-
 
3968
 
-
 
3969
class createAnonymousUser_args:
3846
class createAnonymousUser_args:
3970
  """
3847
  """
3971
  Attributes:
3848
  Attributes:
3972
   - jsessionId
3849
   - jsessionId
3973
  """
3850
  """