Subversion Repositories SmartDukaan

Rev

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

Rev 581 Rev 594
Line 115... Line 115...
115
     - userid
115
     - userid
116
     - addressId
116
     - addressId
117
    """
117
    """
118
    pass
118
    pass
119
 
119
 
120
  def updatePassword(self, userid, password):
120
  def updatePassword(self, userid, oldPassword, newPassword):
121
    """
121
    """
122
    Parameters:
122
    Parameters:
123
     - userid
123
     - userid
-
 
124
     - oldPassword
124
     - password
125
     - newPassword
125
    """
126
    """
126
    pass
127
    pass
127
 
128
 
128
  def forgotPassword(self, email):
129
  def forgotPassword(self, email):
129
    """
130
    """
130
    Parameters:
131
    Parameters:
131
     - email
132
     - email
132
    """
133
    """
133
    pass
134
    pass
134
 
135
 
-
 
136
  def getAllAddressesForUser(self, userId):
-
 
137
    """
-
 
138
    Parameters:
-
 
139
     - userId
-
 
140
    """
-
 
141
    pass
-
 
142
 
-
 
143
  def getDefaultAddressId(self, userId):
-
 
144
    """
-
 
145
    Parameters:
-
 
146
     - userId
-
 
147
    """
-
 
148
    pass
-
 
149
 
135
  def createCart(self, userId):
150
  def createCart(self, userId):
136
    """
151
    """
137
    Parameters:
152
    Parameters:
138
     - userId
153
     - userId
139
    """
154
    """
Line 802... Line 817...
802
      return result.success
817
      return result.success
803
    if result.ucx != None:
818
    if result.ucx != None:
804
      raise result.ucx
819
      raise result.ucx
805
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
820
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
806
 
821
 
807
  def updatePassword(self, userid, password):
822
  def updatePassword(self, userid, oldPassword, newPassword):
808
    """
823
    """
809
    Parameters:
824
    Parameters:
810
     - userid
825
     - userid
-
 
826
     - oldPassword
811
     - password
827
     - newPassword
812
    """
828
    """
813
    self.send_updatePassword(userid, password)
829
    self.send_updatePassword(userid, oldPassword, newPassword)
814
    return self.recv_updatePassword()
830
    return self.recv_updatePassword()
815
 
831
 
816
  def send_updatePassword(self, userid, password):
832
  def send_updatePassword(self, userid, oldPassword, newPassword):
817
    self._oprot.writeMessageBegin('updatePassword', TMessageType.CALL, self._seqid)
833
    self._oprot.writeMessageBegin('updatePassword', TMessageType.CALL, self._seqid)
818
    args = updatePassword_args()
834
    args = updatePassword_args()
819
    args.userid = userid
835
    args.userid = userid
-
 
836
    args.oldPassword = oldPassword
820
    args.password = password
837
    args.newPassword = newPassword
821
    args.write(self._oprot)
838
    args.write(self._oprot)
822
    self._oprot.writeMessageEnd()
839
    self._oprot.writeMessageEnd()
823
    self._oprot.trans.flush()
840
    self._oprot.trans.flush()
824
 
841
 
825
  def recv_updatePassword(self, ):
842
  def recv_updatePassword(self, ):
Line 868... Line 885...
868
      return result.success
885
      return result.success
869
    if result.ucx != None:
886
    if result.ucx != None:
870
      raise result.ucx
887
      raise result.ucx
871
    raise TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
888
    raise TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
872
 
889
 
-
 
890
  def getAllAddressesForUser(self, userId):
-
 
891
    """
-
 
892
    Parameters:
-
 
893
     - userId
-
 
894
    """
-
 
895
    self.send_getAllAddressesForUser(userId)
-
 
896
    return self.recv_getAllAddressesForUser()
-
 
897
 
-
 
898
  def send_getAllAddressesForUser(self, userId):
-
 
899
    self._oprot.writeMessageBegin('getAllAddressesForUser', TMessageType.CALL, self._seqid)
-
 
900
    args = getAllAddressesForUser_args()
-
 
901
    args.userId = userId
-
 
902
    args.write(self._oprot)
-
 
903
    self._oprot.writeMessageEnd()
-
 
904
    self._oprot.trans.flush()
-
 
905
 
-
 
906
  def recv_getAllAddressesForUser(self, ):
-
 
907
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
908
    if mtype == TMessageType.EXCEPTION:
-
 
909
      x = TApplicationException()
