Subversion Repositories SmartDukaan

Rev

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

Rev 11592 Rev 11635
Line 1169... Line 1169...
1169
    Parameters:
1169
    Parameters:
1170
     - privateDeal
1170
     - privateDeal
1171
    """
1171
    """
1172
    pass
1172
    pass
1173
 
1173
 
-
 
1174
  def getPrivateDealsCatalogIds(self, beginIndex, totalItems):
-
 
1175
    """
-
 
1176
    Parameters:
-
 
1177
     - beginIndex
-
 
1178
     - totalItems
-
 
1179
    """
-
 
1180
    pass
-
 
1181
 
1174
 
1182
 
1175
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1183
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1176
  def __init__(self, iprot, oprot=None):
1184
  def __init__(self, iprot, oprot=None):
1177
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1185
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1178
 
1186
 
Line 6167... Line 6175...
6167
    self._iprot.readMessageEnd()
6175
    self._iprot.readMessageEnd()
6168
    if result.success is not None:
6176
    if result.success is not None:
6169
      return result.success
6177
      return result.success
6170
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addOrUpdatePrivateDeal failed: unknown result");
6178
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addOrUpdatePrivateDeal failed: unknown result");
6171
 
6179
 
-
 
6180
  def getPrivateDealsCatalogIds(self, beginIndex, totalItems):
-
 
6181
    """
-
 
6182
    Parameters:
-
 
6183
     - beginIndex
-
 
6184
     - totalItems
-
 
6185
    """
-
 
6186
    self.send_getPrivateDealsCatalogIds(beginIndex, totalItems)
-
 
6187
    return self.recv_getPrivateDealsCatalogIds()
-
 
6188
 
-
 
6189
  def send_getPrivateDealsCatalogIds(self, beginIndex, totalItems):
-
 
6190
    self._oprot.writeMessageBegin('getPrivateDealsCatalogIds', TMessageType.CALL, self._seqid)
-
 
6191
    args = getPrivateDealsCatalogIds_args()
-
 
6192
    args.beginIndex = beginIndex
-
 
6193
    args.totalItems = totalItems
-
 
6194
    args.write(self._oprot)
-
 
6195
    self._oprot.writeMessageEnd()
-
 
6196
    self._oprot.trans.flush()
-
 
6197
 
-
 
6198
  def recv_getPrivateDealsCatalogIds(self, ):
-
 
6199
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6200
    if mtype == TMessageType.EXCEPTION:
-
 
6201
      x = TApplicationException()
-
 
6202
      x.read(self._iprot)
-
 
6203
      self._iprot.readMessageEnd()
-
 
6204
      raise x
-
 
6205
    result = getPrivateDealsCatalogIds_result()
-
 
6206
    result.read(self._iprot)
-
 
6207
    self._iprot.readMessageEnd()
-
 
6208
    if result.success is not None:
-
 
6209
      return result.success
-
 
6210
    if result.cex is not None:
-
 
6211
      raise result.cex
-
 
6212
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPrivateDealsCatalogIds failed: unknown result");
-
 
6213
 
6172
 
6214
 
6173
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6215
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6174
  def __init__(self, handler):
6216
  def __init__(self, handler):
6175
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6217
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6176
    self._processMap["addItem"] = Processor.process_addItem
6218
    self._processMap["addItem"] = Processor.process_addItem
Line 6334... Line 6376...
6334
    self._processMap["getMarketplaceHistoryByDate"] = Processor.process_getMarketplaceHistoryByDate
6376
    self._processMap["getMarketplaceHistoryByDate"] = Processor.process_getMarketplaceHistoryByDate
6335
    self._processMap["getPrivateDealDetails"] = Processor.process_getPrivateDealDetails
6377
    self._processMap["getPrivateDealDetails"] = Processor.process_getPrivateDealDetails
6336
    self._processMap["getPrivateDealItems"] = Processor.process_getPrivateDealItems
6378
    self._processMap["getPrivateDealItems"] = Processor.process_getPrivateDealItems
6337
    self._processMap["getAllActivePrivateDeals"] = Processor.process_getAllActivePrivateDeals
6379
    self._processMap["getAllActivePrivateDeals"] = Processor.process_getAllActivePrivateDeals
6338
    self._processMap["addOrUpdatePrivateDeal"] = Processor.process_addOrUpdatePrivateDeal
6380
    self._processMap["addOrUpdatePrivateDeal"] = Processor.process_addOrUpdatePrivateDeal
-
 
6381
    self._processMap["getPrivateDealsCatalogIds"] = Processor.process_getPrivateDealsCatalogIds
