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

from thrift.Thrift import TType, TMessageType, TException

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


class LineType(object):
  """
  Author: jwegan@gmail.com (John Egan)
  """
  DEFAULT = 1
  KNOWN_ERROR = 2
  BUILDING_BLOCK = 3
  THIRDPARTY_WHITELIST = 4
  IGNORED_FILEPATH = 5
  BAD_FILEPATH = 6
  RAISED_EXCEPTION = 7

  _VALUES_TO_NAMES = {
    1: "DEFAULT",
    2: "KNOWN_ERROR",
    3: "BUILDING_BLOCK",
    4: "THIRDPARTY_WHITELIST",
    5: "IGNORED_FILEPATH",
    6: "BAD_FILEPATH",
    7: "RAISED_EXCEPTION",
  }

  _NAMES_TO_VALUES = {
    "DEFAULT": 1,
    "KNOWN_ERROR": 2,
    "BUILDING_BLOCK": 3,
    "THIRDPARTY_WHITELIST": 4,
    "IGNORED_FILEPATH": 5,
    "BAD_FILEPATH": 6,
    "RAISED_EXCEPTION": 7,
  }


class ErrorKey(object):
  """
  Attributes:
   - filename
   - line_number
   - function_name
   - text
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'filename', None, None, ), # 1
    (2, TType.I64, 'line_number', None, None, ), # 2
    (3, TType.STRING, 'function_name', None, None, ), # 3
    (4, TType.STRING, 'text', None, None, ), # 4
  )

  def __init__(self, filename=None, line_number=None, function_name=None, text=None,):
    self.filename = filename
    self.line_number = line_number
    self.function_name = function_name
    self.text = text

  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.filename = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.line_number = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.function_name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.text = 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('ErrorKey')
    if self.filename is not None:
      oprot.writeFieldBegin('filename', TType.STRING, 1)
      oprot.writeString(self.filename)
      oprot.writeFieldEnd()
    if self.line_number is not None:
      oprot.writeFieldBegin('line_number', TType.I64, 2)
      oprot.writeI64(self.line_number)
      oprot.writeFieldEnd()
    if self.function_name is not None:
      oprot.writeFieldBegin('function_name', TType.STRING, 3)
      oprot.writeString(self.function_name)
      oprot.writeFieldEnd()
    if self.text is not None:
      oprot.writeFieldBegin('text', TType.STRING, 4)
      oprot.writeString(self.text)
      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 StackLine(object):
  """
  Attributes:
   - filename
   - line_number
   - function_name
   - text
   - frame_locals
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'filename', None, None, ), # 1
    (2, TType.I64, 'line_number', None, None, ), # 2
    (3, TType.STRING, 'function_name', None, None, ), # 3
    (4, TType.STRING, 'text', None, None, ), # 4
    (5, TType.MAP, 'frame_locals', (TType.STRING,None,TType.STRING,None), None, ), # 5
  )

  def __init__(self, filename=None, line_number=None, function_name=None, text=None, frame_locals=None,):
    self.filename = filename
    self.line_number = line_number
    self.function_name = function_name
    self.text = text
    self.frame_locals = frame_locals

  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.filename = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.line_number = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.function_name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.text = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.MAP:
          self.frame_locals = {}
          (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin() 
          for _i4 in xrange(_size0):
            _key5 = iprot.readString();
            _val6 = iprot.readString();
            self.frame_locals[_key5] = _val6
          iprot.readMapEnd()
        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('StackLine')
    if self.filename is not None:
      oprot.writeFieldBegin('filename', TType.STRING, 1)
      oprot.writeString(self.filename)
      oprot.writeFieldEnd()
    if self.line_number is not None:
      oprot.writeFieldBegin('line_number', TType.I64, 2)
      oprot.writeI64(self.line_number)
      oprot.writeFieldEnd()
    if self.function_name is not None:
      oprot.writeFieldBegin('function_name', TType.STRING, 3)
      oprot.writeString(self.function_name)
      oprot.writeFieldEnd()
    if self.text is not None:
      oprot.writeFieldBegin('text', TType.STRING, 4)
      oprot.writeString(self.text)
      oprot.writeFieldEnd()
    if self.frame_locals is not None:
      oprot.writeFieldBegin('frame_locals', TType.MAP, 5)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.frame_locals))
      for kiter7,viter8 in self.frame_locals.items():
        oprot.writeString(kiter7)
        oprot.writeString(viter8)
      oprot.writeMapEnd()
      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 RecordErrorRequest(object):
  """
  Attributes:
   - traceback
   - exception_message
   - hostname
   - error_threshold
   - additional_info
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'traceback', (TType.STRUCT,(StackLine, StackLine.thrift_spec)), None, ), # 1
    (2, TType.STRING, 'exception_message', None, None, ), # 2
    (3, TType.STRING, 'hostname', None, None, ), # 3
    (4, TType.I64, 'error_threshold', None, None, ), # 4
    (5, TType.STRING, 'additional_info', None, None, ), # 5
  )

  def __init__(self, traceback=None, exception_message=None, hostname=None, error_threshold=None, additional_info=None,):
    self.traceback = traceback
    self.exception_message = exception_message
    self.hostname = hostname
    self.error_threshold = error_threshold
    self.additional_info = additional_info

  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.LIST:
          self.traceback = []
          (_etype12, _size9) = iprot.readListBegin()
          for _i13 in xrange(_size9):
            _elem14 = StackLine()
            _elem14.read(iprot)
            self.traceback.append(_elem14)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.exception_message = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.hostname = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.error_threshold = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.additional_info = 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('RecordErrorRequest')
    if self.traceback is not None:
      oprot.writeFieldBegin('traceback', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.traceback))
      for iter15 in self.traceback:
        iter15.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.exception_message is not None:
      oprot.writeFieldBegin('exception_message', TType.STRING, 2)
      oprot.writeString(self.exception_message)
      oprot.writeFieldEnd()
    if self.hostname is not None:
      oprot.writeFieldBegin('hostname', TType.STRING, 3)
      oprot.writeString(self.hostname)
      oprot.writeFieldEnd()
    if self.error_threshold is not None:
      oprot.writeFieldBegin('error_threshold', TType.I64, 4)
      oprot.writeI64(self.error_threshold)
      oprot.writeFieldEnd()
    if self.additional_info is not None:
      oprot.writeFieldBegin('additional_info', TType.STRING, 5)
      oprot.writeString(self.additional_info)
      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 ErrorInfo(object):
  """
  Attributes:
   - error_count
   - developer_email
   - date
   - email_sent
   - last_occurrence
   - is_known_error
   - last_error_data
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'error_count', None, None, ), # 1
    (2, TType.STRING, 'developer_email', None, None, ), # 2
    (3, TType.STRING, 'date', None, None, ), # 3
    (4, TType.BOOL, 'email_sent', None, None, ), # 4
    (5, TType.STRING, 'last_occurrence', None, None, ), # 5
    (6, TType.BOOL, 'is_known_error', None, None, ), # 6
    (7, TType.STRUCT, 'last_error_data', (RecordErrorRequest, RecordErrorRequest.thrift_spec), None, ), # 7
  )

  def __init__(self, error_count=None, developer_email=None, date=None, email_sent=None, last_occurrence=None, is_known_error=None, last_error_data=None,):
    self.error_count = error_count
    self.developer_email = developer_email
    self.date = date
    self.email_sent = email_sent
    self.last_occurrence = last_occurrence
    self.is_known_error = is_known_error
    self.last_error_data = last_error_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.error_count = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.developer_email = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.date = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.email_sent = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.last_occurrence = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.BOOL:
          self.is_known_error = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRUCT:
          self.last_error_data = RecordErrorRequest()
          self.last_error_data.read(iprot)
        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('ErrorInfo')
    if self.error_count is not None:
      oprot.writeFieldBegin('error_count', TType.I64, 1)
      oprot.writeI64(self.error_count)
      oprot.writeFieldEnd()
    if self.developer_email is not None:
      oprot.writeFieldBegin('developer_email', TType.STRING, 2)
      oprot.writeString(self.developer_email)
      oprot.writeFieldEnd()
    if self.date is not None:
      oprot.writeFieldBegin('date', TType.STRING, 3)
      oprot.writeString(self.date)
      oprot.writeFieldEnd()
    if self.email_sent is not None:
      oprot.writeFieldBegin('email_sent', TType.BOOL, 4)
      oprot.writeBool(self.email_sent)
      oprot.writeFieldEnd()
    if self.last_occurrence is not None:
      oprot.writeFieldBegin('last_occurrence', TType.STRING, 5)
      oprot.writeString(self.last_occurrence)
      oprot.writeFieldEnd()
    if self.is_known_error is not None:
      oprot.writeFieldBegin('is_known_error', TType.BOOL, 6)
      oprot.writeBool(self.is_known_error)
      oprot.writeFieldEnd()
    if self.last_error_data is not None:
      oprot.writeFieldBegin('last_error_data', TType.STRUCT, 7)
      self.last_error_data.write(oprot)
      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 EmailRemapping(object):
  """
  Attributes:
   - remap
   - last_update_ts
  """

  thrift_spec = (
    None, # 0
    (1, TType.MAP, 'remap', (TType.STRING,None,TType.STRING,None), {
    }, ), # 1
    (2, TType.I64, 'last_update_ts', None, None, ), # 2
  )

  def __init__(self, remap=thrift_spec[1][4], last_update_ts=None,):
    if remap is self.thrift_spec[1][4]:
      remap = {
    }
    self.remap = remap
    self.last_update_ts = last_update_ts

  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.MAP:
          self.remap = {}
          (_ktype17, _vtype18, _size16 ) = iprot.readMapBegin() 
          for _i20 in xrange(_size16):
            _key21 = iprot.readString();
            _val22 = iprot.readString();
            self.remap[_key21] = _val22
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.last_update_ts = 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('EmailRemapping')
    if self.remap is not None:
      oprot.writeFieldBegin('remap', TType.MAP, 1)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.remap))
      for kiter23,viter24 in self.remap.items():
        oprot.writeString(kiter23)
        oprot.writeString(viter24)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.last_update_ts is not None:
      oprot.writeFieldBegin('last_update_ts', TType.I64, 2)
      oprot.writeI64(self.last_update_ts)
      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 WatchFileEntry(object):
  """
  Attributes:
   - email
   - filepath
   - watch_all_errors
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'email', None, None, ), # 1
    (2, TType.STRING, 'filepath', None, None, ), # 2
    (3, TType.BOOL, 'watch_all_errors', None, None, ), # 3
  )

  def __init__(self, email=None, filepath=None, watch_all_errors=None,):
    self.email = email
    self.filepath = filepath
    self.watch_all_errors = watch_all_errors

  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.email = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.filepath = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.watch_all_errors = 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('WatchFileEntry')
    if self.email is not None:
      oprot.writeFieldBegin('email', TType.STRING, 1)
      oprot.writeString(self.email)
      oprot.writeFieldEnd()
    if self.filepath is not None:
      oprot.writeFieldBegin('filepath', TType.STRING, 2)
      oprot.writeString(self.filepath)
      oprot.writeFieldEnd()
    if self.watch_all_errors is not None:
      oprot.writeFieldBegin('watch_all_errors', TType.BOOL, 3)
      oprot.writeBool(self.watch_all_errors)
      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 WatchList(object):
  """
  Attributes:
   - watches
   - last_update_ts
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'watches', (TType.STRUCT,(WatchFileEntry, WatchFileEntry.thrift_spec)), [
    ], ), # 1
    (2, TType.I64, 'last_update_ts', None, None, ), # 2
  )

  def __init__(self, watches=thrift_spec[1][4], last_update_ts=None,):
    if watches is self.thrift_spec[1][4]:
      watches = [
    ]
    self.watches = watches
    self.last_update_ts = last_update_ts

  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.LIST:
          self.watches = []
          (_etype28, _size25) = iprot.readListBegin()
          for _i29 in xrange(_size25):
            _elem30 = WatchFileEntry()
            _elem30.read(iprot)
            self.watches.append(_elem30)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.last_update_ts = 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('WatchList')
    if self.watches is not None:
      oprot.writeFieldBegin('watches', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.watches))
      for iter31 in self.watches:
        iter31.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.last_update_ts is not None:
      oprot.writeFieldBegin('last_update_ts', TType.I64, 2)
      oprot.writeI64(self.last_update_ts)
      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 KnownError(object):
  """
  Attributes:
   - filename
   - function_name
   - code_fragment
   - min_alert_threshold
   - max_alert_threshold
   - email_recipients
   - email_header
   - alert_every_n_occurences
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'filename', None, None, ), # 1
    (2, TType.STRING, 'function_name', None, None, ), # 2
    (3, TType.STRING, 'code_fragment', None, None, ), # 3
    (4, TType.I64, 'min_alert_threshold', None, None, ), # 4
    (5, TType.I64, 'max_alert_threshold', None, None, ), # 5
    (6, TType.LIST, 'email_recipients', (TType.STRING,None), None, ), # 6
    (7, TType.STRING, 'email_header', None, None, ), # 7
    (8, TType.I64, 'alert_every_n_occurences', None, None, ), # 8
  )

  def __init__(self, filename=None, function_name=None, code_fragment=None, min_alert_threshold=None, max_alert_threshold=None, email_recipients=None, email_header=None, alert_every_n_occurences=None,):
    self.filename = filename
    self.function_name = function_name
    self.code_fragment = code_fragment
    self.min_alert_threshold = min_alert_threshold
    self.max_alert_threshold = max_alert_threshold
    self.email_recipients = email_recipients
    self.email_header = email_header
    self.alert_every_n_occurences = alert_every_n_occurences

  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.filename = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.function_name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.code_fragment = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.min_alert_threshold = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.max_alert_threshold = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.LIST:
          self.email_recipients = []
          (_etype35, _size32) = iprot.readListBegin()
          for _i36 in xrange(_size32):
            _elem37 = iprot.readString();
            self.email_recipients.append(_elem37)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.email_header = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.alert_every_n_occurences = 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('KnownError')
    if self.filename is not None:
      oprot.writeFieldBegin('filename', TType.STRING, 1)
      oprot.writeString(self.filename)
      oprot.writeFieldEnd()
    if self.function_name is not None:
      oprot.writeFieldBegin('function_name', TType.STRING, 2)
      oprot.writeString(self.function_name)
      oprot.writeFieldEnd()
    if self.code_fragment is not None:
      oprot.writeFieldBegin('code_fragment', TType.STRING, 3)
      oprot.writeString(self.code_fragment)
      oprot.writeFieldEnd()
    if self.min_alert_threshold is not None:
      oprot.writeFieldBegin('min_alert_threshold', TType.I64, 4)
      oprot.writeI64(self.min_alert_threshold)
      oprot.writeFieldEnd()
    if self.max_alert_threshold is not None:
      oprot.writeFieldBegin('max_alert_threshold', TType.I64, 5)
      oprot.writeI64(self.max_alert_threshold)
      oprot.writeFieldEnd()
    if self.email_recipients is not None:
      oprot.writeFieldBegin('email_recipients', TType.LIST, 6)
      oprot.writeListBegin(TType.STRING, len(self.email_recipients))
      for iter38 in self.email_recipients:
        oprot.writeString(iter38)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.email_header is not None:
      oprot.writeFieldBegin('email_header', TType.STRING, 7)
      oprot.writeString(self.email_header)
      oprot.writeFieldEnd()
    if self.alert_every_n_occurences is not None:
      oprot.writeFieldBegin('alert_every_n_occurences', TType.I64, 8)
      oprot.writeI64(self.alert_every_n_occurences)
      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 KnownErrorList(object):
  """
  Attributes:
   - identifiers
   - last_update_ts
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'identifiers', (TType.STRUCT,(KnownError, KnownError.thrift_spec)), [
    ], ), # 1
    (2, TType.I64, 'last_update_ts', None, None, ), # 2
  )

  def __init__(self, identifiers=thrift_spec[1][4], last_update_ts=None,):
    if identifiers is self.thrift_spec[1][4]:
      identifiers = [
    ]
    self.identifiers = identifiers
    self.last_update_ts = last_update_ts

  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.LIST:
          self.identifiers = []
          (_etype42, _size39) = iprot.readListBegin()
          for _i43 in xrange(_size39):
            _elem44 = KnownError()
            _elem44.read(iprot)
            self.identifiers.append(_elem44)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.last_update_ts = 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('KnownErrorList')
    if self.identifiers is not None:
      oprot.writeFieldBegin('identifiers', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.identifiers))
      for iter45 in self.identifiers:
        iter45.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.last_update_ts is not None:
      oprot.writeFieldBegin('last_update_ts', TType.I64, 2)
      oprot.writeI64(self.last_update_ts)
      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 CodeIdentifier(object):
  """
  Attributes:
   - filename
   - function_name
   - code_fragment
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'filename', None, None, ), # 1
    (2, TType.STRING, 'function_name', None, None, ), # 2
    (3, TType.STRING, 'code_fragment', None, None, ), # 3
  )

  def __init__(self, filename=None, function_name=None, code_fragment=None,):
    self.filename = filename
    self.function_name = function_name
    self.code_fragment = code_fragment

  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.filename = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.function_name = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.code_fragment = 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('CodeIdentifier')
    if self.filename is not None:
      oprot.writeFieldBegin('filename', TType.STRING, 1)
      oprot.writeString(self.filename)
      oprot.writeFieldEnd()
    if self.function_name is not None:
      oprot.writeFieldBegin('function_name', TType.STRING, 2)
      oprot.writeString(self.function_name)
      oprot.writeFieldEnd()
    if self.code_fragment is not None:
      oprot.writeFieldBegin('code_fragment', TType.STRING, 3)
      oprot.writeString(self.code_fragment)
      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 CodeIdentifierList(object):
  """
  Attributes:
   - identifiers
   - last_update_ts
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'identifiers', (TType.STRUCT,(CodeIdentifier, CodeIdentifier.thrift_spec)), [
    ], ), # 1
    (2, TType.I64, 'last_update_ts', None, None, ), # 2
  )

  def __init__(self, identifiers=thrift_spec[1][4], last_update_ts=None,):
    if identifiers is self.thrift_spec[1][4]:
      identifiers = [
    ]
    self.identifiers = identifiers
    self.last_update_ts = last_update_ts

  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.LIST:
          self.identifiers = []
          (_etype49, _size46) = iprot.readListBegin()
          for _i50 in xrange(_size46):
            _elem51 = CodeIdentifier()
            _elem51.read(iprot)
            self.identifiers.append(_elem51)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.last_update_ts = 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('CodeIdentifierList')
    if self.identifiers is not None:
      oprot.writeFieldBegin('identifiers', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.identifiers))
      for iter52 in self.identifiers:
        iter52.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.last_update_ts is not None:
      oprot.writeFieldBegin('last_update_ts', TType.I64, 2)
      oprot.writeI64(self.last_update_ts)
      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)