-
 
910
      x.read(self._iprot)
-
 
911
      self._iprot.readMessageEnd()
-
 
912
      raise x
-
 
913
    result = getAllAddressesForUser_result()
-
 
914
    result.read(self._iprot)
-
 
915
    self._iprot.readMessageEnd()
-
 
916
    if result.success != None:
-
 
917
      return result.success
-
 
918
    if result.ucx != None:
-
 
919
      raise result.ucx
-
 
920
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
-
 
921
 
-
 
922
  def getDefaultAddressId(self, userId):
-
 
923
    """
-
 
924
    Parameters:
-
 
925
     - userId
-
 
926
    """
-
 
927
    self.send_getDefaultAddressId(userId)
-
 
928
    return self.recv_getDefaultAddressId()
-
 
929
 
-
 
930
  def send_getDefaultAddressId(self, userId):
-
 
931
    self._oprot.writeMessageBegin('getDefaultAddressId', TMessageType.CALL, self._seqid)
-
 
932
    args = getDefaultAddressId_args()
-
 
933
    args.userId = userId
-
 
934
    args.write(self._oprot)
-
 
935
    self._oprot.writeMessageEnd()
-
 
936
    self._oprot.trans.flush()
-
 
937
 
-
 
938
  def recv_getDefaultAddressId(self, ):
-
 
939
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
940
    if mtype == TMessageType.EXCEPTION:
-
 
941
      x = TApplicationException()
-
 
942
      x.read(self._iprot)
-
 
943
      self._iprot.readMessageEnd()
-
 
944
      raise x
-
 
945
    result = getDefaultAddressId_result()
-
 
946
    result.read(self._iprot)
-
 
947
    self._iprot.readMessageEnd()
-
 
948
    if result.success != None:
-
 
949
      return result.success
-
 
950
    if result.ucx != None:
-
 
951
      raise result.ucx
-
 
952
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
-
 
953
 
873
  def createCart(self, userId):
954
  def createCart(self, userId):
874
    """
955
    """
875
    Parameters:
956
    Parameters:
876
     - userId
957
     - userId
877
    """
958
    """
Line 1836... Line 1917...
1836
    self._processMap["setUserAsLoggedIn"] = Processor.process_setUserAsLoggedIn
1917
    self._processMap["setUserAsLoggedIn"] = Processor.process_setUserAsLoggedIn
1837
    self._processMap["setUserAsLoggedOut"] = Processor.process_setUserAsLoggedOut
1918
    self._processMap["setUserAsLoggedOut"] = Processor.process_setUserAsLoggedOut
1838
    self._processMap["setDefaultAddress"] = Processor.process_setDefaultAddress
1919
    self._processMap["setDefaultAddress"] = Processor.process_setDefaultAddress
1839
    self._processMap["updatePassword"] = Processor.process_updatePassword
1920
    self._processMap["updatePassword"] = Processor.process_updatePassword
1840
    self._processMap["forgotPassword"] = Processor.process_forgotPassword
1921
    self._processMap["forgotPassword"] = Processor.process_forgotPassword
-
 
1922
    self._processMap["getAllAddressesForUser"] = Processor.process_getAllAddressesForUser
-
 
1923
    self._processMap["getDefaultAddressId"] = Processor.process_getDefaultAddressId
1841
    self._processMap["createCart"] = Processor.process_createCart
1924
    self._processMap["createCart"] = Processor.process_createCart
1842
    self._processMap["getCurrentCart"] = Processor.process_getCurrentCart
1925
    self._processMap["getCurrentCart"] = Processor.process_getCurrentCart
1843
    self._processMap["getCart"] = Processor.process_getCart
1926
    self._processMap["getCart"] = Processor.process_getCart
1844
    self._processMap["getCartsForUser"] = Processor.process_getCartsForUser
1927
    self._processMap["getCartsForUser"] = Processor.process_getCartsForUser
1845
    self._processMap["getCartsByStatus"] = Processor.process_getCartsByStatus
1928
    self._processMap["getCartsByStatus"] = Processor.process_getCartsByStatus
Line 2069... Line 2152...
2069
    args = updatePassword_args()
2152
    args = updatePassword_args()
2070
    args.read(iprot)
2153
    args.read(iprot)
2071
    iprot.readMessageEnd()
2154
    iprot.readMessageEnd()
2072
    result = updatePassword_result()
2155
    result = updatePassword_result()
2073
    try:
2156
    try:
2074
      result.success = self._handler.updatePassword(args.userid, args.password)
2157
      result.success = self._handler.updatePassword(args.userid, args.oldPassword, args.newPassword)
2075
    except UserContextException, ucx:
2158
    except UserContextException, ucx:
2076
      result.ucx = ucx
2159
      result.ucx = ucx
2077
    oprot.writeMessageBegin("updatePassword", TMessageType.REPLY, seqid)
2160
    oprot.writeMessageBegin("updatePassword", TMessageType.REPLY, seqid)
2078
    result.write(oprot)
2161
    result.write(oprot)
2079
    oprot.writeMessageEnd()
2162
    oprot.writeMessageEnd()
Line 2091... Line 2174...
2091
    oprot.writeMessageBegin("forgotPassword", TMessageType.REPLY, seqid)
2174
    oprot.writeMessageBegin("forgotPassword", TMessageType.REPLY, seqid)
2092
    result.write(oprot)
2175
    result.write(oprot)
2093
    oprot.writeMessageEnd()
2176
    oprot.writeMessageEnd()
2094
    oprot.trans.flush()
2177
    oprot.trans.flush()
2095
 
2178
 
-
 
2179
  def process_getAllAddressesForUser(self, seqid, iprot, oprot):
-
 
2180
    args = getAllAddressesForUser_args()
-
 
2181
    args.read(iprot)
-
 
2182
    iprot.readMessageEnd()
-
 
2183
    result = getAllAddressesForUser_result()
-
 
2184
    try:
-
 
2185
      result.success = self._handler.getAllAddressesForUser(args.userId)
-
 
2186
    except UserContextException, ucx:
-
 
2187
      result.ucx = ucx
-
 
2188
    oprot.writeMessageBegin("getAllAddressesForUser", TMessageType.REPLY, seqid)
-
 
2189
    result.write(oprot)
-
 
2190
    oprot.writeMessageEnd()
-
 
2191
    oprot.trans.flush()
-
 
2192
 
-
 
2193
  def process_getDefaultAddressId(self, seqid, iprot, oprot):
-
 
2194
    args = getDefaultAddressId_args()
-
 
2195
    args.read(iprot)
-
 
2196
    iprot.readMessageEnd()
-
 
2197
    result = getDefaultAddressId_result()
-
 
2198
    try:
-
 
2199
      result.success = self._handler.getDefaultAddressId(args.userId)
-
 
2200
    except UserContextException, ucx:
-
 
2201
      result.ucx = ucx
-
 
2202
    oprot.writeMessageBegin("getDefaultAddressId", TMessageType.REPLY, seqid)
-
 
2203
    result.write(oprot)
-
 
2204
    oprot.writeMessageEnd()
-
 
2205
    oprot.trans.flush()
-
 
2206
 
2096
  def process_createCart(self, seqid, iprot, oprot):
2207
  def process_createCart(self, seqid, iprot, oprot):
2097
    args = createCart_args()
2208
    args = createCart_args()
2098
    args.read(iprot)
2209
    args.read(iprot)
2099
    iprot.readMessageEnd()
2210
    iprot.readMessageEnd()
2100
    result = createCart_result()
2211
    result = createCart_result()
Line 4200... Line 4311...
4200
 
4311
 
4201
class updatePassword_args:
4312
class updatePassword_args:
4202
  """
4313
  """
4203
  Attributes:
4314
  Attributes:
4204
   - userid
4315
   - userid
-
 
4316
   - oldPassword
4205
   - password
4317
   - newPassword
4206
  """
4318
  """
4207
 
4319
 
4208
  thrift_spec = (
4320
  thrift_spec = (
4209
    None, # 0
4321
    None, # 0
4210
    (1, TType.I64, 'userid', None, None, ), # 1
4322
    (1, TType.I64, 'userid', None, None, ), # 1
4211
    (2, TType.STRING, 'password', None, None, ), # 2
4323
    (2, TType.STRING, 'oldPassword', None, None, ), # 2
-
 
4324
    (3, TType.STRING, 'newPassword', None, None, ), # 3
4212
  )
4325
  )
4213
 
4326
 
4214
  def __init__(self, userid=None, password=None,):
4327
  def __init__(self, userid=None, oldPassword=None, newPassword=None,):
4215
    self.userid = userid
4328
    self.userid = userid
-
 
4329
    self.oldPassword = oldPassword
4216
    self.password = password
