Subversion Repositories SmartDukaan

Rev

Rev 22452 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#
# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

from thrift.Thrift import *
import shop2020.thriftpy.generic.ttypes


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


class UserType:
  USER = 0
  ANONYMOUS = 1

  _VALUES_TO_NAMES = {
    0: "USER",
    1: "ANONYMOUS",
  }

  _NAMES_TO_VALUES = {
    "USER": 0,
    "ANONYMOUS": 1,
  }

class PromotionType:
  DISCOUNT_COUPON = 0
  GIFT_VOUCHER = 1

  _VALUES_TO_NAMES = {
    0: "DISCOUNT_COUPON",
    1: "GIFT_VOUCHER",
  }

  _NAMES_TO_VALUES = {
    "DISCOUNT_COUPON": 0,
    "GIFT_VOUCHER": 1,
  }

class AddressType:
  WORK = 0
  HOME = 1

  _VALUES_TO_NAMES = {
    0: "WORK",
    1: "HOME",
  }

  _NAMES_TO_VALUES = {
    "WORK": 0,
    "HOME": 1,
  }

class CouponCategory:
  """
  Added by Manish Sharma
  """
  CUSTOMER_SATISFACTION = 0
  MARKETING = 1
  REFUND = 2
  CATEGORY = 3

  _VALUES_TO_NAMES = {
    0: "CUSTOMER_SATISFACTION",
    1: "MARKETING",
    2: "REFUND",
    3: "CATEGORY",
  }

  _NAMES_TO_VALUES = {
    "CUSTOMER_SATISFACTION": 0,
    "MARKETING": 1,
    "REFUND": 2,
    "CATEGORY": 3,
  }

class UserCommunicationType:
  """
  Form types for Contact Us form
  """
  RETURN_FORM = 1
  ORDER_CANCELLATION = 2
  DELIVERY_PROBLEM = 3
  PAYMENT_STATUS = 4
  ORDER_STATUS = 5
  PRODUCT_REQUEST = 6
  RECHARGE_RELATED = 7
  OTHER = 8
  Bulk_Order_ENQUIRY = 21

  _VALUES_TO_NAMES = {
    1: "RETURN_FORM",
    2: "ORDER_CANCELLATION",
    3: "DELIVERY_PROBLEM",
    4: "PAYMENT_STATUS",
    5: "ORDER_STATUS",
    6: "PRODUCT_REQUEST",
    7: "RECHARGE_RELATED",
    8: "OTHER",
    21: "Bulk_Order_ENQUIRY",
  }

  _NAMES_TO_VALUES = {
    "RETURN_FORM": 1,
    "ORDER_CANCELLATION": 2,
    "DELIVERY_PROBLEM": 3,
    "PAYMENT_STATUS": 4,
    "ORDER_STATUS": 5,
    "PRODUCT_REQUEST": 6,
    "RECHARGE_RELATED": 7,
    "OTHER": 8,
    "Bulk_Order_ENQUIRY": 21,
  }

class TrackLogType:
  """
  Affiliate track log types for affiliate tracking
  """
  NEW_REGISTRATION = 1
  PAYMENT_SUCCESS = 2

  _VALUES_TO_NAMES = {
    1: "NEW_REGISTRATION",
    2: "PAYMENT_SUCCESS",
  }

  _NAMES_TO_VALUES = {
    "NEW_REGISTRATION": 1,
    "PAYMENT_SUCCESS": 2,
  }

class Sex:
  MALE = 0
  FEMALE = 1
  WONT_SAY = 2

  _VALUES_TO_NAMES = {
    0: "MALE",
    1: "FEMALE",
    2: "WONT_SAY",
  }

  _NAMES_TO_VALUES = {
    "MALE": 0,
    "FEMALE": 1,
    "WONT_SAY": 2,
  }

class LineStatus:
  LINE_ACTIVE = 0
  LINE_DELETED = 1
  LINE_EXPIRED = 2
  LINE_COMMITED = 3
  LINE_COMMIT_FAILED = 4
  LINE_AUTO_DELETED = 5

  _VALUES_TO_NAMES = {
    0: "LINE_ACTIVE",
    1: "LINE_DELETED",
    2: "LINE_EXPIRED",
    3: "LINE_COMMITED",
    4: "LINE_COMMIT_FAILED",
    5: "LINE_AUTO_DELETED",
  }

  _NAMES_TO_VALUES = {
    "LINE_ACTIVE": 0,
    "LINE_DELETED": 1,
    "LINE_EXPIRED": 2,
    "LINE_COMMITED": 3,
    "LINE_COMMIT_FAILED": 4,
    "LINE_AUTO_DELETED": 5,
  }

class CartStatus:
  ACTIVE = 0
  INACTIVE = 1
  EXPIRED = 2
  COMMITTED = 3
  COMMIT_FAILED = 4

  _VALUES_TO_NAMES = {
    0: "ACTIVE",
    1: "INACTIVE",
    2: "EXPIRED",
    3: "COMMITTED",
    4: "COMMIT_FAILED",
  }

  _NAMES_TO_VALUES = {
    "ACTIVE": 0,
    "INACTIVE": 1,
    "EXPIRED": 2,
    "COMMITTED": 3,
    "COMMIT_FAILED": 4,
  }

class WidgetType:
  MY_RESEARCH = 0
  BROWSE_HISTORY = 1

  _VALUES_TO_NAMES = {
    0: "MY_RESEARCH",
    1: "BROWSE_HISTORY",
  }

  _NAMES_TO_VALUES = {
    "MY_RESEARCH": 0,
    "BROWSE_HISTORY": 1,
  }

class CounterVerificationType:
  NOT_VERIFIED = 0
  OFFLINE = 1
  ONLINE = 2

  _VALUES_TO_NAMES = {
    0: "NOT_VERIFIED",
    1: "OFFLINE",
    2: "ONLINE",
  }

  _NAMES_TO_VALUES = {
    "NOT_VERIFIED": 0,
    "OFFLINE": 1,
    "ONLINE": 2,
  }

class VoucherType:
  SPICEDECK_MOBILE = 1

  _VALUES_TO_NAMES = {
    1: "SPICEDECK_MOBILE",
  }

  _NAMES_TO_VALUES = {
    "SPICEDECK_MOBILE": 1,
  }