6339
 
6382
 
6340
  def process(self, iprot, oprot):
6383
  def process(self, iprot, oprot):
6341
    (name, type, seqid) = iprot.readMessageBegin()
6384
    (name, type, seqid) = iprot.readMessageBegin()
6342
    if name not in self._processMap:
6385
    if name not in self._processMap:
6343
      iprot.skip(TType.STRUCT)
6386
      iprot.skip(TType.STRUCT)
Line 8272... Line 8315...
8272
    oprot.writeMessageBegin("addOrUpdatePrivateDeal", TMessageType.REPLY, seqid)
8315
    oprot.writeMessageBegin("addOrUpdatePrivateDeal", TMessageType.REPLY, seqid)
8273
    result.write(oprot)
8316
    result.write(oprot)
8274
    oprot.writeMessageEnd()
8317
    oprot.writeMessageEnd()
8275
    oprot.trans.flush()
8318
    oprot.trans.flush()
8276
 
8319
 
-
 
8320
  def process_getPrivateDealsCatalogIds(self, seqid, iprot, oprot):
-
 
8321
    args = getPrivateDealsCatalogIds_args()
-
 
8322
    args.read(iprot)
-
 
8323
    iprot.readMessageEnd()
-
 
8324
    result = getPrivateDealsCatalogIds_result()
-
 
8325
    try:
-
 
8326
      result.success = self._handler.getPrivateDealsCatalogIds(args.beginIndex, args.totalItems)
-
 
8327
    except CatalogServiceException, cex:
-
 
8328
      result.cex = cex
-
 
8329
    oprot.writeMessageBegin("getPrivateDealsCatalogIds", TMessageType.REPLY, seqid)
-
 
8330
    result.write(oprot)
-
 
8331
    oprot.writeMessageEnd()
-
 
8332
    oprot.trans.flush()
-
 
8333
 
8277
 
8334
 
8278
# HELPER FUNCTIONS AND STRUCTURES
8335
# HELPER FUNCTIONS AND STRUCTURES
8279
 
8336
 
8280
class addItem_args:
8337
class addItem_args:
8281
  """
8338
  """
Line 29008... Line 29065...
29008
      oprot.writeFieldEnd()
29065
      oprot.writeFieldEnd()
29009
    oprot.writeFieldStop()
29066
    oprot.writeFieldStop()
29010
    oprot.writeStructEnd()
29067
    oprot.writeStructEnd()
29011
 
29068
 
29012
  def validate(self):
29069
  def validate(self):
-
 
29070
    return
-
 
29071
 
-
 
29072
 
-
 
29073
  def __repr__(self):
-
 
29074
    L = ['%s=%r' % (key, value)
-
 
29075
      for key, value in self.__dict__.iteritems()]
-
 
29076
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29077
 
-
 
29078
  def __eq__(self, other):
-
 
29079
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29080
 
-
 
29081
  def __ne__(self, other):
-
 
29082
    return not (self == other)
-
 
29083
 
-
 
29084
class getPrivateDealsCatalogIds_args:
-
 
29085
  """
-
 
29086
  Attributes:
-
 
29087
   - beginIndex
-
 
29088
   - totalItems
-
 
29089
  """
-
 
29090
 
-
 
29091
  thrift_spec = (
-
 
29092
    None, # 0
-
 
29093
    (1, TType.I64, 'beginIndex', None, None, ), # 1
-
 
29094
    (2, TType.I64, 'totalItems', None, None, ), # 2
-
 
29095
  )
-
 
29096
 
-
 
29097
  def __init__(self, beginIndex=None, totalItems=None,):
-
 
29098
    self.beginIndex = beginIndex
-
 
29099
    self.totalItems = totalItems
-
 
29100
 
-
 
29101
  def read(self, iprot):
-
 
29102
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29103
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29104
      return
-
 
29105
    iprot.readStructBegin()
-
 
29106
    while True:
-
 
29107
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29108
      if ftype == TType.STOP:
-
 
29109
        break
-
 
29110
      if fid == 1:
-
 
29111
        if ftype == TType.I64:
-
 
29112
          self.beginIndex = iprot.readI64();
-
 
29113
        else:
-
 
29114
          iprot.skip(ftype)
-
 
29115
      elif fid == 2:
-
 
29116
        if ftype == TType.I64:
-
 
29117
          self.totalItems = iprot.readI64();
-
 
29118
        else:
-
 
29119
          iprot.skip(ftype)
-
 
29120
      else:
-
 