4330
    self.newPassword = newPassword
4217
 
4331
 
4218
  def read(self, iprot):
4332
  def read(self, iprot):
4219
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4333
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4220
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4334
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4221
      return
4335
      return
Line 4229... Line 4343...
4229
          self.userid = iprot.readI64();
4343
          self.userid = iprot.readI64();
4230
        else:
4344
        else:
4231
          iprot.skip(ftype)
4345
          iprot.skip(ftype)
4232
      elif fid == 2:
4346
      elif fid == 2:
4233
        if ftype == TType.STRING:
4347
        if ftype == TType.STRING:
4234
          self.password = iprot.readString();
4348
          self.oldPassword = iprot.readString();
-
 
4349
        else:
-
 
4350
          iprot.skip(ftype)
-
 
4351
      elif fid == 3:
-
 
4352
        if ftype == TType.STRING:
-
 
4353
          self.newPassword = iprot.readString();
4235
        else:
4354
        else:
4236
          iprot.skip(ftype)
4355
          iprot.skip(ftype)
4237
      else:
4356
      else:
4238
        iprot.skip(ftype)
4357
        iprot.skip(ftype)
4239
      iprot.readFieldEnd()
4358
      iprot.readFieldEnd()
Line 4246... Line 4365...
4246
    oprot.writeStructBegin('updatePassword_args')
4365
    oprot.writeStructBegin('updatePassword_args')
4247
    if self.userid != None:
4366
    if self.userid != None:
4248
      oprot.writeFieldBegin('userid', TType.I64, 1)
4367
      oprot.writeFieldBegin('userid', TType.I64, 1)
4249
      oprot.writeI64(self.userid)
4368
      oprot.writeI64(self.userid)
4250
      oprot.writeFieldEnd()
4369
      oprot.writeFieldEnd()
4251
    if self.password != None:
4370
    if self.oldPassword != None:
4252
      oprot.writeFieldBegin('password', TType.STRING, 2)
4371
      oprot.writeFieldBegin('oldPassword', TType.STRING, 2)
-
 
4372
      oprot.writeString(self.oldPassword)
-
 
4373
      oprot.writeFieldEnd()
-
 
4374
    if self.newPassword != None:
-
 
4375
      oprot.writeFieldBegin('newPassword', TType.STRING, 3)
4253
      oprot.writeString(self.password)
4376
      oprot.writeString(self.newPassword)
4254
      oprot.writeFieldEnd()
4377
      oprot.writeFieldEnd()
4255
    oprot.writeFieldStop()
4378
    oprot.writeFieldStop()
4256
    oprot.writeStructEnd()
4379
    oprot.writeStructEnd()
4257
 
4380
 
4258
  def __repr__(self):
4381
  def __repr__(self):
Line 4456... Line 4579...
4456
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4579
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4457
 
4580
 
4458
  def __ne__(self, other):
4581
  def __ne__(self, other):
4459
    return not (self == other)
4582
    return not (self == other)
4460
 
4583
 
-
 
4584
class getAllAddressesForUser_args:
-
 
4585
  """
-
 
4586
  Attributes:
-
 
4587
   - userId
-
 
4588
  """
-
 
4589
 
-
 
4590
  thrift_spec = (
-
 
4591
    None, # 0
-
 
4592
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
4593
  )
-
 
4594
 
-
 
4595
  def __init__(self, userId=None,):
-
 
4596
    self.userId = userId
-
 
4597
 
-
 
4598
  def read(self, iprot):
-
 
4599
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4600
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4601
      return
-
 
4602
    iprot.readStructBegin()
-
 
4603
    while True:
-
 
4604
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4605
      if ftype == TType.STOP:
-
 
4606
        break
-
 
4607
      if fid == 1:
-
 
4608
        if ftype == TType.I64:
-
 
4609
          self.userId = iprot.readI64();
-
 
4610
        else:
-
 
4611
          iprot.skip(ftype)
-
 
4612
      else:
-
 
4613
        iprot.skip(ftype)
-
 
4614
      iprot.readFieldEnd()
-
 
4615
    iprot.readStructEnd()
-
 
4616
 
-
 
4617
  def write(self, oprot):
-
 
4618
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4619
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4620
      return
-
 
4621
    oprot.writeStructBegin('getAllAddressesForUser_args')
-
 
4622
    if self.userId != None:
-
 
4623
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
4624
      oprot.writeI64(self.userId)
-
 