class AuthenticationException(Exception):
  """
  Exceptions

  Attributes:
   - message
   - errorCode
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'message', None, None, ), # 1
    (2, TType.I32, 'errorCode', None, None, ), # 2
  )

  def __init__(self, message=None, errorCode=None,):
    self.message = message
    self.errorCode = errorCode

  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.STRING:
          self.message = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.errorCode = 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('AuthenticationException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    if self.errorCode is not None:
      oprot.writeFieldBegin('errorCode', TType.I32, 2)
      oprot.writeI32(self.errorCode)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  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 UserContextException(Exception):
  """
  Attributes:
   - errorCode
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'errorCode', None, None, ), # 1
    (2, TType.STRING, 'message', None, None, ), # 2
  )

  def __init__(self, errorCode=None, message=None,):
    self.errorCode = errorCode
    self.message = message

  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.errorCode = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.message = 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('UserContextException')
    if self.errorCode is not None:
      oprot.writeFieldBegin('errorCode', TType.I32, 1)
      oprot.writeI32(self.errorCode)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 2)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  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 ShoppingCartException(Exception):
  """
  Attributes:
   - id
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'message', None, None, ), # 2
  )

  def __init__(self, id=None, message=None,):
    self.id = id
    self.message = message

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.message = 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('ShoppingCartException')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 2)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  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 UserCommunicationException(Exception):
  """
  Attributes:
   - id
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'message', None, None, ), # 2
  )

  def __init__(self, id=None, message=None,):
    self.id = id
    self.message = message

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.message = 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('UserCommunicationException')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 2)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  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 UserAffiliateException(Exception):
  """
  Attributes:
   - id
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'message', None, None, ), # 2
  )

  def __init__(self, id=None, message=None,):
    self.id = id
    self.message = message

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.message = 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('UserAffiliateException')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 2)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  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 Address:
  """
  Address

  Attributes:
   - id
   - line1
   - line2
   - landmark
   - city
   - state
   - pin
   - country
   - enabled
   - type
   - addedOn
   - name
   - phone
   - taxInvoiceAvailable
   - creditOptionAvailable
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'line1', None, None, ), # 2
    (3, TType.STRING, 'line2', None, None, ), # 3
    (4, TType.STRING, 'landmark', None, None, ), # 4
    (5, TType.STRING, 'city', None, None, ), # 5
    (6, TType.STRING, 'state', None, None, ), # 6
    (7, TType.STRING, 'pin', None, None, ), # 7
    (8, TType.STRING, 'country', None, None, ), # 8
    (9, TType.BOOL, 'enabled', None, None, ), # 9
    (10, TType.I32, 'type', None, None, ), # 10
    (11, TType.I64, 'addedOn', None, None, ), # 11
    (12, TType.STRING, 'name', None, None, ), # 12
    (13, TType.STRING, 'phone', None, None, ), # 13
    (14, TType.BOOL, 'taxInvoiceAvailable', None, None, ), # 14
    (15, TType.BOOL, 'creditOptionAvailable', None, None, ), # 15
  )

  def __init__(self, id=None, line1=None, line2=None, landmark=None, city=None, state=None, pin=None, country=None, enabled=None, type=None, addedOn=None, name=None, phone=None, taxInvoiceAvailable=None, creditOptionAvailable=None,):
    self.id = id
    self.line1 = line1
    self.line2 = line2
    self.landmark = landmark
    self.city = city
    self.state = state
    self.pin = pin
    self.country = country
    self.enabled = enabled
    self.type = type
    self.addedOn = addedOn
    self.name = name
    self.phone = phone
    self.taxInvoiceAvailable = taxInvoiceAvailable
    self.creditOptionAvailable = creditOptionAvailable

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.line1 = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.line2 = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.landmark = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.city = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.state = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.pin = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.country = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.BOOL:
          self.enabled = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I32:
          self.type = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.addedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRING:
          self.phone = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.BOOL:
          self.taxInvoiceAvailable = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.BOOL:
          self.creditOptionAvailable = iprot.readBool();
        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('Address')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.line1 is not None:
      oprot.writeFieldBegin('line1', TType.STRING, 2)
      oprot.writeString(self.line1)
      oprot.writeFieldEnd()
    if self.line2 is not None:
      oprot.writeFieldBegin('line2', TType.STRING, 3)
      oprot.writeString(self.line2)
      oprot.writeFieldEnd()
    if self.landmark is not None:
      oprot.writeFieldBegin('landmark', TType.STRING, 4)
      oprot.writeString(self.landmark)
      oprot.writeFieldEnd()
    if self.city is not None:
      oprot.writeFieldBegin('city', TType.STRING, 5)
      oprot.writeString(self.city)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.STRING, 6)
      oprot.writeString(self.state)
      oprot.writeFieldEnd()
    if self.pin is not None:
      oprot.writeFieldBegin('pin', TType.STRING, 7)
      oprot.writeString(self.pin)
      oprot.writeFieldEnd()
    if self.country is not None:
      oprot.writeFieldBegin('country', TType.STRING, 8)
      oprot.writeString(self.country)
      oprot.writeFieldEnd()
    if self.enabled is not None:
      oprot.writeFieldBegin('enabled', TType.BOOL, 9)
      oprot.writeBool(self.enabled)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 10)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.addedOn is not None:
      oprot.writeFieldBegin('addedOn', TType.I64, 11)
      oprot.writeI64(self.addedOn)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 12)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.phone is not None:
      oprot.writeFieldBegin('phone', TType.STRING, 13)
      oprot.writeString(self.phone)
      oprot.writeFieldEnd()
    if self.taxInvoiceAvailable is not None:
      oprot.writeFieldBegin('taxInvoiceAvailable', TType.BOOL, 14)
      oprot.writeBool(self.taxInvoiceAvailable)
      oprot.writeFieldEnd()
    if self.creditOptionAvailable is not None:
      oprot.writeFieldBegin('creditOptionAvailable', TType.BOOL, 15)
      oprot.writeBool(self.creditOptionAvailable)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 User:
  """
  The user structure holding the basic information that identifies the user.
  *

  Attributes:
   - userId
   - email
   - password
   - name
   - dateOfBirth
   - sex
   - mobileNumber
   - lastLogin
   - lastLogout
   - activeSince
   - addresses
   - defaultAddressId
   - communicationEmail
   - activeCartId
   - jsessionId
   - isAnonymous
   - source
   - sourceStartTime
   - trustLevel
   - isFacebookUser
   - facebookAccessToken
   - facebookId
   - sourceId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'userId', None, None, ), # 1
    (2, TType.STRING, 'email', None, None, ), # 2
    (3, TType.STRING, 'password', None, None, ), # 3
    (4, TType.STRING, 'name', None, None, ), # 4
    (5, TType.STRING, 'dateOfBirth', None, None, ), # 5
    (6, TType.I32, 'sex', None, None, ), # 6
    (7, TType.STRING, 'mobileNumber', None, None, ), # 7
    (8, TType.I64, 'lastLogin', None, None, ), # 8
    (9, TType.I64, 'lastLogout', None, None, ), # 9
    (10, TType.I64, 'activeSince', None, None, ), # 10
    (11, TType.LIST, 'addresses', (TType.STRUCT,(Address, Address.thrift_spec)), None, ), # 11
    (12, TType.I64, 'defaultAddressId', None, None, ), # 12
    (13, TType.STRING, 'communicationEmail', None, None, ), # 13
    (14, TType.I64, 'activeCartId', None, None, ), # 14
    (15, TType.STRING, 'jsessionId', None, None, ), # 15
    (16, TType.BOOL, 'isAnonymous', None, None, ), # 16
    (17, TType.STRING, 'source', None, None, ), # 17
    (18, TType.I64, 'sourceStartTime', None, None, ), # 18
    (19, TType.DOUBLE, 'trustLevel', None, None, ), # 19
    (20, TType.BOOL, 'isFacebookUser', None, None, ), # 20
    (21, TType.STRING, 'facebookAccessToken', None, None, ), # 21
    (22, TType.STRING, 'facebookId', None, None, ), # 22
    (23, TType.I64, 'sourceId', None, None, ), # 23
  )

  def __init__(self, userId=None, email=None, password=None, name=None, dateOfBirth=None, sex=None, mobileNumber=None, lastLogin=None, lastLogout=None, activeSince=None, addresses=None, defaultAddressId=None, communicationEmail=None, activeCartId=None, jsessionId=None, isAnonymous=None, source=None, sourceStartTime=None, trustLevel=None, isFacebookUser=None, facebookAccessToken=None, facebookId=None, sourceId=None,):
    self.userId = userId
    self.email = email
    self.password = password
    self.name = name
    self.dateOfBirth = dateOfBirth
    self.sex = sex
    self.mobileNumber = mobileNumber
    self.lastLogin = lastLogin
    self.lastLogout = lastLogout
    self.activeSince = activeSince
    self.addresses = addresses
    self.defaultAddressId = defaultAddressId
    self.communicationEmail = communicationEmail
    self.activeCartId = activeCartId
    self.jsessionId = jsessionId
    self.isAnonymous = isAnonymous
    self.source = source
    self.sourceStartTime = sourceStartTime
    self.trustLevel = trustLevel
    self.isFacebookUser = isFacebookUser
    self.facebookAccessToken = facebookAccessToken
    self.facebookId = facebookId
    self.sourceId = sourceId

  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.I64:
          self.userId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.email = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.password = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.dateOfBirth = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.sex = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.mobileNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.lastLogin = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I64:
          self.lastLogout = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.activeSince = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.LIST:
          self.addresses = []
          (_etype3, _size0) = iprot.readListBegin()
          for _i4 in xrange(_size0):
            _elem5 = Address()
            _elem5.read(iprot)
            self.addresses.append(_elem5)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I64:
          self.defaultAddressId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRING:
          self.communicationEmail = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.I64:
          self.activeCartId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.STRING:
          self.jsessionId = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.BOOL:
          self.isAnonymous = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.STRING:
          self.source = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.I64:
          self.sourceStartTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 19:
        if ftype == TType.DOUBLE:
          self.trustLevel = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.BOOL:
          self.isFacebookUser = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.STRING:
          self.facebookAccessToken = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.facebookId = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 23:
        if ftype == TType.I64:
          self.sourceId = iprot.readI64();
        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('User')
    if self.userId is not None:
      oprot.writeFieldBegin('userId', TType.I64, 1)
      oprot.writeI64(self.userId)
      oprot.writeFieldEnd()
    if self.email is not None:
      oprot.writeFieldBegin('email', TType.STRING, 2)
      oprot.writeString(self.email)
      oprot.writeFieldEnd()
    if self.password is not None:
      oprot.writeFieldBegin('password', TType.STRING, 3)
      oprot.writeString(self.password)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 4)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.dateOfBirth is not None:
      oprot.writeFieldBegin('dateOfBirth', TType.STRING, 5)
      oprot.writeString(self.dateOfBirth)
      oprot.writeFieldEnd()
    if self.sex is not None:
      oprot.writeFieldBegin('sex', TType.I32, 6)
      oprot.writeI32(self.sex)
      oprot.writeFieldEnd()
    if self.mobileNumber is not None:
      oprot.writeFieldBegin('mobileNumber', TType.STRING, 7)
      oprot.writeString(self.mobileNumber)
      oprot.writeFieldEnd()
    if self.lastLogin is not None:
      oprot.writeFieldBegin('lastLogin', TType.I64, 8)
      oprot.writeI64(self.lastLogin)
      oprot.writeFieldEnd()
    if self.lastLogout is not None:
      oprot.writeFieldBegin('lastLogout', TType.I64, 9)
      oprot.writeI64(self.lastLogout)
      oprot.writeFieldEnd()
    if self.activeSince is not None:
      oprot.writeFieldBegin('activeSince', TType.I64, 10)
      oprot.writeI64(self.activeSince)
      oprot.writeFieldEnd()
    if self.addresses is not None:
      oprot.writeFieldBegin('addresses', TType.LIST, 11)
      oprot.writeListBegin(TType.STRUCT, len(self.addresses))
      for iter6 in self.addresses:
        iter6.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.defaultAddressId is not None:
      oprot.writeFieldBegin('defaultAddressId', TType.I64, 12)
      oprot.writeI64(self.defaultAddressId)
      oprot.writeFieldEnd()
    if self.communicationEmail is not None:
      oprot.writeFieldBegin('communicationEmail', TType.STRING, 13)
      oprot.writeString(self.communicationEmail)
      oprot.writeFieldEnd()
    if self.activeCartId is not None:
      oprot.writeFieldBegin('activeCartId', TType.I64, 14)
      oprot.writeI64(self.activeCartId)
      oprot.writeFieldEnd()
    if self.jsessionId is not None:
      oprot.writeFieldBegin('jsessionId', TType.STRING, 15)
      oprot.writeString(self.jsessionId)
      oprot.writeFieldEnd()
    if self.isAnonymous is not None:
      oprot.writeFieldBegin('isAnonymous', TType.BOOL, 16)
      oprot.writeBool(self.isAnonymous)
      oprot.writeFieldEnd()
    if self.source is not None:
      oprot.writeFieldBegin('source', TType.STRING, 17)
      oprot.writeString(self.source)
      oprot.writeFieldEnd()
    if self.sourceStartTime is not None:
      oprot.writeFieldBegin('sourceStartTime', TType.I64, 18)
      oprot.writeI64(self.sourceStartTime)
      oprot.writeFieldEnd()
    if self.trustLevel is not None:
      oprot.writeFieldBegin('trustLevel', TType.DOUBLE, 19)
      oprot.writeDouble(self.trustLevel)
      oprot.writeFieldEnd()
    if self.isFacebookUser is not None:
      oprot.writeFieldBegin('isFacebookUser', TType.BOOL, 20)
      oprot.writeBool(self.isFacebookUser)
      oprot.writeFieldEnd()
    if self.facebookAccessToken is not None:
      oprot.writeFieldBegin('facebookAccessToken', TType.STRING, 21)
      oprot.writeString(self.facebookAccessToken)
      oprot.writeFieldEnd()
    if self.facebookId is not None:
      oprot.writeFieldBegin('facebookId', TType.STRING, 22)
      oprot.writeString(self.facebookId)
      oprot.writeFieldEnd()
    if self.sourceId is not None:
      oprot.writeFieldBegin('sourceId', TType.I64, 23)
      oprot.writeI64(self.sourceId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 UserCommunication:
  """
  Attributes:
   - id
   - userId
   - communicationType
   - orderId
   - airwaybillNo
   - replyTo
   - productName
   - subject
   - message
   - communication_timestamp
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'userId', None, None, ), # 2
    (3, TType.I32, 'communicationType', None, None, ), # 3
    (4, TType.I64, 'orderId', None, None, ), # 4
    (5, TType.STRING, 'airwaybillNo', None, None, ), # 5
    (6, TType.STRING, 'replyTo', None, None, ), # 6
    (7, TType.STRING, 'productName', None, None, ), # 7
    (8, TType.STRING, 'subject', None, None, ), # 8
    (9, TType.STRING, 'message', None, None, ), # 9
    (10, TType.I64, 'communication_timestamp', None, None, ), # 10
  )

  def __init__(self, id=None, userId=None, communicationType=None, orderId=None, airwaybillNo=None, replyTo=None, productName=None, subject=None, message=None, communication_timestamp=None,):
    self.id = id
    self.userId = userId
    self.communicationType = communicationType
    self.orderId = orderId
    self.airwaybillNo = airwaybillNo
    self.replyTo = replyTo
    self.productName = productName
    self.subject = subject
    self.message = message
    self.communication_timestamp = communication_timestamp

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.userId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.communicationType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.airwaybillNo = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.replyTo = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.productName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.subject = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.message = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.communication_timestamp = iprot.readI64();
        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('UserCommunication')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.userId is not None:
      oprot.writeFieldBegin('userId', TType.I64, 2)
      oprot.writeI64(self.userId)
      oprot.writeFieldEnd()
    if self.communicationType is not None:
      oprot.writeFieldBegin('communicationType', TType.I32, 3)
      oprot.writeI32(self.communicationType)
      oprot.writeFieldEnd()
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 4)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.airwaybillNo is not None:
      oprot.writeFieldBegin('airwaybillNo', TType.STRING, 5)
      oprot.writeString(self.airwaybillNo)
      oprot.writeFieldEnd()
    if self.replyTo is not None:
      oprot.writeFieldBegin('replyTo', TType.STRING, 6)
      oprot.writeString(self.replyTo)
      oprot.writeFieldEnd()
    if self.productName is not None:
      oprot.writeFieldBegin('productName', TType.STRING, 7)
      oprot.writeString(self.productName)
      oprot.writeFieldEnd()
    if self.subject is not None:
      oprot.writeFieldBegin('subject', TType.STRING, 8)
      oprot.writeString(self.subject)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 9)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    if self.communication_timestamp is not None:
      oprot.writeFieldBegin('communication_timestamp', TType.I64, 10)
      oprot.writeI64(self.communication_timestamp)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 MasterAffiliate:
  """
  Attributes:
   - id
   - name
   - addedOn
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.I64, 'addedOn', None, None, ), # 3
  )

  def __init__(self, id=None, name=None, addedOn=None,):
    self.id = id
    self.name = name
    self.addedOn = addedOn

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.addedOn = iprot.readI64();
        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('MasterAffiliate')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.addedOn is not None:
      oprot.writeFieldBegin('addedOn', TType.I64, 3)
      oprot.writeI64(self.addedOn)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 Affiliate:
  """
  Attributes:
   - id
   - name
   - url
   - masterAffiliateId
   - addedOn
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.STRING, 'url', None, None, ), # 3
    (4, TType.I64, 'masterAffiliateId', None, None, ), # 4
    (5, TType.I64, 'addedOn', None, None, ), # 5
  )

  def __init__(self, id=None, name=None, url=None, masterAffiliateId=None, addedOn=None,):
    self.id = id
    self.name = name
    self.url = url
    self.masterAffiliateId = masterAffiliateId
    self.addedOn = addedOn

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.url = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.masterAffiliateId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.addedOn = iprot.readI64();
        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('Affiliate')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.url is not None:
      oprot.writeFieldBegin('url', TType.STRING, 3)
      oprot.writeString(self.url)
      oprot.writeFieldEnd()
    if self.masterAffiliateId is not None:
      oprot.writeFieldBegin('masterAffiliateId', TType.I64, 4)
      oprot.writeI64(self.masterAffiliateId)
      oprot.writeFieldEnd()
    if self.addedOn is not None:
      oprot.writeFieldBegin('addedOn', TType.I64, 5)
      oprot.writeI64(self.addedOn)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 Tracker:
  """
  Attributes:
   - id
   - affiliateId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'affiliateId', None, None, ), # 2
  )

  def __init__(self, id=None, affiliateId=None,):
    self.id = id
    self.affiliateId = affiliateId

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.affiliateId = iprot.readI64();
        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('Tracker')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.affiliateId is not None:
      oprot.writeFieldBegin('affiliateId', TType.I64, 2)
      oprot.writeI64(self.affiliateId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 TrackLog:
  """
  Attributes:
   - id
   - addedOn
   - affiliateId
   - userId
   - eventType
   - url
   - data
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'addedOn', None, None, ), # 2
    (3, TType.I64, 'affiliateId', None, None, ), # 3
    (4, TType.I64, 'userId', None, None, ), # 4
    (5, TType.I32, 'eventType', None, None, ), # 5
    (6, TType.STRING, 'url', None, None, ), # 6
    (7, TType.STRING, 'data', None, None, ), # 7
  )

  def __init__(self, id=None, addedOn=None, affiliateId=None, userId=None, eventType=None, url=None, data=None,):
    self.id = id
    self.addedOn = addedOn
    self.affiliateId = affiliateId
    self.userId = userId
    self.eventType = eventType
    self.url = url
    self.data = data

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.addedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.affiliateId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.userId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.eventType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.url = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.data = 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('TrackLog')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.addedOn is not None:
      oprot.writeFieldBegin('addedOn', TType.I64, 2)
      oprot.writeI64(self.addedOn)
      oprot.writeFieldEnd()
    if self.affiliateId is not None:
      oprot.writeFieldBegin('affiliateId', TType.I64, 3)
      oprot.writeI64(self.affiliateId)
      oprot.writeFieldEnd()
    if self.userId is not None:
      oprot.writeFieldBegin('userId', TType.I64, 4)
      oprot.writeI64(self.userId)
      oprot.writeFieldEnd()
    if self.eventType is not None:
      oprot.writeFieldBegin('eventType', TType.I32, 5)
      oprot.writeI32(self.eventType)
      oprot.writeFieldEnd()
    if self.url is not None:
      oprot.writeFieldBegin('url', TType.STRING, 6)
      oprot.writeString(self.url)
      oprot.writeFieldEnd()
    if self.data is not None:
      oprot.writeFieldBegin('data', TType.STRING, 7)
      oprot.writeString(self.data)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 ItemQuantity:
  """
  Attributes:
   - itemId
   - qty
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.I64, 'qty', None, None, ), # 2
  )

  def __init__(self, itemId=None, qty=None,):
    self.itemId = itemId
    self.qty = qty

  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.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.qty = iprot.readI64();
        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('ItemQuantity')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.qty is not None:
      oprot.writeFieldBegin('qty', TType.I64, 2)
      oprot.writeI64(self.qty)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 ItemPriceQuantity:
  """
  Attributes:
   - itemId
   - price
   - qty
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.DOUBLE, 'price', None, None, ), # 2
    (3, TType.I64, 'qty', None, None, ), # 3
  )

  def __init__(self, itemId=None, price=None, qty=None,):
    self.itemId = itemId
    self.price = price
    self.qty = qty

  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.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.DOUBLE:
          self.price = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.qty = iprot.readI64();
        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('ItemPriceQuantity')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.price is not None:
      oprot.writeFieldBegin('price', TType.DOUBLE, 2)
      oprot.writeDouble(self.price)
      oprot.writeFieldEnd()
    if self.qty is not None:
      oprot.writeFieldBegin('qty', TType.I64, 3)
      oprot.writeI64(self.qty)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 Discount:
  """
  Attributes:
   - cart_id
   - item_id
   - discount
   - quantity
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'cart_id', None, None, ), # 1
    (2, TType.I64, 'item_id', None, None, ), # 2
    (3, TType.DOUBLE, 'discount', None, None, ), # 3
    (4, TType.DOUBLE, 'quantity', None, None, ), # 4
  )

  def __init__(self, cart_id=None, item_id=None, discount=None, quantity=None,):
    self.cart_id = cart_id
    self.item_id = item_id
    self.discount = discount
    self.quantity = quantity

  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.I64:
          self.cart_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.DOUBLE:
          self.discount = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.DOUBLE:
          self.quantity = iprot.readDouble();
        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('Discount')
    if self.cart_id is not None:
      oprot.writeFieldBegin('cart_id', TType.I64, 1)
      oprot.writeI64(self.cart_id)
      oprot.writeFieldEnd()
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 2)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.discount is not None:
      oprot.writeFieldBegin('discount', TType.DOUBLE, 3)
      oprot.writeDouble(self.discount)
      oprot.writeFieldEnd()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 4)
      oprot.writeDouble(self.quantity)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 Line:
  """
  Attributes:
   - cartId
   - itemId
   - quantity
   - createdOn
   - updatedOn
   - lineStatus
   - estimate
   - actualPrice
   - discountedPrice
   - discounts
   - insurer
   - insuranceAmount
   - dataProtectionInsurer
   - dataProtectionAmount
   - dealText
   - freebieId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'cartId', None, None, ), # 1
    (2, TType.I64, 'itemId', None, None, ), # 2
    (3, TType.DOUBLE, 'quantity', None, None, ), # 3
    (4, TType.I64, 'createdOn', None, None, ), # 4
    (5, TType.I64, 'updatedOn', None, None, ), # 5
    (6, TType.I32, 'lineStatus', None, None, ), # 6
    (7, TType.I32, 'estimate', None, None, ), # 7
    (8, TType.DOUBLE, 'actualPrice', None, None, ), # 8
    (9, TType.DOUBLE, 'discountedPrice', None, None, ), # 9
    (10, TType.LIST, 'discounts', (TType.STRUCT,(Discount, Discount.thrift_spec)), None, ), # 10
    (11, TType.I64, 'insurer', None, None, ), # 11
    (12, TType.DOUBLE, 'insuranceAmount', None, None, ), # 12
    (13, TType.I64, 'dataProtectionInsurer', None, None, ), # 13
    (14, TType.DOUBLE, 'dataProtectionAmount', None, None, ), # 14
    (15, TType.STRING, 'dealText', None, None, ), # 15
    (16, TType.I64, 'freebieId', None, None, ), # 16
  )

  def __init__(self, cartId=None, itemId=None, quantity=None, createdOn=None, updatedOn=None, lineStatus=None, estimate=None, actualPrice=None, discountedPrice=None, discounts=None, insurer=None, insuranceAmount=None, dataProtectionInsurer=None, dataProtectionAmount=None, dealText=None, freebieId=None,):
    self.cartId = cartId
    self.itemId = itemId
    self.quantity = quantity
    self.createdOn = createdOn
    self.updatedOn = updatedOn
    self.lineStatus = lineStatus
    self.estimate = estimate
    self.actualPrice = actualPrice
    self.discountedPrice = discountedPrice
    self.discounts = discounts
    self.insurer = insurer
    self.insuranceAmount = insuranceAmount
    self.dataProtectionInsurer = dataProtectionInsurer
    self.dataProtectionAmount = dataProtectionAmount
    self.dealText = dealText
    self.freebieId = freebieId

  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.I64:
          self.cartId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.DOUBLE:
          self.quantity = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.createdOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.updatedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.lineStatus = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.estimate = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.DOUBLE:
          self.actualPrice = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.DOUBLE:
          self.discountedPrice = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.LIST:
          self.discounts = []
          (_etype10, _size7) = iprot.readListBegin()
          for _i11 in xrange(_size7):
            _elem12 = Discount()
            _elem12.read(iprot)
            self.discounts.append(_elem12)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.insurer = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.DOUBLE:
          self.insuranceAmount = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I64:
          self.dataProtectionInsurer = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.DOUBLE:
          self.dataProtectionAmount = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.STRING:
          self.dealText = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.I64:
          self.freebieId = iprot.readI64();
        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('Line')
    if self.cartId is not None:
      oprot.writeFieldBegin('cartId', TType.I64, 1)
      oprot.writeI64(self.cartId)
      oprot.writeFieldEnd()
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 2)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 3)
      oprot.writeDouble(self.quantity)
      oprot.writeFieldEnd()
    if self.createdOn is not None:
      oprot.writeFieldBegin('createdOn', TType.I64, 4)
      oprot.writeI64(self.createdOn)
      oprot.writeFieldEnd()
    if self.updatedOn is not None:
      oprot.writeFieldBegin('updatedOn', TType.I64, 5)
      oprot.writeI64(self.updatedOn)
      oprot.writeFieldEnd()
    if self.lineStatus is not None:
      oprot.writeFieldBegin('lineStatus', TType.I32, 6)
      oprot.writeI32(self.lineStatus)
      oprot.writeFieldEnd()
    if self.estimate is not None:
      oprot.writeFieldBegin('estimate', TType.I32, 7)
      oprot.writeI32(self.estimate)
      oprot.writeFieldEnd()
    if self.actualPrice is not None:
      oprot.writeFieldBegin('actualPrice', TType.DOUBLE, 8)
      oprot.writeDouble(self.actualPrice)
      oprot.writeFieldEnd()
    if self.discountedPrice is not None:
      oprot.writeFieldBegin('discountedPrice', TType.DOUBLE, 9)
      oprot.writeDouble(self.discountedPrice)
      oprot.writeFieldEnd()
    if self.discounts is not None:
      oprot.writeFieldBegin('discounts', TType.LIST, 10)
      oprot.writeListBegin(TType.STRUCT, len(self.discounts))
      for iter13 in self.discounts:
        iter13.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.insurer is not None:
      oprot.writeFieldBegin('insurer', TType.I64, 11)
      oprot.writeI64(self.insurer)
      oprot.writeFieldEnd()
    if self.insuranceAmount is not None:
      oprot.writeFieldBegin('insuranceAmount', TType.DOUBLE, 12)
      oprot.writeDouble(self.insuranceAmount)
      oprot.writeFieldEnd()
    if self.dataProtectionInsurer is not None:
      oprot.writeFieldBegin('dataProtectionInsurer', TType.I64, 13)
      oprot.writeI64(self.dataProtectionInsurer)
      oprot.writeFieldEnd()
    if self.dataProtectionAmount is not None:
      oprot.writeFieldBegin('dataProtectionAmount', TType.DOUBLE, 14)
      oprot.writeDouble(self.dataProtectionAmount)
      oprot.writeFieldEnd()
    if self.dealText is not None:
      oprot.writeFieldBegin('dealText', TType.STRING, 15)
      oprot.writeString(self.dealText)
      oprot.writeFieldEnd()
    if self.freebieId is not None:
      oprot.writeFieldBegin('freebieId', TType.I64, 16)
      oprot.writeI64(self.freebieId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 Cart:
  """
  Attributes:
   - id
   - lines
   - status
   - createdOn
   - updatedOn
   - checkedOutOn
   - addressId
   - totalPrice
   - discountedPrice
   - couponCode
   - pickupStoreId
   - message
   - wallet_amount
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.LIST, 'lines', (TType.STRUCT,(Line, Line.thrift_spec)), None, ), # 2
    (3, TType.I32, 'status', None, None, ), # 3
    (4, TType.I64, 'createdOn', None, None, ), # 4
    (5, TType.I64, 'updatedOn', None, None, ), # 5
    (6, TType.I64, 'checkedOutOn', None, None, ), # 6
    (7, TType.I64, 'addressId', None, None, ), # 7
    (8, TType.DOUBLE, 'totalPrice', None, None, ), # 8
    (9, TType.DOUBLE, 'discountedPrice', None, None, ), # 9
    (10, TType.STRING, 'couponCode', None, None, ), # 10
    (11, TType.I64, 'pickupStoreId', None, None, ), # 11
    (12, TType.STRING, 'message', None, None, ), # 12
    (13, TType.DOUBLE, 'wallet_amount', None, None, ), # 13
  )

  def __init__(self, id=None, lines=None, status=None, createdOn=None, updatedOn=None, checkedOutOn=None, addressId=None, totalPrice=None, discountedPrice=None, couponCode=None, pickupStoreId=None, message=None, wallet_amount=None,):
    self.id = id
    self.lines = lines
    self.status = status
    self.createdOn = createdOn
    self.updatedOn = updatedOn
    self.checkedOutOn = checkedOutOn
    self.addressId = addressId
    self.totalPrice = totalPrice
    self.discountedPrice = discountedPrice
    self.couponCode = couponCode
    self.pickupStoreId = pickupStoreId
    self.message = message
    self.wallet_amount = wallet_amount

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.lines = []
          (_etype17, _size14) = iprot.readListBegin()
          for _i18 in xrange(_size14):
            _elem19 = Line()
            _elem19.read(iprot)
            self.lines.append(_elem19)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.createdOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.updatedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.checkedOutOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.addressId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.DOUBLE:
          self.totalPrice = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.DOUBLE:
          self.discountedPrice = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.couponCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.pickupStoreId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.message = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.DOUBLE:
          self.wallet_amount = iprot.readDouble();
        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('Cart')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.lines is not None:
      oprot.writeFieldBegin('lines', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.lines))
      for iter20 in self.lines:
        iter20.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 3)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.createdOn is not None:
      oprot.writeFieldBegin('createdOn', TType.I64, 4)
      oprot.writeI64(self.createdOn)
      oprot.writeFieldEnd()
    if self.updatedOn is not None:
      oprot.writeFieldBegin('updatedOn', TType.I64, 5)
      oprot.writeI64(self.updatedOn)
      oprot.writeFieldEnd()
    if self.checkedOutOn is not None:
      oprot.writeFieldBegin('checkedOutOn', TType.I64, 6)
      oprot.writeI64(self.checkedOutOn)
      oprot.writeFieldEnd()
    if self.addressId is not None:
      oprot.writeFieldBegin('addressId', TType.I64, 7)
      oprot.writeI64(self.addressId)
      oprot.writeFieldEnd()
    if self.totalPrice is not None:
      oprot.writeFieldBegin('totalPrice', TType.DOUBLE, 8)
      oprot.writeDouble(self.totalPrice)
      oprot.writeFieldEnd()
    if self.discountedPrice is not None:
      oprot.writeFieldBegin('discountedPrice', TType.DOUBLE, 9)
      oprot.writeDouble(self.discountedPrice)
      oprot.writeFieldEnd()
    if self.couponCode is not None:
      oprot.writeFieldBegin('couponCode', TType.STRING, 10)
      oprot.writeString(self.couponCode)
      oprot.writeFieldEnd()
    if self.pickupStoreId is not None:
      oprot.writeFieldBegin('pickupStoreId', TType.I64, 11)
      oprot.writeI64(self.pickupStoreId)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 12)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    if self.wallet_amount is not None:
      oprot.writeFieldBegin('wallet_amount', TType.DOUBLE, 13)
      oprot.writeDouble(self.wallet_amount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 CartPlus:
  """
  Attributes:
   - cart
   - pinCode
   - needInsuranceInfo
   - validateCartMessages
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cart', (Cart, Cart.thrift_spec), None, ), # 1
    (2, TType.STRING, 'pinCode', None, None, ), # 2
    (3, TType.BOOL, 'needInsuranceInfo', None, None, ), # 3
    (4, TType.LIST, 'validateCartMessages', (TType.STRING,None), None, ), # 4
  )

  def __init__(self, cart=None, pinCode=None, needInsuranceInfo=None, validateCartMessages=None,):
    self.cart = cart
    self.pinCode = pinCode
    self.needInsuranceInfo = needInsuranceInfo
    self.validateCartMessages = validateCartMessages

  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.cart = Cart()
          self.cart.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.pinCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.needInsuranceInfo = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.validateCartMessages = []
          (_etype24, _size21) = iprot.readListBegin()
          for _i25 in xrange(_size21):
            _elem26 = iprot.readString();
            self.validateCartMessages.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('CartPlus')
    if self.cart is not None:
      oprot.writeFieldBegin('cart', TType.STRUCT, 1)
      self.cart.write(oprot)
      oprot.writeFieldEnd()
    if self.pinCode is not None:
      oprot.writeFieldBegin('pinCode', TType.STRING, 2)
      oprot.writeString(self.pinCode)
      oprot.writeFieldEnd()
    if self.needInsuranceInfo is not None:
      oprot.writeFieldBegin('needInsuranceInfo', TType.BOOL, 3)
      oprot.writeBool(self.needInsuranceInfo)
      oprot.writeFieldEnd()
    if self.validateCartMessages is not None:
      oprot.writeFieldBegin('validateCartMessages', TType.LIST, 4)
      oprot.writeListBegin(TType.STRING, len(self.validateCartMessages))
      for iter27 in self.validateCartMessages:
        oprot.writeString(iter27)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 UserWidgetItem:
  """
  Attributes:
   - userId
   - widgetId
   - itemId
   - addedOn
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'userId', None, None, ), # 1
    (2, TType.I64, 'widgetId', None, None, ), # 2
    (3, TType.I64, 'itemId', None, None, ), # 3
    (4, TType.I64, 'addedOn', None, None, ), # 4
  )

  def __init__(self, userId=None, widgetId=None, itemId=None, addedOn=None,):
    self.userId = userId
    self.widgetId = widgetId
    self.itemId = itemId
    self.addedOn = addedOn

  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.I64:
          self.userId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.widgetId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.addedOn = iprot.readI64();
        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('UserWidgetItem')
    if self.userId is not None:
      oprot.writeFieldBegin('userId', TType.I64, 1)
      oprot.writeI64(self.userId)
      oprot.writeFieldEnd()
    if self.widgetId is not None:
      oprot.writeFieldBegin('widgetId', TType.I64, 2)
      oprot.writeI64(self.widgetId)
      oprot.writeFieldEnd()
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 3)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.addedOn is not None:
      oprot.writeFieldBegin('addedOn', TType.I64, 4)
      oprot.writeI64(self.addedOn)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 WidgetException(Exception):
  """
  Attributes:
   - id
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'message', None, None, ), # 2
  )

  def __init__(self, id=None, message=None,):
    self.id = id
    self.message = message

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.message = 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('WidgetException')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 2)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  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 PromotionException(Exception):
  """
  Exceptions for Promotion Service

  Attributes:
   - id
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'message', None, None, ), # 2
  )

  def __init__(self, id=None, message=None,):
    self.id = id
    self.message = message

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.message = 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('PromotionException')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 2)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  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 Promotion:
  """
  Types for Promotion Service

  Attributes:
   - id
   - name
   - ruleExecutionSrc
   - startOn
   - endOn
   - createdOn
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.STRING, 'ruleExecutionSrc', None, None, ), # 3
    (4, TType.I64, 'startOn', None, None, ), # 4
    (5, TType.I64, 'endOn', None, None, ), # 5
    (6, TType.I64, 'createdOn', None, None, ), # 6
  )

  def __init__(self, id=None, name=None, ruleExecutionSrc=None, startOn=None, endOn=None, createdOn=None,):
    self.id = id
    self.name = name
    self.ruleExecutionSrc = ruleExecutionSrc
    self.startOn = startOn
    self.endOn = endOn
    self.createdOn = createdOn

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.ruleExecutionSrc = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.startOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.endOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.createdOn = iprot.readI64();
        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('Promotion')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.ruleExecutionSrc is not None:
      oprot.writeFieldBegin('ruleExecutionSrc', TType.STRING, 3)
      oprot.writeString(self.ruleExecutionSrc)
      oprot.writeFieldEnd()
    if self.startOn is not None:
      oprot.writeFieldBegin('startOn', TType.I64, 4)
      oprot.writeI64(self.startOn)
      oprot.writeFieldEnd()
    if self.endOn is not None:
      oprot.writeFieldBegin('endOn', TType.I64, 5)
      oprot.writeI64(self.endOn)
      oprot.writeFieldEnd()
    if self.createdOn is not None:
      oprot.writeFieldBegin('createdOn', TType.I64, 6)
      oprot.writeI64(self.createdOn)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 Counter:
  """
  Attributes:
   - id
   - code
   - name
   - ownerName
   - email
   - mobile
   - alternateMobile
   - striker
   - tin
   - spCounterSize
   - fpCounterSize
   - dob
   - addedOn
   - address
   - documentVerified
   - verificationType
   - verifiedOn
   - gstin
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'code', None, None, ), # 2
    (3, TType.STRING, 'name', None, None, ), # 3
    (4, TType.STRING, 'ownerName', None, None, ), # 4
    (5, TType.STRING, 'email', None, None, ), # 5
    (6, TType.STRING, 'mobile', None, None, ), # 6
    (7, TType.STRING, 'alternateMobile', None, None, ), # 7
    (8, TType.BOOL, 'striker', None, None, ), # 8
    (9, TType.STRING, 'tin', None, None, ), # 9
    (10, TType.I64, 'spCounterSize', None, None, ), # 10
    (11, TType.I64, 'fpCounterSize', None, None, ), # 11
    (12, TType.STRING, 'dob', None, None, ), # 12
    (13, TType.I64, 'addedOn', None, None, ), # 13
    (14, TType.I64, 'address', None, None, ), # 14
    (15, TType.BOOL, 'documentVerified', None, None, ), # 15
    (16, TType.I32, 'verificationType', None, None, ), # 16
    (17, TType.I64, 'verifiedOn', None, None, ), # 17
    (18, TType.STRING, 'gstin', None, None, ), # 18
  )

  def __init__(self, id=None, code=None, name=None, ownerName=None, email=None, mobile=None, alternateMobile=None, striker=None, tin=None, spCounterSize=None, fpCounterSize=None, dob=None, addedOn=None, address=None, documentVerified=None, verificationType=None, verifiedOn=None, gstin=None,):
    self.id = id
    self.code = code
    self.name = name
    self.ownerName = ownerName
    self.email = email
    self.mobile = mobile
    self.alternateMobile = alternateMobile
    self.striker = striker
    self.tin = tin
    self.spCounterSize = spCounterSize
    self.fpCounterSize = fpCounterSize
    self.dob = dob
    self.addedOn = addedOn
    self.address = address
    self.documentVerified = documentVerified
    self.verificationType = verificationType
    self.verifiedOn = verifiedOn
    self.gstin = gstin

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.code = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.ownerName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.email = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.mobile = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.alternateMobile = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.BOOL:
          self.striker = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.tin = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.spCounterSize = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.fpCounterSize = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.STRING:
          self.dob = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I64:
          self.addedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.I64:
          self.address = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.BOOL:
          self.documentVerified = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.I32:
          self.verificationType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.I64:
          self.verifiedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.STRING:
          self.gstin = 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('Counter')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.code is not None:
      oprot.writeFieldBegin('code', TType.STRING, 2)
      oprot.writeString(self.code)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 3)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.ownerName is not None:
      oprot.writeFieldBegin('ownerName', TType.STRING, 4)
      oprot.writeString(self.ownerName)
      oprot.writeFieldEnd()
    if self.email is not None:
      oprot.writeFieldBegin('email', TType.STRING, 5)
      oprot.writeString(self.email)
      oprot.writeFieldEnd()
    if self.mobile is not None:
      oprot.writeFieldBegin('mobile', TType.STRING, 6)
      oprot.writeString(self.mobile)
      oprot.writeFieldEnd()
    if self.alternateMobile is not None:
      oprot.writeFieldBegin('alternateMobile', TType.STRING, 7)
      oprot.writeString(self.alternateMobile)
      oprot.writeFieldEnd()
    if self.striker is not None:
      oprot.writeFieldBegin('striker', TType.BOOL, 8)
      oprot.writeBool(self.striker)
      oprot.writeFieldEnd()
    if self.tin is not None:
      oprot.writeFieldBegin('tin', TType.STRING, 9)
      oprot.writeString(self.tin)
      oprot.writeFieldEnd()
    if self.spCounterSize is not None:
      oprot.writeFieldBegin('spCounterSize', TType.I64, 10)
      oprot.writeI64(self.spCounterSize)
      oprot.writeFieldEnd()
    if self.fpCounterSize is not None:
      oprot.writeFieldBegin('fpCounterSize', TType.I64, 11)
      oprot.writeI64(self.fpCounterSize)
      oprot.writeFieldEnd()
    if self.dob is not None:
      oprot.writeFieldBegin('dob', TType.STRING, 12)
      oprot.writeString(self.dob)
      oprot.writeFieldEnd()
    if self.addedOn is not None:
      oprot.writeFieldBegin('addedOn', TType.I64, 13)
      oprot.writeI64(self.addedOn)
      oprot.writeFieldEnd()
    if self.address is not None:
      oprot.writeFieldBegin('address', TType.I64, 14)
      oprot.writeI64(self.address)
      oprot.writeFieldEnd()
    if self.documentVerified is not None:
      oprot.writeFieldBegin('documentVerified', TType.BOOL, 15)
      oprot.writeBool(self.documentVerified)
      oprot.writeFieldEnd()
    if self.verificationType is not None:
      oprot.writeFieldBegin('verificationType', TType.I32, 16)
      oprot.writeI32(self.verificationType)
      oprot.writeFieldEnd()
    if self.verifiedOn is not None:
      oprot.writeFieldBegin('verifiedOn', TType.I64, 17)
      oprot.writeI64(self.verifiedOn)
      oprot.writeFieldEnd()
    if self.gstin is not None:
      oprot.writeFieldBegin('gstin', TType.STRING, 18)
      oprot.writeString(self.gstin)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 CounterOnlineInfo:
  """
  Attributes:
   - counterId
   - tinNumber
   - cstNumber
   - dealerName
   - dealerAddress
   - state
   - pan
   - registrationDate
   - registrationStatus
   - validatedTill
   - created
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'counterId', None, None, ), # 1
    (2, TType.STRING, 'tinNumber', None, None, ), # 2
    (3, TType.STRING, 'cstNumber', None, None, ), # 3
    (4, TType.STRING, 'dealerName', None, None, ), # 4
    (5, TType.STRING, 'dealerAddress', None, None, ), # 5
    (6, TType.STRING, 'state', None, None, ), # 6
    (7, TType.STRING, 'pan', None, None, ), # 7
    (8, TType.I64, 'registrationDate', None, None, ), # 8
    (9, TType.BOOL, 'registrationStatus', None, None, ), # 9
    (10, TType.I64, 'validatedTill', None, None, ), # 10
    (11, TType.I64, 'created', None, None, ), # 11
  )

  def __init__(self, counterId=None, tinNumber=None, cstNumber=None, dealerName=None, dealerAddress=None, state=None, pan=None, registrationDate=None, registrationStatus=None, validatedTill=None, created=None,):
    self.counterId = counterId
    self.tinNumber = tinNumber
    self.cstNumber = cstNumber
    self.dealerName = dealerName
    self.dealerAddress = dealerAddress
    self.state = state
    self.pan = pan
    self.registrationDate = registrationDate
    self.registrationStatus = registrationStatus
    self.validatedTill = validatedTill
    self.created = created

  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.I64:
          self.counterId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.tinNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.cstNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.dealerName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.dealerAddress = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.state = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.pan = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.registrationDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.BOOL:
          self.registrationStatus = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.validatedTill = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.created = iprot.readI64();
        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('CounterOnlineInfo')
    if self.counterId is not None:
      oprot.writeFieldBegin('counterId', TType.I64, 1)
      oprot.writeI64(self.counterId)
      oprot.writeFieldEnd()
    if self.tinNumber is not None:
      oprot.writeFieldBegin('tinNumber', TType.STRING, 2)
      oprot.writeString(self.tinNumber)
      oprot.writeFieldEnd()
    if self.cstNumber is not None:
      oprot.writeFieldBegin('cstNumber', TType.STRING, 3)
      oprot.writeString(self.cstNumber)
      oprot.writeFieldEnd()
    if self.dealerName is not None:
      oprot.writeFieldBegin('dealerName', TType.STRING, 4)
      oprot.writeString(self.dealerName)
      oprot.writeFieldEnd()
    if self.dealerAddress is not None:
      oprot.writeFieldBegin('dealerAddress', TType.STRING, 5)
      oprot.writeString(self.dealerAddress)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.STRING, 6)
      oprot.writeString(self.state)
      oprot.writeFieldEnd()
    if self.pan is not None:
      oprot.writeFieldBegin('pan', TType.STRING, 7)
      oprot.writeString(self.pan)
      oprot.writeFieldEnd()
    if self.registrationDate is not None:
      oprot.writeFieldBegin('registrationDate', TType.I64, 8)
      oprot.writeI64(self.registrationDate)
      oprot.writeFieldEnd()
    if self.registrationStatus is not None:
      oprot.writeFieldBegin('registrationStatus', TType.BOOL, 9)
      oprot.writeBool(self.registrationStatus)
      oprot.writeFieldEnd()
    if self.validatedTill is not None:
      oprot.writeFieldBegin('validatedTill', TType.I64, 10)
      oprot.writeI64(self.validatedTill)
      oprot.writeFieldEnd()
    if self.created is not None:
      oprot.writeFieldBegin('created', TType.I64, 11)
      oprot.writeI64(self.created)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 Coupon:
  """
  Attributes:
   - couponCode
   - promotion
   - arguments
   - coupon_category
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'couponCode', None, None, ), # 1
    (2, TType.STRUCT, 'promotion', (Promotion, Promotion.thrift_spec), None, ), # 2
    (3, TType.STRING, 'arguments', None, None, ), # 3
    (4, TType.I32, 'coupon_category', None, None, ), # 4
  )

  def __init__(self, couponCode=None, promotion=None, arguments=None, coupon_category=None,):
    self.couponCode = couponCode
    self.promotion = promotion
    self.arguments = arguments
    self.coupon_category = coupon_category

  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.STRING:
          self.couponCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.promotion = Promotion()
          self.promotion.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.arguments = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.coupon_category = 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('Coupon')
    if self.couponCode is not None:
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
      oprot.writeString(self.couponCode)
      oprot.writeFieldEnd()
    if self.promotion is not None:
      oprot.writeFieldBegin('promotion', TType.STRUCT, 2)
      self.promotion.write(oprot)
      oprot.writeFieldEnd()
    if self.arguments is not None:
      oprot.writeFieldBegin('arguments', TType.STRING, 3)
      oprot.writeString(self.arguments)
      oprot.writeFieldEnd()
    if self.coupon_category is not None:
      oprot.writeFieldBegin('coupon_category', TType.I32, 4)
      oprot.writeI32(self.coupon_category)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 PromotionTracking:
  """
  Attributes:
   - couponCode
   - transactionId
   - userId
   - appliedOn
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'couponCode', None, None, ), # 1
    (2, TType.I64, 'transactionId', None, None, ), # 2
    (3, TType.I64, 'userId', None, None, ), # 3
    (4, TType.BOOL, 'appliedOn', None, None, ), # 4
  )

  def __init__(self, couponCode=None, transactionId=None, userId=None, appliedOn=None,):
    self.couponCode = couponCode
    self.transactionId = transactionId
    self.userId = userId
    self.appliedOn = appliedOn

  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.STRING:
          self.couponCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.transactionId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.userId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.appliedOn = iprot.readBool();
        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('PromotionTracking')
    if self.couponCode is not None:
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
      oprot.writeString(self.couponCode)
      oprot.writeFieldEnd()
    if self.transactionId is not None:
      oprot.writeFieldBegin('transactionId', TType.I64, 2)
      oprot.writeI64(self.transactionId)
      oprot.writeFieldEnd()
    if self.userId is not None:
      oprot.writeFieldBegin('userId', TType.I64, 3)
      oprot.writeI64(self.userId)
      oprot.writeFieldEnd()
    if self.appliedOn is not None:
      oprot.writeFieldBegin('appliedOn', TType.BOOL, 4)
      oprot.writeBool(self.appliedOn)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 ItemCouponDiscount:
  """
  Attributes:
   - itemId
   - couponCode
   - discount
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.STRING, 'couponCode', None, None, ), # 2
    (3, TType.DOUBLE, 'discount', None, None, ), # 3
  )

  def __init__(self, itemId=None, couponCode=None, discount=None,):
    self.itemId = itemId
    self.couponCode = couponCode
    self.discount = discount

  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.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.couponCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.DOUBLE:
          self.discount = iprot.readDouble();
        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('ItemCouponDiscount')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.couponCode is not None:
      oprot.writeFieldBegin('couponCode', TType.STRING, 2)
      oprot.writeString(self.couponCode)
      oprot.writeFieldEnd()
    if self.discount is not None:
      oprot.writeFieldBegin('discount', TType.DOUBLE, 3)
      oprot.writeDouble(self.discount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 Voucher:
  """
  Attributes:
   - id
   - voucherCode
   - voucherType
   - issuedOn
   - amount
   - expiredOn
   - userEmail
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'voucherCode', None, None, ), # 2
    (3, TType.I32, 'voucherType', None, None, ), # 3
    (4, TType.I64, 'issuedOn', None, None, ), # 4
    (5, TType.DOUBLE, 'amount', None, None, ), # 5
    (6, TType.I64, 'expiredOn', None, None, ), # 6
    (7, TType.STRING, 'userEmail', None, None, ), # 7
  )

  def __init__(self, id=None, voucherCode=None, voucherType=None, issuedOn=None, amount=None, expiredOn=None, userEmail=None,):
    self.id = id
    self.voucherCode = voucherCode
    self.voucherType = voucherType
    self.issuedOn = issuedOn
    self.amount = amount
    self.expiredOn = expiredOn
    self.userEmail = userEmail

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.voucherCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.voucherType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.issuedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.DOUBLE:
          self.amount = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.expiredOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.userEmail = 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('Voucher')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.voucherCode is not None:
      oprot.writeFieldBegin('voucherCode', TType.STRING, 2)
      oprot.writeString(self.voucherCode)
      oprot.writeFieldEnd()
    if self.voucherType is not None:
      oprot.writeFieldBegin('voucherType', TType.I32, 3)
      oprot.writeI32(self.voucherType)
      oprot.writeFieldEnd()
    if self.issuedOn is not None:
      oprot.writeFieldBegin('issuedOn', TType.I64, 4)
      oprot.writeI64(self.issuedOn)
      oprot.writeFieldEnd()
    if self.amount is not None:
      oprot.writeFieldBegin('amount', TType.DOUBLE, 5)
      oprot.writeDouble(self.amount)
      oprot.writeFieldEnd()
    if self.expiredOn is not None:
      oprot.writeFieldBegin('expiredOn', TType.I64, 6)
      oprot.writeI64(self.expiredOn)
      oprot.writeFieldEnd()
    if self.userEmail is not None:
      oprot.writeFieldBegin('userEmail', TType.STRING, 7)
      oprot.writeString(self.userEmail)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 PrivateDealUser:
  """
  Attributes:
   - userId
   - addedOn
   - isActive
   - counterId
   - tin
   - bulkShipmentAmountLimit
   - creditorAssigned
   - tinVerified
   - isFofo
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'userId', None, None, ), # 1
    (2, TType.I64, 'addedOn', None, None, ), # 2
    (3, TType.BOOL, 'isActive', None, None, ), # 3
    (4, TType.I64, 'counterId', None, None, ), # 4
    (5, TType.STRING, 'tin', None, None, ), # 5
    (6, TType.DOUBLE, 'bulkShipmentAmountLimit', None, None, ), # 6
    (7, TType.BOOL, 'creditorAssigned', None, None, ), # 7
    (8, TType.BOOL, 'tinVerified', None, None, ), # 8
    (9, TType.I64, 'isFofo', None, None, ), # 9
  )

  def __init__(self, userId=None, addedOn=None, isActive=None, counterId=None, tin=None, bulkShipmentAmountLimit=None, creditorAssigned=None, tinVerified=None, isFofo=None,):
    self.userId = userId
    self.addedOn = addedOn
    self.isActive = isActive
    self.counterId = counterId
    self.tin = tin
    self.bulkShipmentAmountLimit = bulkShipmentAmountLimit
    self.creditorAssigned = creditorAssigned
    self.tinVerified = tinVerified
    self.isFofo = isFofo

  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.I64:
          self.userId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.addedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.isActive = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.counterId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.tin = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.DOUBLE:
          self.bulkShipmentAmountLimit = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.creditorAssigned = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.BOOL:
          self.tinVerified = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I64:
          self.isFofo = iprot.readI64();
        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('PrivateDealUser')
    if self.userId is not None:
      oprot.writeFieldBegin('userId', TType.I64, 1)
      oprot.writeI64(self.userId)
      oprot.writeFieldEnd()
    if self.addedOn is not None:
      oprot.writeFieldBegin('addedOn', TType.I64, 2)
      oprot.writeI64(self.addedOn)
      oprot.writeFieldEnd()
    if self.isActive is not None:
      oprot.writeFieldBegin('isActive', TType.BOOL, 3)
      oprot.writeBool(self.isActive)
      oprot.writeFieldEnd()
    if self.counterId is not None:
      oprot.writeFieldBegin('counterId', TType.I64, 4)
      oprot.writeI64(self.counterId)
      oprot.writeFieldEnd()
    if self.tin is not None:
      oprot.writeFieldBegin('tin', TType.STRING, 5)
      oprot.writeString(self.tin)
      oprot.writeFieldEnd()
    if self.bulkShipmentAmountLimit is not None:
      oprot.writeFieldBegin('bulkShipmentAmountLimit', TType.DOUBLE, 6)
      oprot.writeDouble(self.bulkShipmentAmountLimit)
      oprot.writeFieldEnd()
    if self.creditorAssigned is not None:
      oprot.writeFieldBegin('creditorAssigned', TType.BOOL, 7)
      oprot.writeBool(self.creditorAssigned)
      oprot.writeFieldEnd()
    if self.tinVerified is not None:
      oprot.writeFieldBegin('tinVerified', TType.BOOL, 8)
      oprot.writeBool(self.tinVerified)
      oprot.writeFieldEnd()
    if self.isFofo is not None:
      oprot.writeFieldBegin('isFofo', TType.I64, 9)
      oprot.writeI64(self.isFofo)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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 AccessTokenizer:
  """
  Attributes:
   - id
   - userId
   - source
   - tokenString
   - expiredTime
   - expired
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'userId', None, None, ), # 2
    (3, TType.STRING, 'source', None, None, ), # 3
    (4, TType.STRING, 'tokenString', None, None, ), # 4
    (5, TType.I64, 'expiredTime', None, None, ), # 5
    (6, TType.BOOL, 'expired', None, None, ), # 6
  )

  def __init__(self, id=None, userId=None, source=None, tokenString=None, expiredTime=None, expired=None,):
    self.id = id
    self.userId = userId
    self.source = source
    self.tokenString = tokenString
    self.expiredTime = expiredTime
    self.expired = expired

  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.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.userId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.source = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.tokenString = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.expiredTime = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.BOOL:
          self.expired = iprot.readBool();
        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('AccessTokenizer')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.userId is not None:
      oprot.writeFieldBegin('userId', TType.I64, 2)
      oprot.writeI64(self.userId)
      oprot.writeFieldEnd()
    if self.source is not None:
      oprot.writeFieldBegin('source', TType.STRING, 3)
      oprot.writeString(self.source)
      oprot.writeFieldEnd()
    if self.tokenString is not None:
      oprot.writeFieldBegin('tokenString', TType.STRING, 4)
      oprot.writeString(self.tokenString)
      oprot.writeFieldEnd()
    if self.expiredTime is not None:
      oprot.writeFieldBegin('expiredTime', TType.I64, 5)
      oprot.writeI64(self.expiredTime)
      oprot.writeFieldEnd()
    if self.expired is not None:
      oprot.writeFieldBegin('expired', TType.BOOL, 6)
      oprot.writeBool(self.expired)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  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)