Subversion Repositories SmartDukaan

Rev

Rev 9049 | 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 NetworkSettingType:
  GOOGLE_SEARCH_AND_SEARCH_NETWORK = 1
  DISPLAY_NETWORK = 2
  GOOGLE_PARTNER_SEARCH_NETWORK = 3
  SEARCH_AND_DISPLAY_NETWORK = 4
  DISPLAY_AND_PARTNER_NETWORK = 5
  SEARCH_AND_PARTNER_NETWORK = 6
  ALL_AVALIABLE_SOURCES = 7

  _VALUES_TO_NAMES = {
    1: "GOOGLE_SEARCH_AND_SEARCH_NETWORK",
    2: "DISPLAY_NETWORK",
    3: "GOOGLE_PARTNER_SEARCH_NETWORK",
    4: "SEARCH_AND_DISPLAY_NETWORK",
    5: "DISPLAY_AND_PARTNER_NETWORK",
    6: "SEARCH_AND_PARTNER_NETWORK",
    7: "ALL_AVALIABLE_SOURCES",
  }

  _NAMES_TO_VALUES = {
    "GOOGLE_SEARCH_AND_SEARCH_NETWORK": 1,
    "DISPLAY_NETWORK": 2,
    "GOOGLE_PARTNER_SEARCH_NETWORK": 3,
    "SEARCH_AND_DISPLAY_NETWORK": 4,
    "DISPLAY_AND_PARTNER_NETWORK": 5,
    "SEARCH_AND_PARTNER_NETWORK": 6,
    "ALL_AVALIABLE_SOURCES": 7,
  }

class AdwordsCampaignStatus:
  ACTIVE = 1
  PAUSED = 2
  DELETED = 3

  _VALUES_TO_NAMES = {
    1: "ACTIVE",
    2: "PAUSED",
    3: "DELETED",
  }

  _NAMES_TO_VALUES = {
    "ACTIVE": 1,
    "PAUSED": 2,
    "DELETED": 3,
  }

class AdwordsAdGroupStatus:
  ENABLED = 1
  PAUSED = 2
  DELETED = 3

  _VALUES_TO_NAMES = {
    1: "ENABLED",
    2: "PAUSED",
    3: "DELETED",
  }

  _NAMES_TO_VALUES = {
    "ENABLED": 1,
    "PAUSED": 2,
    "DELETED": 3,
  }

class KeywordMatchType:
  EXACT = 1
  PHRASE = 2
  BROAD = 3

  _VALUES_TO_NAMES = {
    1: "EXACT",
    2: "PHRASE",
    3: "BROAD",
  }

  _NAMES_TO_VALUES = {
    "EXACT": 1,
    "PHRASE": 2,
    "BROAD": 3,
  }