4625
      oprot.writeFieldEnd()
-
 
4626
    oprot.writeFieldStop()
-
 
4627
    oprot.writeStructEnd()
-
 
4628
 
-
 
4629
  def __repr__(self):
-
 
4630
    L = ['%s=%r' % (key, value)
-
 
4631
      for key, value in self.__dict__.iteritems()]
-
 
4632
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4633
 
-
 
4634
  def __eq__(self, other):
-
 
4635
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4636
 
-
 
4637
  def __ne__(self, other):
-
 
4638
    return not (self == other)
-
 
4639
 
-
 
4640
class getAllAddressesForUser_result:
-
 
4641
  """
-
 
4642
  Attributes:
-
 
4643
   - success
-
 
4644
   - ucx
-
 
4645
  """
-
 
4646
 
-
 
4647
  thrift_spec = (
-
 
4648
    (0, TType.LIST, 'success', (TType.STRUCT,(Address, Address.thrift_spec)), None, ), # 0
-
 
4649
    (1, TType.STRUCT, 'ucx', (UserContextException, UserContextException.thrift_spec), None, ), # 1
-
 
4650
  )
-
 
4651
 
-
 
4652
  def __init__(self, success=None, ucx=None,):
-
 
4653
    self.success = success
-
 
4654
    self.ucx = ucx
-
 
4655
 
-
 
4656
  def read(self, iprot):
-
 
4657
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4658
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4659
      return
-
 
4660
    iprot.readStructBegin()
-
 
4661
    while True:
-
 
4662
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4663
      if ftype == TType.STOP:
-
 
4664
        break
-
 
4665
      if fid == 0:
-
 
4666
        if ftype == TType.LIST:
-
 
4667
          self.success = []
-
 
4668
          (_etype40, _size37) = iprot.readListBegin()
-
 
4669
          for _i41 in xrange(_size37):
-
 
4670
            _elem42 = Address()
-
 
4671
            _elem42.read(iprot)
-
 
4672
            self.success.append(_elem42)
-
 
4673
          iprot.readListEnd()
-
 
4674
        else:
-
 
4675
          iprot.skip(ftype)
-
 
4676
      elif fid == 1:
-
 
4677
        if ftype == TType.STRUCT:
-
 
4678
          self.ucx = UserContextException()
-
 
4679
          self.ucx.read(iprot)
-
 
4680
        else:
-
 
4681
          iprot.skip(ftype)
-
 
4682
      else:
-
 
4683
        iprot.skip(ftype)
-
 
4684
      iprot.readFieldEnd()
-
 
4685
    iprot.readStructEnd()
-
 
4686
 
-
 
4687
  def write(self, oprot):
-
 
4688
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4689
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4690
      return
-
 
4691
    oprot.writeStructBegin('getAllAddressesForUser_result')
-
 
4692
    if self.success != None:
-
 
4693
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
4694
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
4695
      for iter43 in self.success:
-
 
4696
        iter43.write(oprot)
-
 
4697
      oprot.writeListEnd()
-
 
4698
      oprot.writeFieldEnd()
-
 
4699
    if self.ucx != None:
-
 
4700
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
-
 
4701
      self.ucx.write(oprot)
-
 
4702
      oprot.writeFieldEnd()
-
 
4703
    oprot.writeFieldStop()
-
 
4704
    oprot.writeStructEnd()
-
 
4705
 
-
 
4706
  def __repr__(self):
-
 
4707
    L = ['%s=%r' % (key, value)
-
 
4708
      for key, value in self.__dict__.iteritems()]
-
 
4709
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4710
 
-
 
4711
  def __eq__(self, other):
-
 
4712
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4713
 
-
 
4714
  def __ne__(self, other):
-
 
4715
    return not (self == other)
-
 
4716
 
-
 
4717
class getDefaultAddressId_args:
-
 
4718
  """
-
 
4719
  Attributes:
-
 
4720
   - userId
-
 
4721
  """
-
 
4722
 
-
 
4723
  thrift_spec = (
-
 
4724
    None, # 0
-
 
4725
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
4726
  )
-
 
4727
 
-
 
4728
  def __init__(self, userId=None,):
-
 
4729
    self.userId = userId
-
 
4730
 
-
 
4731
  def read(self, iprot):
-
 
4732
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4733
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4734
      return
-
 
4735
    iprot.readStructBegin()
-
 
4736
    while True:
-
 
4737
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4738
      if ftype == TType.STOP:
-
 
4739
        break
-
 
4740
      if fid == 1:
-
 
4741
        if ftype == TType.I64:
-
 
4742
          self.userId = iprot.readI64();
-
 
4743
        else:
-
 
4744
          iprot.skip(ftype)
-
 
4745
      else:
-
 
4746
        iprot.skip(ftype)
-
 
4747
      iprot.readFieldEnd()
-
 
4748
    iprot.readStructEnd()
-
 
4749
 
-
 
4750
  def write(self, oprot):
-
 
4751
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4752
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4753
      return
-
 
4754
    oprot.writeStructBegin('getDefaultAddressId_args')
-
 
4755
    if self.userId != None:
-
 
4756
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
4757
      oprot.writeI64(self.userId)
-
 
4758
      oprot.writeFieldEnd()
-
 
4759
    oprot.writeFieldStop()
-
 
4760
    oprot.writeStructEnd()
-
 
4761
 
-
 
4762
  def __repr__(self):
-
 
4763
    L = ['%s=%r' % (key, value)
-
 
4764
      for key, value in self.__dict__.iteritems()]
-
 
4765
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4766
 
-
 
4767
  def __eq__(self, other):
-
 
4768
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4769
 
-
 
4770
  def __ne__(self, other):
-
 
4771
    return not (self == other)
-
 
4772
 
-
 
4773
class getDefaultAddressId_result:
-
 
4774
  """
-
 
4775
  Attributes:
-
 
4776
   - success
-
 
4777
   - ucx
-
 
4778
  """
-
 
4779
 
-
 
4780
  thrift_spec = (
-
 
4781
    (0, TType.I64, 'success', None, None, ), # 0
-
 
4782
    (1, TType.STRUCT, 'ucx', (UserContextException, UserContextException.thrift_spec), None, ), # 1
-
 
4783
  )
-
 
4784
 
-
 
4785
  def __init__(self, success=None, ucx=None,):
-
 
4786
    self.success = success
-
 
4787
    self.ucx = ucx
-
 
4788
 
-
 
4789
  def read(self, iprot):
-
 
4790
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
4791
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
4792
      return
-
 
4793
    iprot.readStructBegin()
-
 
4794
    while True:
-
 
4795
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
4796
      if ftype == TType.STOP:
-
 
4797
        break
-
 
4798
      if fid == 0:
-
 
4799
        if ftype == TType.I64:
-
 
4800
          self.success = iprot.readI64();
-
 
4801
        else:
-
 
4802
          iprot.skip(ftype)
-
 
4803
      elif fid == 1:
-
 
4804
        if ftype == TType.STRUCT:
-
 
4805
          self.ucx = UserContextException()
-
 
4806
          self.ucx.read(iprot)
-
 
4807
        else:
-
 
4808
          iprot.skip(ftype)
-
 
4809
      else:
-
 
4810
        iprot.skip(ftype)
-
 
4811
      iprot.readFieldEnd()
-
 
4812
    iprot.readStructEnd()
-
 
4813
 
-
 
4814
  def write(self, oprot):
-
 
4815
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
4816
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
4817
      return
-
 
4818
    oprot.writeStructBegin('getDefaultAddressId_result')
-
 
4819
    if self.success != None:
-
 
4820
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
4821
      oprot.writeI64(self.success)
-
 
4822
      oprot.writeFieldEnd()
-
 
4823
    if self.ucx != None:
-
 
4824
      oprot.writeFieldBegin('ucx', TType.STRUCT, 1)
-
 
4825
      self.ucx.write(oprot)
-
 
4826
      oprot.writeFieldEnd()
-
 
4827
    oprot.writeFieldStop()
-
 
4828
    oprot.writeStructEnd()
-
 
4829
 
-
 
4830
  def __repr__(self):
-
 
4831
    L = ['%s=%r' % (key, value)
-
 
4832
      for key, value in self.__dict__.iteritems()]
-
 
4833
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
4834
 
-
 
4835
  def __eq__(self, other):
-
 
4836
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
4837
 
-
 
4838
  def __ne__(self, other):
-
 
4839
    return not (self == other)
-
 
4840
 
4461
class createCart_args:
4841
class createCart_args:
4462
  """
4842
  """
4463
  Attributes:
4843
  Attributes:
4464
   - userId
4844
   - userId
4465
  """
4845
  """
Line 4926... Line 5306...
4926
      if ftype == TType.STOP:
5306
      if ftype == TType.STOP:
4927
        break
5307
        break
4928
      if fid == 0:
5308
      if fid == 0:
4929
        if ftype == TType.LIST:
5309
        if ftype == TType.LIST:
4930
          self.success = []
5310
          self.success = []
4931
          (_etype40, _size37) = iprot.readListBegin()
5311
          (_etype47, _size44) = iprot.readListBegin()
4932
          for _i41 in xrange(_size37):
5312
          for _i48 in xrange(_size44):
4933
            _elem42 = Cart()
5313
            _elem49 = Cart()
4934
            _elem42.read(iprot)
5314
            _elem49.read(iprot)
4935
            self.success.append(_elem42)
5315
            self.success.append(_elem49)
4936
          iprot.readListEnd()
5316
          iprot.readListEnd()
4937
        else:
5317
        else:
4938
          iprot.skip(ftype)
5318
          iprot.skip(ftype)
4939
      elif fid == 1:
5319
      elif fid == 1:
4940
        if ftype == TType.STRUCT:
5320
        if ftype == TType.STRUCT:
Line 4953... Line 5333...
4953
      return
5333
      return
4954
    oprot.writeStructBegin('getCartsForUser_result')
5334
    oprot.writeStructBegin('getCartsForUser_result')
4955
    if self.success != None:
5335
    if self.success != None:
4956
      oprot.writeFieldBegin('success', TType.LIST, 0)
5336
      oprot.writeFieldBegin('success', TType.LIST, 0)
4957
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5337
      oprot.writeListBegin(TType.STRUCT, len(self.success))
4958
      for iter43 in self.success:
5338
      for iter50 in self.success:
4959
        iter43.write(oprot)
5339
        iter50.write(oprot)
4960
      oprot.writeListEnd()
5340
      oprot.writeListEnd()
4961
      oprot.writeFieldEnd()
5341
      oprot.writeFieldEnd()
4962
    if self.scx != None:
5342
    if self.scx != None:
4963
      oprot.writeFieldBegin('scx', TType.STRUCT, 1)
5343
      oprot.writeFieldBegin('scx', TType.STRUCT, 1)
4964
      self.scx.write(oprot)
5344
      self.scx.write(oprot)
Line 5059... Line 5439...
5059
      if ftype == TType.STOP:
5439
      if ftype == TType.STOP:
5060
        break
5440
        break
5061
      if fid == 0:
5441
      if fid == 0:
5062
        if ftype == TType.LIST:
5442
        if ftype == TType.LIST:
5063
          self.success = []
5443
          self.success = []
5064
          (_etype47, _size44) = iprot.readListBegin()
5444
          (_etype54, _size51) = iprot.readListBegin()
5065
          for _i48 in xrange(_size44):
5445
          for _i55 in xrange(_size51):
5066
            _elem49 = Cart()
5446
            _elem56 = Cart()
5067
            _elem49.read(iprot)
5447
            _elem56.read(iprot)
5068
            self.success.append(_elem49)
5448
            self.success.append(_elem56)
5069
          iprot.readListEnd()
5449
          iprot.readListEnd()
5070
        else:
5450
        else:
5071
          iprot.skip(ftype)
5451
          iprot.skip(ftype)
5072
      elif fid == 1:
5452
      elif fid == 1:
5073
        if ftype == TType.STRUCT:
5453
        if ftype == TType.STRUCT:
Line 5086... Line 5466...
5086
      return
5466
      return
5087
    oprot.writeStructBegin('getCartsByStatus_result')
5467
    oprot.writeStructBegin('getCartsByStatus_result')
5088
    if self.success != None:
5468
    if self.success != None:
5089
      oprot.writeFieldBegin('success', TType.LIST, 0)
5469
      oprot.writeFieldBegin('success', TType.LIST, 0)
5090
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5470
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5091
      for iter50 in self.success:
5471
      for iter57 in self.success:
5092
        iter50.write(oprot)
5472
        iter57.write(oprot)
5093
      oprot.writeListEnd()
5473
      oprot.writeListEnd()
5094
      oprot.writeFieldEnd()
5474
      oprot.writeFieldEnd()
5095
    if self.scx != None:
5475
    if self.scx != None:
5096
      oprot.writeFieldBegin('scx', TType.STRUCT, 1)
5476
      oprot.writeFieldBegin('scx', TType.STRUCT, 1)
5097
      self.scx.write(oprot)