29121
        iprot.skip(ftype)
-
 
29122
      iprot.readFieldEnd()
-
 
29123
    iprot.readStructEnd()
-
 
29124
 
-
 
29125
  def write(self, oprot):
-
 
29126
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29127
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29128
      return
-
 
29129
    oprot.writeStructBegin('getPrivateDealsCatalogIds_args')
-
 
29130
    if self.beginIndex is not None:
-
 
29131
      oprot.writeFieldBegin('beginIndex', TType.I64, 1)
-
 
29132
      oprot.writeI64(self.beginIndex)
-
 
29133
      oprot.writeFieldEnd()
-
 
29134
    if self.totalItems is not None:
-
 
29135
      oprot.writeFieldBegin('totalItems', TType.I64, 2)
-
 
29136
      oprot.writeI64(self.totalItems)
-
 
29137
      oprot.writeFieldEnd()
-
 
29138
    oprot.writeFieldStop()
-
 
29139
    oprot.writeStructEnd()
-
 
29140
 
-
 
29141
  def validate(self):
-
 
29142
    return
-
 
29143
 
-
 
29144
 
-
 
29145
  def __repr__(self):
-
 
29146
    L = ['%s=%r' % (key, value)
-
 
29147
      for key, value in self.__dict__.iteritems()]
-
 
29148
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29149
 
-
 
29150
  def __eq__(self, other):
-
 
29151
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29152
 
-
 
29153
  def __ne__(self, other):
-
 
29154
    return not (self == other)
-
 
29155
 
-
 
29156
class getPrivateDealsCatalogIds_result:
-
 
29157
  """
-
 
29158
  Attributes:
-
 
29159
   - success
-
 
29160
   - cex
-
 
29161
  """
-
 
29162
 
-
 
29163
  thrift_spec = (
-
 
29164
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
-
 
29165
    (1, TType.STRUCT, 'cex', (CatalogServiceException, CatalogServiceException.thrift_spec), None, ), # 1
-
 
29166
  )
-
 
29167
 
-
 
29168
  def __init__(self, success=None, cex=None,):
-
 
29169
    self.success = success
-
 
29170
    self.cex = cex
-
 
29171
 
-
 
29172
  def read(self, iprot):
-
 
29173
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29174
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29175
      return
-
 
29176
    iprot.readStructBegin()
-
 
29177
    while True:
-
 
29178
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29179
      if ftype == TType.STOP:
-
 
29180
        break
-
 
29181
      if fid == 0:
-
 
29182
        if ftype == TType.LIST:
-
 
29183
          self.success = []
-
 
29184
          (_etype667, _size664) = iprot.readListBegin()
-
 
29185
          for _i668 in xrange(_size664):
-
 
29186
            _elem669 = iprot.readI64();
-
 
29187
            self.success.append(_elem669)
-
 
29188
          iprot.readListEnd()
-
 
29189
        else:
-
 
29190
          iprot.skip(ftype)
-
 
29191
      elif fid == 1:
-
 
29192
        if ftype == TType.STRUCT:
-
 
29193
          self.cex = CatalogServiceException()
-
 
29194
          self.cex.read(iprot)
-
 
29195
        else:
-
 
29196
          iprot.skip(ftype)
-
 
29197
      else:
-
 
29198
        iprot.skip(ftype)
-
 
29199
      iprot.readFieldEnd()
-
 
29200
    iprot.readStructEnd()
-
 
29201
 
-
 
29202
  def write(self, oprot):
-
 
29203
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29204
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29205
      return
-
 
29206
    oprot.writeStructBegin('getPrivateDealsCatalogIds_result')
-
 
29207
    if self.success is not None:
-
 
29208
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
29209
      oprot.writeListBegin(TType.I64, len(self.success))
-
 
29210
      for iter670 in self.success:
-
 
29211
        oprot.writeI64(iter670)
-
 
29212
      oprot.writeListEnd()
-
 
29213
      oprot.writeFieldEnd()
-
 
29214
    if self.cex is not None:
-
 
29215
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
-
 
29216
      self.cex.write(oprot)
-
 
29217
      oprot.writeFieldEnd()
-
 
29218
    oprot.writeFieldStop()
-
 
29219
    oprot.writeStructEnd()
-
 
29220
 
-
 
29221
  def validate(self):
29013
    return
29222
    return
29014
 
29223
 
29015
 
29224
 
29016
  def __repr__(self):
29225
  def __repr__(self):
29017
    L = ['%s=%r' % (key, value)
29226
    L = ['%s=%r' % (key, value)