class GoogleAdwordsServiceException(Exception):
  """
  Exceptions

  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('GoogleAdwordsServiceException')
    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 AdwordsCampaign:
  """
  Attributes:
   - id
   - campaignId
   - name
   - status
   - startDate
   - endDate
   - budgetAmount
   - networkType
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'campaignId', None, None, ), # 2
    (3, TType.STRING, 'name', None, None, ), # 3
    (4, TType.I32, 'status', None, None, ), # 4
    (5, TType.I64, 'startDate', None, None, ), # 5
    (6, TType.I64, 'endDate', None, None, ), # 6
    (7, TType.DOUBLE, 'budgetAmount', None, None, ), # 7
    (8, TType.I32, 'networkType', None, None, ), # 8
  )

  def __init__(self, id=None, campaignId=None, name=None, status=None, startDate=None, endDate=None, budgetAmount=None, networkType=None,):
    self.id = id
    self.campaignId = campaignId
    self.name = name
    self.status = status
    self.startDate = startDate
    self.endDate = endDate
    self.budgetAmount = budgetAmount
    self.networkType = networkType

  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.campaignId = iprot.readI64();
        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.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.startDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.endDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.DOUBLE:
          self.budgetAmount = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I32:
          self.networkType = 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('AdwordsCampaign')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.campaignId is not None:
      oprot.writeFieldBegin('campaignId', TType.I64, 2)
      oprot.writeI64(self.campaignId)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 3)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 4)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.startDate is not None:
      oprot.writeFieldBegin('startDate', TType.I64, 5)
      oprot.writeI64(self.startDate)
      oprot.writeFieldEnd()
    if self.endDate is not None:
      oprot.writeFieldBegin('endDate', TType.I64, 6)
      oprot.writeI64(self.endDate)
      oprot.writeFieldEnd()
    if self.budgetAmount is not None:
      oprot.writeFieldBegin('budgetAmount', TType.DOUBLE, 7)
      oprot.writeDouble(self.budgetAmount)
      oprot.writeFieldEnd()
    if self.networkType is not None:
      oprot.writeFieldBegin('networkType', TType.I32, 8)
      oprot.writeI32(self.networkType)
      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 AdwordsAdGroup:
  """
  Attributes:
   - id
   - campaignId
   - adgroupId
   - catalogItemId
   - name
   - status
   - bidAmount
   - stockLinked
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'campaignId', None, None, ), # 2
    (3, TType.I64, 'adgroupId', None, None, ), # 3
    (4, TType.I64, 'catalogItemId', None, None, ), # 4
    (5, TType.STRING, 'name', None, None, ), # 5
    (6, TType.I32, 'status', None, None, ), # 6
    (7, TType.DOUBLE, 'bidAmount', None, None, ), # 7
    (8, TType.I32, 'stockLinked', None, None, ), # 8
  )

  def __init__(self, id=None, campaignId=None, adgroupId=None, catalogItemId=None, name=None, status=None, bidAmount=None, stockLinked=None,):
    self.id = id
    self.campaignId = campaignId
    self.adgroupId = adgroupId
    self.catalogItemId = catalogItemId
    self.name = name
    self.status = status
    self.bidAmount = bidAmount
    self.stockLinked = stockLinked

  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.campaignId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.adgroupId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.catalogItemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.status = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.DOUBLE:
          self.bidAmount = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I32:
          self.stockLinked = 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('AdwordsAdGroup')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.campaignId is not None:
      oprot.writeFieldBegin('campaignId', TType.I64, 2)
      oprot.writeI64(self.campaignId)
      oprot.writeFieldEnd()
    if self.adgroupId is not None:
      oprot.writeFieldBegin('adgroupId', TType.I64, 3)
      oprot.writeI64(self.adgroupId)
      oprot.writeFieldEnd()
    if self.catalogItemId is not None:
      oprot.writeFieldBegin('catalogItemId', TType.I64, 4)
      oprot.writeI64(self.catalogItemId)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 5)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.status is not None:
      oprot.writeFieldBegin('status', TType.I32, 6)
      oprot.writeI32(self.status)
      oprot.writeFieldEnd()
    if self.bidAmount is not None:
      oprot.writeFieldBegin('bidAmount', TType.DOUBLE, 7)
      oprot.writeDouble(self.bidAmount)
      oprot.writeFieldEnd()
    if self.stockLinked is not None:
      oprot.writeFieldBegin('stockLinked', TType.I32, 8)
      oprot.writeI32(self.stockLinked)
      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 AdwordsAdGroupAd:
  """
  Attributes:
   - id
   - campaignId
   - adgroupId
   - adgroupadId
   - headline
   - description1
   - description2
   - url
   - displayUrl
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'campaignId', None, None, ), # 2
    (3, TType.I64, 'adgroupId', None, None, ), # 3
    (4, TType.I64, 'adgroupadId', None, None, ), # 4
    (5, TType.STRING, 'headline', None, None, ), # 5
    (6, TType.STRING, 'description1', None, None, ), # 6
    (7, TType.STRING, 'description2', None, None, ), # 7
    (8, TType.STRING, 'url', None, None, ), # 8
    (9, TType.STRING, 'displayUrl', None, None, ), # 9
  )

  def __init__(self, id=None, campaignId=None, adgroupId=None, adgroupadId=None, headline=None, description1=None, description2=None, url=None, displayUrl=None,):
    self.id = id
    self.campaignId = campaignId
    self.adgroupId = adgroupId
    self.adgroupadId = adgroupadId
    self.headline = headline
    self.description1 = description1
    self.description2 = description2
    self.url = url
    self.displayUrl = displayUrl

  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.campaignId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.adgroupId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.adgroupadId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.headline = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.description1 = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.description2 = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.url = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.displayUrl = 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('AdwordsAdGroupAd')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.campaignId is not None:
      oprot.writeFieldBegin('campaignId', TType.I64, 2)
      oprot.writeI64(self.campaignId)
      oprot.writeFieldEnd()
    if self.adgroupId is not None:
      oprot.writeFieldBegin('adgroupId', TType.I64, 3)
      oprot.writeI64(self.adgroupId)
      oprot.writeFieldEnd()
    if self.adgroupadId is not None:
      oprot.writeFieldBegin('adgroupadId', TType.I64, 4)
      oprot.writeI64(self.adgroupadId)
      oprot.writeFieldEnd()
    if self.headline is not None:
      oprot.writeFieldBegin('headline', TType.STRING, 5)
      oprot.writeString(self.headline)
      oprot.writeFieldEnd()
    if self.description1 is not None:
      oprot.writeFieldBegin('description1', TType.STRING, 6)
      oprot.writeString(self.description1)
      oprot.writeFieldEnd()
    if self.description2 is not None:
      oprot.writeFieldBegin('description2', TType.STRING, 7)
      oprot.writeString(self.description2)
      oprot.writeFieldEnd()
    if self.url is not None:
      oprot.writeFieldBegin('url', TType.STRING, 8)
      oprot.writeString(self.url)
      oprot.writeFieldEnd()
    if self.displayUrl is not None:
      oprot.writeFieldBegin('displayUrl', TType.STRING, 9)
      oprot.writeString(self.displayUrl)
      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 AdwordsAdKeyword:
  """
  Attributes:
   - id
   - campaignId
   - adgroupId
   - criterionId
   - text
   - bidAmount
   - matchType
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'campaignId', None, None, ), # 2
    (3, TType.I64, 'adgroupId', None, None, ), # 3
    (4, TType.I64, 'criterionId', None, None, ), # 4
    (5, TType.STRING, 'text', None, None, ), # 5
    (6, TType.DOUBLE, 'bidAmount', None, None, ), # 6
    (7, TType.I32, 'matchType', None, None, ), # 7
  )

  def __init__(self, id=None, campaignId=None, adgroupId=None, criterionId=None, text=None, bidAmount=None, matchType=None,):
    self.id = id
    self.campaignId = campaignId
    self.adgroupId = adgroupId
    self.criterionId = criterionId
    self.text = text
    self.bidAmount = bidAmount
    self.matchType = matchType

  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.campaignId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.adgroupId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.criterionId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.text = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.DOUBLE:
          self.bidAmount = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I32:
          self.matchType = 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('AdwordsAdKeyword')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.campaignId is not None:
      oprot.writeFieldBegin('campaignId', TType.I64, 2)
      oprot.writeI64(self.campaignId)
      oprot.writeFieldEnd()
    if self.adgroupId is not None:
      oprot.writeFieldBegin('adgroupId', TType.I64, 3)
      oprot.writeI64(self.adgroupId)
      oprot.writeFieldEnd()
    if self.criterionId is not None:
      oprot.writeFieldBegin('criterionId', TType.I64, 4)
      oprot.writeI64(self.criterionId)
      oprot.writeFieldEnd()
    if self.text is not None:
      oprot.writeFieldBegin('text', TType.STRING, 5)
      oprot.writeString(self.text)
      oprot.writeFieldEnd()
    if self.bidAmount is not None:
      oprot.writeFieldBegin('bidAmount', TType.DOUBLE, 6)
      oprot.writeDouble(self.bidAmount)
      oprot.writeFieldEnd()
    if self.matchType is not None:
      oprot.writeFieldBegin('matchType', TType.I32, 7)
      oprot.writeI32(self.matchType)
      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)