#
# Autogenerated by Thrift Compiler (0.9.3)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py
#

from thrift.Thrift import TType, TMessageType, TException, TApplicationException

from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
  from thrift.protocol import fastbinary
except:
  fastbinary = None



class CreditInfo:
  """
  Attributes:
   - score
   - creditLevel
  """

  thrift_spec = (
    None, # 0
    (1, TType.I16, 'score', None, None, ), # 1
    (2, TType.I16, 'creditLevel', None, None, ), # 2
  )

  def __init__(self, score=None, creditLevel=None,):
    self.score = score
    self.creditLevel = creditLevel

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I16:
          self.score = iprot.readI16()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I16:
          self.creditLevel = iprot.readI16()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('CreditInfo')
    if self.score is not None:
      oprot.writeFieldBegin('score', TType.I16, 1)
      oprot.writeI16(self.score)
      oprot.writeFieldEnd()
    if self.creditLevel is not None:
      oprot.writeFieldBegin('creditLevel', TType.I16, 2)
      oprot.writeI16(self.creditLevel)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.score)
    value = (value * 31) ^ hash(self.creditLevel)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class DeviceCreditInfo:
  """
  Attributes:
   - creditInfo
   - tags
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'creditInfo', (CreditInfo, CreditInfo.thrift_spec), None, ), # 1
    (2, TType.LIST, 'tags', (TType.STRING,None), None, ), # 2
  )

  def __init__(self, creditInfo=None, tags=None,):
    self.creditInfo = creditInfo
    self.tags = tags

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.creditInfo = CreditInfo()
          self.creditInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.tags = []
          (_etype3, _size0) = iprot.readListBegin()
          for _i4 in xrange(_size0):
            _elem5 = iprot.readString()
            self.tags.append(_elem5)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('DeviceCreditInfo')
    if self.creditInfo is not None:
      oprot.writeFieldBegin('creditInfo', TType.STRUCT, 1)
      self.creditInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.tags is not None:
      oprot.writeFieldBegin('tags', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.tags))
      for iter6 in self.tags:
        oprot.writeString(iter6)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.creditInfo)
    value = (value * 31) ^ hash(self.tags)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class PaymentCreditInfo:
  """
  Attributes:
   - creditInfo
   - tags
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'creditInfo', (CreditInfo, CreditInfo.thrift_spec), None, ), # 1
    (2, TType.LIST, 'tags', (TType.STRING,None), None, ), # 2
  )

  def __init__(self, creditInfo=None, tags=None,):
    self.creditInfo = creditInfo
    self.tags = tags

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.creditInfo = CreditInfo()
          self.creditInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.tags = []
          (_etype10, _size7) = iprot.readListBegin()
          for _i11 in xrange(_size7):
            _elem12 = iprot.readString()
            self.tags.append(_elem12)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('PaymentCreditInfo')
    if self.creditInfo is not None:
      oprot.writeFieldBegin('creditInfo', TType.STRUCT, 1)
      self.creditInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.tags is not None:
      oprot.writeFieldBegin('tags', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.tags))
      for iter13 in self.tags:
        oprot.writeString(iter13)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.creditInfo)
    value = (value * 31) ^ hash(self.tags)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class UserCreditInfo:
  """
  Attributes:
   - creditInfo
   - tags
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'creditInfo', (CreditInfo, CreditInfo.thrift_spec), None, ), # 1
    (2, TType.LIST, 'tags', (TType.STRING,None), None, ), # 2
  )

  def __init__(self, creditInfo=None, tags=None,):
    self.creditInfo = creditInfo
    self.tags = tags

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.creditInfo = CreditInfo()
          self.creditInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.tags = []
          (_etype17, _size14) = iprot.readListBegin()
          for _i18 in xrange(_size14):
            _elem19 = iprot.readString()
            self.tags.append(_elem19)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('UserCreditInfo')
    if self.creditInfo is not None:
      oprot.writeFieldBegin('creditInfo', TType.STRUCT, 1)
      self.creditInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.tags is not None:
      oprot.writeFieldBegin('tags', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.tags))
      for iter20 in self.tags:
        oprot.writeString(iter20)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.creditInfo)
    value = (value * 31) ^ hash(self.tags)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class DriverCreditInfo:
  """
  Attributes:
   - creditInfo
   - tags
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'creditInfo', (CreditInfo, CreditInfo.thrift_spec), None, ), # 1
    (2, TType.LIST, 'tags', (TType.STRING,None), None, ), # 2
  )

  def __init__(self, creditInfo=None, tags=None,):
    self.creditInfo = creditInfo
    self.tags = tags

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.creditInfo = CreditInfo()
          self.creditInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.tags = []
          (_etype24, _size21) = iprot.readListBegin()
          for _i25 in xrange(_size21):
            _elem26 = iprot.readString()
            self.tags.append(_elem26)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('DriverCreditInfo')
    if self.creditInfo is not None:
      oprot.writeFieldBegin('creditInfo', TType.STRUCT, 1)
      self.creditInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.tags is not None:
      oprot.writeFieldBegin('tags', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.tags))
      for iter27 in self.tags:
        oprot.writeString(iter27)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.creditInfo)
    value = (value * 31) ^ hash(self.tags)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class TaxiDriverCreditInfo:
  """
  Attributes:
   - creditInfo
   - tags
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'creditInfo', (CreditInfo, CreditInfo.thrift_spec), None, ), # 1
    (2, TType.LIST, 'tags', (TType.STRING,None), None, ), # 2
  )

  def __init__(self, creditInfo=None, tags=None,):
    self.creditInfo = creditInfo
    self.tags = tags

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.creditInfo = CreditInfo()
          self.creditInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.tags = []
          (_etype31, _size28) = iprot.readListBegin()
          for _i32 in xrange(_size28):
            _elem33 = iprot.readString()
            self.tags.append(_elem33)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TaxiDriverCreditInfo')
    if self.creditInfo is not None:
      oprot.writeFieldBegin('creditInfo', TType.STRUCT, 1)
      self.creditInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.tags is not None:
      oprot.writeFieldBegin('tags', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.tags))
      for iter34 in self.tags:
        oprot.writeString(iter34)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.creditInfo)
    value = (value * 31) ^ hash(self.tags)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class OrderCreditInfo:
  """
  Attributes:
   - creditInfo
   - tags
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'creditInfo', (CreditInfo, CreditInfo.thrift_spec), None, ), # 1
    (2, TType.LIST, 'tags', (TType.STRING,None), None, ), # 2
  )

  def __init__(self, creditInfo=None, tags=None,):
    self.creditInfo = creditInfo
    self.tags = tags

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.creditInfo = CreditInfo()
          self.creditInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.tags = []
          (_etype38, _size35) = iprot.readListBegin()
          for _i39 in xrange(_size35):
            _elem40 = iprot.readString()
            self.tags.append(_elem40)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('OrderCreditInfo')
    if self.creditInfo is not None:
      oprot.writeFieldBegin('creditInfo', TType.STRUCT, 1)
      self.creditInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.tags is not None:
      oprot.writeFieldBegin('tags', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.tags))
      for iter41 in self.tags:
        oprot.writeString(iter41)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.creditInfo)
    value = (value * 31) ^ hash(self.tags)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class HexagonCreditInfo:
  """
  Attributes:
   - creditInfo
   - tags
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'creditInfo', (CreditInfo, CreditInfo.thrift_spec), None, ), # 1
    (2, TType.LIST, 'tags', (TType.STRING,None), None, ), # 2
  )

  def __init__(self, creditInfo=None, tags=None,):
    self.creditInfo = creditInfo
    self.tags = tags

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.creditInfo = CreditInfo()
          self.creditInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.tags = []
          (_etype45, _size42) = iprot.readListBegin()
          for _i46 in xrange(_size42):
            _elem47 = iprot.readString()
            self.tags.append(_elem47)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('HexagonCreditInfo')
    if self.creditInfo is not None:
      oprot.writeFieldBegin('creditInfo', TType.STRUCT, 1)
      self.creditInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.tags is not None:
      oprot.writeFieldBegin('tags', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.tags))
      for iter48 in self.tags:
        oprot.writeString(iter48)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.creditInfo)
    value = (value * 31) ^ hash(self.tags)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class DeviceInfo:
  """
  Attributes:
   - deviceCreditInfo
   - deviceType
   - relatedUsers
   - relatedUsersCount
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'deviceCreditInfo', (DeviceCreditInfo, DeviceCreditInfo.thrift_spec), None, ), # 1
    (2, TType.STRING, 'deviceType', None, None, ), # 2
    (3, TType.LIST, 'relatedUsers', (TType.I32,None), None, ), # 3
    (4, TType.I32, 'relatedUsersCount', None, None, ), # 4
  )

  def __init__(self, deviceCreditInfo=None, deviceType=None, relatedUsers=None, relatedUsersCount=None,):
    self.deviceCreditInfo = deviceCreditInfo
    self.deviceType = deviceType
    self.relatedUsers = relatedUsers
    self.relatedUsersCount = relatedUsersCount

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.deviceCreditInfo = DeviceCreditInfo()
          self.deviceCreditInfo.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.deviceType = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.relatedUsers = []
          (_etype52, _size49) = iprot.readListBegin()
          for _i53 in xrange(_size49):
            _elem54 = iprot.readI32()
            self.relatedUsers.append(_elem54)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.relatedUsersCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('DeviceInfo')
    if self.deviceCreditInfo is not None:
      oprot.writeFieldBegin('deviceCreditInfo', TType.STRUCT, 1)
      self.deviceCreditInfo.write(oprot)
      oprot.writeFieldEnd()
    if self.deviceType is not None:
      oprot.writeFieldBegin('deviceType', TType.STRING, 2)
      oprot.writeString(self.deviceType)
      oprot.writeFieldEnd()
    if self.relatedUsers is not None:
      oprot.writeFieldBegin('relatedUsers', TType.LIST, 3)
      oprot.writeListBegin(TType.I32, len(self.relatedUsers))
      for iter55 in self.relatedUsers:
        oprot.writeI32(iter55)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.relatedUsersCount is not None:
      oprot.writeFieldBegin('relatedUsersCount', TType.I32, 4)
      oprot.writeI32(self.relatedUsersCount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.deviceCreditInfo)
    value = (value * 31) ^ hash(self.deviceType)
    value = (value * 31) ^ hash(self.relatedUsers)
    value = (value * 31) ^ hash(self.relatedUsersCount)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class TaxiInviteStay:
  """
  Attributes:
   - inviteCount
   - weekActive
   - weekOrder
   - weekOnride
   - monthActive
   - monthOrder
   - monthOnride
   - updateTime
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'inviteCount', None, None, ), # 1
    (2, TType.DOUBLE, 'weekActive', None, None, ), # 2
    (3, TType.DOUBLE, 'weekOrder', None, None, ), # 3
    (4, TType.DOUBLE, 'weekOnride', None, None, ), # 4
    (5, TType.DOUBLE, 'monthActive', None, None, ), # 5
    (6, TType.DOUBLE, 'monthOrder', None, None, ), # 6
    (7, TType.DOUBLE, 'monthOnride', None, None, ), # 7
    (8, TType.STRING, 'updateTime', None, None, ), # 8
  )

  def __init__(self, inviteCount=None, weekActive=None, weekOrder=None, weekOnride=None, monthActive=None, monthOrder=None, monthOnride=None, updateTime=None,):
    self.inviteCount = inviteCount
    self.weekActive = weekActive
    self.weekOrder = weekOrder
    self.weekOnride = weekOnride
    self.monthActive = monthActive
    self.monthOrder = monthOrder
    self.monthOnride = monthOnride
    self.updateTime = updateTime

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I32:
          self.inviteCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.DOUBLE:
          self.weekActive = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.DOUBLE:
          self.weekOrder = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.DOUBLE:
          self.weekOnride = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.DOUBLE:
          self.monthActive = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.DOUBLE:
          self.monthOrder = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.DOUBLE:
          self.monthOnride = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.updateTime = iprot.readString()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TaxiInviteStay')
    if self.inviteCount is not None:
      oprot.writeFieldBegin('inviteCount', TType.I32, 1)
      oprot.writeI32(self.inviteCount)
      oprot.writeFieldEnd()
    if self.weekActive is not None:
      oprot.writeFieldBegin('weekActive', TType.DOUBLE, 2)
      oprot.writeDouble(self.weekActive)
      oprot.writeFieldEnd()
    if self.weekOrder is not None:
      oprot.writeFieldBegin('weekOrder', TType.DOUBLE, 3)
      oprot.writeDouble(self.weekOrder)
      oprot.writeFieldEnd()
    if self.weekOnride is not None:
      oprot.writeFieldBegin('weekOnride', TType.DOUBLE, 4)
      oprot.writeDouble(self.weekOnride)
      oprot.writeFieldEnd()
    if self.monthActive is not None:
      oprot.writeFieldBegin('monthActive', TType.DOUBLE, 5)
      oprot.writeDouble(self.monthActive)
      oprot.writeFieldEnd()
    if self.monthOrder is not None:
      oprot.writeFieldBegin('monthOrder', TType.DOUBLE, 6)
      oprot.writeDouble(self.monthOrder)
      oprot.writeFieldEnd()
    if self.monthOnride is not None:
      oprot.writeFieldBegin('monthOnride', TType.DOUBLE, 7)
      oprot.writeDouble(self.monthOnride)
      oprot.writeFieldEnd()
    if self.updateTime is not None:
      oprot.writeFieldBegin('updateTime', TType.STRING, 8)
      oprot.writeString(self.updateTime)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.inviteCount)
    value = (value * 31) ^ hash(self.weekActive)
    value = (value * 31) ^ hash(self.weekOrder)
    value = (value * 31) ^ hash(self.weekOnride)
    value = (value * 31) ^ hash(self.monthActive)
    value = (value * 31) ^ hash(self.monthOrder)
    value = (value * 31) ^ hash(self.monthOnride)
    value = (value * 31) ^ hash(self.updateTime)
    return value

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)