5477
      self.scx.write(oprot)
Line 5216... Line 5596...
5216
      if ftype == TType.STOP:
5596
      if ftype == TType.STOP:
5217
        break
5597
        break
5218
      if fid == 0:
5598
      if fid == 0:
5219
        if ftype == TType.LIST:
5599
        if ftype == TType.LIST:
5220
          self.success = []
5600
          self.success = []
5221
          (_etype54, _size51) = iprot.readListBegin()
5601
          (_etype61, _size58) = iprot.readListBegin()
5222
          for _i55 in xrange(_size51):
5602
          for _i62 in xrange(_size58):
5223
            _elem56 = Cart()
5603
            _elem63 = Cart()
5224
            _elem56.read(iprot)
5604
            _elem63.read(iprot)
5225
            self.success.append(_elem56)
5605
            self.success.append(_elem63)
5226
          iprot.readListEnd()
5606
          iprot.readListEnd()
5227
        else:
5607
        else:
5228
          iprot.skip(ftype)
5608
          iprot.skip(ftype)
5229
      elif fid == 1:
5609
      elif fid == 1:
5230
        if ftype == TType.STRUCT:
5610
        if ftype == TType.STRUCT:
Line 5243... Line 5623...
5243
      return
5623
      return
5244
    oprot.writeStructBegin('getCartsByTime_result')
5624
    oprot.writeStructBegin('getCartsByTime_result')
5245
    if self.success != None:
5625
    if self.success != None:
5246
      oprot.writeFieldBegin('success', TType.LIST, 0)
5626
      oprot.writeFieldBegin('success', TType.LIST, 0)
5247
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5627
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5248
      for iter57 in self.success:
5628
      for iter64 in self.success:
5249
        iter57.write(oprot)
5629
        iter64.write(oprot)
5250
      oprot.writeListEnd()
5630
      oprot.writeListEnd()
5251
      oprot.writeFieldEnd()
5631
      oprot.writeFieldEnd()
5252
    if self.scx != None:
5632
    if self.scx != None:
5253
      oprot.writeFieldBegin('scx', TType.STRUCT, 1)
5633
      oprot.writeFieldBegin('scx', TType.STRUCT, 1)
5254
      self.scx.write(oprot)
5634
      self.scx.write(oprot)
Line 6677... Line 7057...
6677
        else:
7057
        else:
6678
          iprot.skip(ftype)
7058
          iprot.skip(ftype)
6679
      elif fid == 2:
7059
      elif fid == 2:
6680
        if ftype == TType.LIST:
7060
        if ftype == TType.LIST:
6681
          self.items = []
7061
          self.items = []
6682
          (_etype61, _size58) = iprot.readListBegin()
7062
          (_etype68, _size65) = iprot.readListBegin()
6683
          for _i62 in xrange(_size58):
7063
          for _i69 in xrange(_size65):
6684
            _elem63 = iprot.readI64();
7064
            _elem70 = iprot.readI64();
6685
            self.items.append(_elem63)
7065
            self.items.append(_elem70)
6686
          iprot.readListEnd()
7066
          iprot.readListEnd()
6687
        else:
7067
        else:
6688
          iprot.skip(ftype)
7068
          iprot.skip(ftype)
6689
      else:
7069
      else:
6690
        iprot.skip(ftype)
7070
        iprot.skip(ftype)
Line 6701... Line 7081...
6701
      oprot.writeI64(self.widget_id)
7081
      oprot.writeI64(self.widget_id)
6702
      oprot.writeFieldEnd()
7082
      oprot.writeFieldEnd()
6703
    if self.items != None:
7083
    if self.items != None:
6704
      oprot.writeFieldBegin('items', TType.LIST, 2)
7084
      oprot.writeFieldBegin('items', TType.LIST, 2)
6705
      oprot.writeListBegin(TType.I64, len(self.items))
7085
      oprot.writeListBegin(TType.I64, len(self.items))
6706
      for iter64 in self.items:
7086
      for iter71 in self.items:
6707
        oprot.writeI64(iter64)
7087
        oprot.writeI64(iter71)
6708
      oprot.writeListEnd()
7088
      oprot.writeListEnd()
6709
      oprot.writeFieldEnd()
7089
      oprot.writeFieldEnd()
6710
    oprot.writeFieldStop()
7090
    oprot.writeFieldStop()
6711
    oprot.writeStructEnd()
7091
    oprot.writeStructEnd()
6712
 
7092