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

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

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


class BackPressure:
  NONE = 0
  ENQUEUE = 1
  DROP_HEAD = 2
  DROP_TAIL = 3
  BLOCK_SENDER = 4

  _VALUES_TO_NAMES = {
    0: "NONE",
    1: "ENQUEUE",
    2: "DROP_HEAD",
    3: "DROP_TAIL",
    4: "BLOCK_SENDER",
  }

  _NAMES_TO_VALUES = {
    "NONE": 0,
    "ENQUEUE": 1,
    "DROP_HEAD": 2,
    "DROP_TAIL": 3,
    "BLOCK_SENDER": 4,
  }

class StreamGrouping:
  ROUND_ROBIN = 0
  SHUFFLE = 1
  GROUP_BY = 2
  LOCAL = 3
  CUSTOM = 100

  _VALUES_TO_NAMES = {
    0: "ROUND_ROBIN",
    1: "SHUFFLE",
    2: "GROUP_BY",
    3: "LOCAL",
    100: "CUSTOM",
  }

  _NAMES_TO_VALUES = {
    "ROUND_ROBIN": 0,
    "SHUFFLE": 1,
    "GROUP_BY": 2,
    "LOCAL": 3,
    "CUSTOM": 100,
  }

class Signal:
  START = 0
  ACTIVE = 1
  INACTIVE = 2
  SHUTDOWN = 3
  KILL = 4

  _VALUES_TO_NAMES = {
    0: "START",
    1: "ACTIVE",
    2: "INACTIVE",
    3: "SHUTDOWN",
    4: "KILL",
  }

  _NAMES_TO_VALUES = {
    "START": 0,
    "ACTIVE": 1,
    "INACTIVE": 2,
    "SHUTDOWN": 3,
    "KILL": 4,
  }

class RecordFlags:
  CLIENT_RECORD = 1
  FRAMEWORK_RECORD = 2

  _VALUES_TO_NAMES = {
    1: "CLIENT_RECORD",
    2: "FRAMEWORK_RECORD",
  }

  _NAMES_TO_VALUES = {
    "CLIENT_RECORD": 1,
    "FRAMEWORK_RECORD": 2,
  }

class AnnotationType:
  CLIENT_SEND = 0
  CLIENT_RECV = 1
  SERVER_SEND = 2
  SERVER_RECV = 3

  _VALUES_TO_NAMES = {
    0: "CLIENT_SEND",
    1: "CLIENT_RECV",
    2: "SERVER_SEND",
    3: "SERVER_RECV",
  }

  _NAMES_TO_VALUES = {
    "CLIENT_SEND": 0,
    "CLIENT_RECV": 1,
    "SERVER_SEND": 2,
    "SERVER_RECV": 3,
  }


class BoltError(TException):
  """
  Attributes:
   - reason
   - context
   - time
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'reason', None, None, ), # 1
    (2, TType.STRING, 'context', None, None, ), # 2
    (3, TType.I64, 'time', None, None, ), # 3
  )

  def __init__(self, reason=None, context=None, time=None,):
    self.reason = reason
    self.context = context
    self.time = time

  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.reason = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.context = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.time = 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('BoltError')
    if self.reason is not None:
      oprot.writeFieldBegin('reason', TType.STRING, 1)
      oprot.writeString(self.reason.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.context is not None:
      oprot.writeFieldBegin('context', TType.STRING, 2)
      oprot.writeString(self.context.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.time is not None:
      oprot.writeFieldBegin('time', TType.I64, 3)
      oprot.writeI64(self.time)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.reason)
    value = (value * 31) ^ hash(self.context)
    value = (value * 31) ^ hash(self.time)
    return value

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

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

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

class Endpoint:
  """
  Attributes:
   - ip
   - port
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'ip', None, None, ), # 1
    (2, TType.I16, 'port', None, None, ), # 2
  )

  def __init__(self, ip=None, port=None,):
    self.ip = ip
    self.port = port

  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.ip = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I16:
          self.port = iprot.readI16();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Endpoint')
    if self.ip is not None:
      oprot.writeFieldBegin('ip', TType.STRING, 1)
      oprot.writeString(self.ip.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.port is not None:
      oprot.writeFieldBegin('port', TType.I16, 2)
      oprot.writeI16(self.port)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.ip)
    value = (value * 31) ^ hash(self.port)
    return value

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

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

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

class StreamMetadata:
  """
  Attributes:
   - name
   - grouping
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'name', None, None, ), # 1
    (2, TType.I32, 'grouping', None,     1, ), # 2
  )

  def __init__(self, name=None, grouping=thrift_spec[2][4],):
    self.name = name
    self.grouping = grouping

  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.name = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.grouping = 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('StreamMetadata')
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 1)
      oprot.writeString(self.name.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.grouping is not None:
      oprot.writeFieldBegin('grouping', TType.I32, 2)
      oprot.writeI32(self.grouping)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.grouping)
    return value

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

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

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

class ComputationMetadata:
  """
  Attributes:
   - name
   - taskId
   - istreams
   - ostreams
   - proxyEndpoint
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'name', None, None, ), # 1
    (2, TType.STRING, 'taskId', None, None, ), # 2
    (3, TType.LIST, 'istreams', (TType.STRUCT,(StreamMetadata, StreamMetadata.thrift_spec)), None, ), # 3
    (4, TType.LIST, 'ostreams', (TType.STRING,None), None, ), # 4
    (5, TType.STRUCT, 'proxyEndpoint', (Endpoint, Endpoint.thrift_spec), None, ), # 5
  )

  def __init__(self, name=None, taskId=None, istreams=None, ostreams=None, proxyEndpoint=None,):
    self.name = name
    self.taskId = taskId
    self.istreams = istreams
    self.ostreams = ostreams
    self.proxyEndpoint = proxyEndpoint

  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.name = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.taskId = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.istreams = []
          (_etype3, _size0) = iprot.readListBegin()
          for _i4 in xrange(_size0):
            _elem5 = StreamMetadata()
            _elem5.read(iprot)
            self.istreams.append(_elem5)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.ostreams = []
          (_etype9, _size6) = iprot.readListBegin()
          for _i10 in xrange(_size6):
            _elem11 = iprot.readString().decode('utf-8')
            self.ostreams.append(_elem11)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRUCT:
          self.proxyEndpoint = Endpoint()
          self.proxyEndpoint.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('ComputationMetadata')
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 1)
      oprot.writeString(self.name.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.taskId is not None:
      oprot.writeFieldBegin('taskId', TType.STRING, 2)
      oprot.writeString(self.taskId.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.istreams is not None:
      oprot.writeFieldBegin('istreams', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.istreams))
      for iter12 in self.istreams:
        iter12.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ostreams is not None:
      oprot.writeFieldBegin('ostreams', TType.LIST, 4)
      oprot.writeListBegin(TType.STRING, len(self.ostreams))
      for iter13 in self.ostreams:
        oprot.writeString(iter13.encode('utf-8'))
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.proxyEndpoint is not None:
      oprot.writeFieldBegin('proxyEndpoint', TType.STRUCT, 5)
      self.proxyEndpoint.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.taskId)
    value = (value * 31) ^ hash(self.istreams)
    value = (value * 31) ^ hash(self.ostreams)
    value = (value * 31) ^ hash(self.proxyEndpoint)
    return value

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

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

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

class ExecutorTaskInfoHelper:
  """
  Attributes:
   - frameworkLoggingLevel
   - user
   - frameworkVModule
   - scheduler
   - proxy
   - client
   - traceAggregator
   - execName
   - folder
   - computationAliasName
   - clientArguments
   - environmentExtra
   - dockerContainer
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'frameworkLoggingLevel', None, 1, ), # 1
    (2, TType.STRING, 'user', None, None, ), # 2
    (3, TType.STRING, 'frameworkVModule', None, None, ), # 3
    (4, TType.STRUCT, 'scheduler', (Endpoint, Endpoint.thrift_spec), None, ), # 4
    (5, TType.STRUCT, 'proxy', (Endpoint, Endpoint.thrift_spec), None, ), # 5
    (6, TType.STRUCT, 'client', (Endpoint, Endpoint.thrift_spec), None, ), # 6
    (7, TType.STRUCT, 'traceAggregator', (Endpoint, Endpoint.thrift_spec), None, ), # 7
    (8, TType.STRING, 'execName', None, None, ), # 8
    (9, TType.STRING, 'folder', None, None, ), # 9
    (10, TType.STRING, 'computationAliasName', None, None, ), # 10
    (11, TType.LIST, 'clientArguments', (TType.STRING,None), None, ), # 11
    (12, TType.LIST, 'environmentExtra', (TType.STRING,None), None, ), # 12
    (13, TType.STRING, 'dockerContainer', None, None, ), # 13
  )

  def __init__(self, frameworkLoggingLevel=thrift_spec[1][4], user=None, frameworkVModule=None, scheduler=None, proxy=None, client=None, traceAggregator=None, execName=None, folder=None, computationAliasName=None, clientArguments=None, environmentExtra=None, dockerContainer=None,):
    self.frameworkLoggingLevel = frameworkLoggingLevel
    self.user = user
    self.frameworkVModule = frameworkVModule
    self.scheduler = scheduler
    self.proxy = proxy
    self.client = client
    self.traceAggregator = traceAggregator
    self.execName = execName
    self.folder = folder
    self.computationAliasName = computationAliasName
    self.clientArguments = clientArguments
    self.environmentExtra = environmentExtra
    self.dockerContainer = dockerContainer

  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.frameworkLoggingLevel = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.user = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.frameworkVModule = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRUCT:
          self.scheduler = Endpoint()
          self.scheduler.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRUCT:
          self.proxy = Endpoint()
          self.proxy.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRUCT:
          self.client = Endpoint()
          self.client.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRUCT:
          self.traceAggregator = Endpoint()
          self.traceAggregator.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.execName = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.folder = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRING:
          self.computationAliasName = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.LIST:
          self.clientArguments = []
          (_etype17, _size14) = iprot.readListBegin()
          for _i18 in xrange(_size14):
            _elem19 = iprot.readString().decode('utf-8')
            self.clientArguments.append(_elem19)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.LIST:
          self.environmentExtra = []
          (_etype23, _size20) = iprot.readListBegin()
          for _i24 in xrange(_size20):
            _elem25 = iprot.readString().decode('utf-8')
            self.environmentExtra.append(_elem25)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.STRING:
          self.dockerContainer = iprot.readString().decode('utf-8')
        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('ExecutorTaskInfoHelper')
    if self.frameworkLoggingLevel is not None:
      oprot.writeFieldBegin('frameworkLoggingLevel', TType.I32, 1)
      oprot.writeI32(self.frameworkLoggingLevel)
      oprot.writeFieldEnd()
    if self.user is not None:
      oprot.writeFieldBegin('user', TType.STRING, 2)
      oprot.writeString(self.user.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.frameworkVModule is not None:
      oprot.writeFieldBegin('frameworkVModule', TType.STRING, 3)
      oprot.writeString(self.frameworkVModule.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.scheduler is not None:
      oprot.writeFieldBegin('scheduler', TType.STRUCT, 4)
      self.scheduler.write(oprot)
      oprot.writeFieldEnd()
    if self.proxy is not None:
      oprot.writeFieldBegin('proxy', TType.STRUCT, 5)
      self.proxy.write(oprot)
      oprot.writeFieldEnd()
    if self.client is not None:
      oprot.writeFieldBegin('client', TType.STRUCT, 6)
      self.client.write(oprot)
      oprot.writeFieldEnd()
    if self.traceAggregator is not None:
      oprot.writeFieldBegin('traceAggregator', TType.STRUCT, 7)
      self.traceAggregator.write(oprot)
      oprot.writeFieldEnd()
    if self.execName is not None:
      oprot.writeFieldBegin('execName', TType.STRING, 8)
      oprot.writeString(self.execName.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.folder is not None:
      oprot.writeFieldBegin('folder', TType.STRING, 9)
      oprot.writeString(self.folder.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.computationAliasName is not None:
      oprot.writeFieldBegin('computationAliasName', TType.STRING, 10)
      oprot.writeString(self.computationAliasName.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.clientArguments is not None:
      oprot.writeFieldBegin('clientArguments', TType.LIST, 11)
      oprot.writeListBegin(TType.STRING, len(self.clientArguments))
      for iter26 in self.clientArguments:
        oprot.writeString(iter26.encode('utf-8'))
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.environmentExtra is not None:
      oprot.writeFieldBegin('environmentExtra', TType.LIST, 12)
      oprot.writeListBegin(TType.STRING, len(self.environmentExtra))
      for iter27 in self.environmentExtra:
        oprot.writeString(iter27.encode('utf-8'))
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.dockerContainer is not None:
      oprot.writeFieldBegin('dockerContainer', TType.STRING, 13)
      oprot.writeString(self.dockerContainer.encode('utf-8'))
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.frameworkLoggingLevel)
    value = (value * 31) ^ hash(self.user)
    value = (value * 31) ^ hash(self.frameworkVModule)
    value = (value * 31) ^ hash(self.scheduler)
    value = (value * 31) ^ hash(self.proxy)
    value = (value * 31) ^ hash(self.client)
    value = (value * 31) ^ hash(self.traceAggregator)
    value = (value * 31) ^ hash(self.execName)
    value = (value * 31) ^ hash(self.folder)
    value = (value * 31) ^ hash(self.computationAliasName)
    value = (value * 31) ^ hash(self.clientArguments)
    value = (value * 31) ^ hash(self.environmentExtra)
    value = (value * 31) ^ hash(self.dockerContainer)
    return value

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

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

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

class PhysicalComputationMetadata:
  """
  Attributes:
   - taskId
   - slaveId
   - cpus
   - mem
   - disk
   - taskHelper
   - needsReconciliation
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'taskId', None, None, ), # 1
    (2, TType.STRING, 'slaveId', None, None, ), # 2
    (3, TType.DOUBLE, 'cpus', None, None, ), # 3
    (4, TType.I32, 'mem', None, None, ), # 4
    (5, TType.I32, 'disk', None, None, ), # 5
    (6, TType.STRUCT, 'taskHelper', (ExecutorTaskInfoHelper, ExecutorTaskInfoHelper.thrift_spec), None, ), # 6
    (7, TType.BOOL, 'needsReconciliation', None, None, ), # 7
  )

  def __init__(self, taskId=None, slaveId=None, cpus=None, mem=None, disk=None, taskHelper=None, needsReconciliation=None,):
    self.taskId = taskId
    self.slaveId = slaveId
    self.cpus = cpus
    self.mem = mem
    self.disk = disk
    self.taskHelper = taskHelper
    self.needsReconciliation = needsReconciliation

  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.taskId = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.slaveId = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.DOUBLE:
          self.cpus = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.mem = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.disk = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRUCT:
          self.taskHelper = ExecutorTaskInfoHelper()
          self.taskHelper.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.needsReconciliation = 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('PhysicalComputationMetadata')
    if self.taskId is not None:
      oprot.writeFieldBegin('taskId', TType.STRING, 1)
      oprot.writeString(self.taskId.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.slaveId is not None:
      oprot.writeFieldBegin('slaveId', TType.STRING, 2)
      oprot.writeString(self.slaveId.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.cpus is not None:
      oprot.writeFieldBegin('cpus', TType.DOUBLE, 3)
      oprot.writeDouble(self.cpus)
      oprot.writeFieldEnd()
    if self.mem is not None:
      oprot.writeFieldBegin('mem', TType.I32, 4)
      oprot.writeI32(self.mem)
      oprot.writeFieldEnd()
    if self.disk is not None:
      oprot.writeFieldBegin('disk', TType.I32, 5)
      oprot.writeI32(self.disk)
      oprot.writeFieldEnd()
    if self.taskHelper is not None:
      oprot.writeFieldBegin('taskHelper', TType.STRUCT, 6)
      self.taskHelper.write(oprot)
      oprot.writeFieldEnd()
    if self.needsReconciliation is not None:
      oprot.writeFieldBegin('needsReconciliation', TType.BOOL, 7)
      oprot.writeBool(self.needsReconciliation)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.taskId)
    value = (value * 31) ^ hash(self.slaveId)
    value = (value * 31) ^ hash(self.cpus)
    value = (value * 31) ^ hash(self.mem)
    value = (value * 31) ^ hash(self.disk)
    value = (value * 31) ^ hash(self.taskHelper)
    value = (value * 31) ^ hash(self.needsReconciliation)
    return value

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

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

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

class PhysicalComputationLayout:
  """
  Attributes:
   - name
   - istreams
   - ostreams
   - nodes
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'name', None, None, ), # 1
    (2, TType.LIST, 'istreams', (TType.STRUCT,(StreamMetadata, StreamMetadata.thrift_spec)), None, ), # 2
    (3, TType.LIST, 'ostreams', (TType.STRING,None), None, ), # 3
    (4, TType.LIST, 'nodes', (TType.STRUCT,(PhysicalComputationMetadata, PhysicalComputationMetadata.thrift_spec)), None, ), # 4
  )

  def __init__(self, name=None, istreams=None, ostreams=None, nodes=None,):
    self.name = name
    self.istreams = istreams
    self.ostreams = ostreams
    self.nodes = nodes

  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.name = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.istreams = []
          (_etype31, _size28) = iprot.readListBegin()
          for _i32 in xrange(_size28):
            _elem33 = StreamMetadata()
            _elem33.read(iprot)
            self.istreams.append(_elem33)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.ostreams = []
          (_etype37, _size34) = iprot.readListBegin()
          for _i38 in xrange(_size34):
            _elem39 = iprot.readString().decode('utf-8')
            self.ostreams.append(_elem39)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.nodes = []
          (_etype43, _size40) = iprot.readListBegin()
          for _i44 in xrange(_size40):
            _elem45 = PhysicalComputationMetadata()
            _elem45.read(iprot)
            self.nodes.append(_elem45)
          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('PhysicalComputationLayout')
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 1)
      oprot.writeString(self.name.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.istreams is not None:
      oprot.writeFieldBegin('istreams', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.istreams))
      for iter46 in self.istreams:
        iter46.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.ostreams is not None:
      oprot.writeFieldBegin('ostreams', TType.LIST, 3)
      oprot.writeListBegin(TType.STRING, len(self.ostreams))
      for iter47 in self.ostreams:
        oprot.writeString(iter47.encode('utf-8'))
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.nodes is not None:
      oprot.writeFieldBegin('nodes', TType.LIST, 4)
      oprot.writeListBegin(TType.STRUCT, len(self.nodes))
      for iter48 in self.nodes:
        iter48.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.istreams)
    value = (value * 31) ^ hash(self.ostreams)
    value = (value * 31) ^ hash(self.nodes)
    return value

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

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

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

class SchedulerMetadata:
  """
  Attributes:
   - endpoint
   - version
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'endpoint', (Endpoint, Endpoint.thrift_spec), None, ), # 1
    (2, TType.I32, 'version', None, None, ), # 2
  )

  def __init__(self, endpoint=None, version=None,):
    self.endpoint = endpoint
    self.version = version

  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.endpoint = Endpoint()
          self.endpoint.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.version = 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('SchedulerMetadata')
    if self.endpoint is not None:
      oprot.writeFieldBegin('endpoint', TType.STRUCT, 1)
      self.endpoint.write(oprot)
      oprot.writeFieldEnd()
    if self.version is not None:
      oprot.writeFieldBegin('version', TType.I32, 2)
      oprot.writeI32(self.version)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.endpoint)
    value = (value * 31) ^ hash(self.version)
    return value

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

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

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

class TopologyMetadata:
  """
  Attributes:
   - version
   - computations
   - frameworkID
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'version', None, 0, ), # 1
    (2, TType.MAP, 'computations', (TType.STRING,None,TType.STRUCT,(PhysicalComputationLayout, PhysicalComputationLayout.thrift_spec)), None, ), # 2
    (3, TType.STRING, 'frameworkID', None, None, ), # 3
  )

  def __init__(self, version=thrift_spec[1][4], computations=None, frameworkID=None,):
    self.version = version
    self.computations = computations
    self.frameworkID = frameworkID

  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.version = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.computations = {}
          (_ktype50, _vtype51, _size49 ) = iprot.readMapBegin()
          for _i53 in xrange(_size49):
            _key54 = iprot.readString().decode('utf-8')
            _val55 = PhysicalComputationLayout()
            _val55.read(iprot)
            self.computations[_key54] = _val55
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.frameworkID = iprot.readString().decode('utf-8')
        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('TopologyMetadata')
    if self.version is not None:
      oprot.writeFieldBegin('version', TType.I32, 1)
      oprot.writeI32(self.version)
      oprot.writeFieldEnd()
    if self.computations is not None:
      oprot.writeFieldBegin('computations', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.computations))
      for kiter56,viter57 in self.computations.items():
        oprot.writeString(kiter56.encode('utf-8'))
        viter57.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.frameworkID is not None:
      oprot.writeFieldBegin('frameworkID', TType.STRING, 3)
      oprot.writeString(self.frameworkID.encode('utf-8'))
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.version)
    value = (value * 31) ^ hash(self.computations)
    value = (value * 31) ^ hash(self.frameworkID)
    return value

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

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

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

class RecordMetadata:
  """
  Attributes:
   - traceId
   - sourceSpanId
   - flags
   - stream
   - timestamp
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'traceId', None, 0, ), # 1
    (2, TType.I64, 'sourceSpanId', None, 0, ), # 2
    (3, TType.I32, 'flags', None, 0, ), # 3
    (4, TType.I64, 'stream', None, 0, ), # 4
    (5, TType.I64, 'timestamp', None, 0, ), # 5
  )

  def __init__(self, traceId=thrift_spec[1][4], sourceSpanId=thrift_spec[2][4], flags=thrift_spec[3][4], stream=thrift_spec[4][4], timestamp=thrift_spec[5][4],):
    self.traceId = traceId
    self.sourceSpanId = sourceSpanId
    self.flags = flags
    self.stream = stream
    self.timestamp = 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.traceId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.sourceSpanId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.flags = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.stream = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.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('RecordMetadata')
    if self.traceId is not None:
      oprot.writeFieldBegin('traceId', TType.I64, 1)
      oprot.writeI64(self.traceId)
      oprot.writeFieldEnd()
    if self.sourceSpanId is not None:
      oprot.writeFieldBegin('sourceSpanId', TType.I64, 2)
      oprot.writeI64(self.sourceSpanId)
      oprot.writeFieldEnd()
    if self.flags is not None:
      oprot.writeFieldBegin('flags', TType.I32, 3)
      oprot.writeI32(self.flags)
      oprot.writeFieldEnd()
    if self.stream is not None:
      oprot.writeFieldBegin('stream', TType.I64, 4)
      oprot.writeI64(self.stream)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 5)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.traceId)
    value = (value * 31) ^ hash(self.sourceSpanId)
    value = (value * 31) ^ hash(self.flags)
    value = (value * 31) ^ hash(self.stream)
    value = (value * 31) ^ hash(self.timestamp)
    return value

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

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

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

class Record:
  """
  Attributes:
   - meta
   - time
   - key
   - data
   - userStream
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'meta', (RecordMetadata, RecordMetadata.thrift_spec), None, ), # 1
    (2, TType.I64, 'time', None, 0, ), # 2
    (3, TType.STRING, 'key', None, None, ), # 3
    (4, TType.STRING, 'data', None, None, ), # 4
    (5, TType.STRING, 'userStream', None, None, ), # 5
  )

  def __init__(self, meta=None, time=thrift_spec[2][4], key=None, data=None, userStream=None,):
    self.meta = meta
    self.time = time
    self.key = key
    self.data = data
    self.userStream = userStream

  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.meta = RecordMetadata()
          self.meta.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.time = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.key = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.data = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.userStream = 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('Record')
    if self.meta is not None:
      oprot.writeFieldBegin('meta', TType.STRUCT, 1)
      self.meta.write(oprot)
      oprot.writeFieldEnd()
    if self.time is not None:
      oprot.writeFieldBegin('time', TType.I64, 2)
      oprot.writeI64(self.time)
      oprot.writeFieldEnd()
    if self.key is not None:
      oprot.writeFieldBegin('key', TType.STRING, 3)
      oprot.writeString(self.key)
      oprot.writeFieldEnd()
    if self.data is not None:
      oprot.writeFieldBegin('data', TType.STRING, 4)
      oprot.writeString(self.data)
      oprot.writeFieldEnd()
    if self.userStream is not None:
      oprot.writeFieldBegin('userStream', TType.STRING, 5)
      oprot.writeString(self.userStream)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.meta)
    value = (value * 31) ^ hash(self.time)
    value = (value * 31) ^ hash(self.key)
    value = (value * 31) ^ hash(self.data)
    value = (value * 31) ^ hash(self.userStream)
    return value

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

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

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

class ComputationTx:
  """
  Attributes:
   - id
   - records
   - timers
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, 0, ), # 1
    (2, TType.LIST, 'records', (TType.STRUCT,(Record, Record.thrift_spec)), None, ), # 2
    (3, TType.MAP, 'timers', (TType.STRING,None,TType.I64,None), None, ), # 3
  )

  def __init__(self, id=thrift_spec[1][4], records=None, timers=None,):
    self.id = id
    self.records = records
    self.timers = timers

  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.records = []
          (_etype61, _size58) = iprot.readListBegin()
          for _i62 in xrange(_size58):
            _elem63 = Record()
            _elem63.read(iprot)
            self.records.append(_elem63)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.timers = {}
          (_ktype65, _vtype66, _size64 ) = iprot.readMapBegin()
          for _i68 in xrange(_size64):
            _key69 = iprot.readString().decode('utf-8')
            _val70 = iprot.readI64();
            self.timers[_key69] = _val70
          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('ComputationTx')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.records is not None:
      oprot.writeFieldBegin('records', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.records))
      for iter71 in self.records:
        iter71.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.timers is not None:
      oprot.writeFieldBegin('timers', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.timers))
      for kiter72,viter73 in self.timers.items():
        oprot.writeString(kiter72.encode('utf-8'))
        oprot.writeI64(viter73)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.records)
    value = (value * 31) ^ hash(self.timers)
    return value

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

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

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

class RichStream:
  """
  Attributes:
   - stream
   - computationName
   - endpoints
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'stream', (StreamMetadata, StreamMetadata.thrift_spec), None, ), # 1
    (2, TType.STRING, 'computationName', None, None, ), # 2
    (3, TType.LIST, 'endpoints', (TType.STRUCT,(Endpoint, Endpoint.thrift_spec)), None, ), # 3
  )

  def __init__(self, stream=None, computationName=None, endpoints=None,):
    self.stream = stream
    self.computationName = computationName
    self.endpoints = endpoints

  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.stream = StreamMetadata()
          self.stream.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.computationName = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.endpoints = []
          (_etype77, _size74) = iprot.readListBegin()
          for _i78 in xrange(_size74):
            _elem79 = Endpoint()
            _elem79.read(iprot)
            self.endpoints.append(_elem79)
          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('RichStream')
    if self.stream is not None:
      oprot.writeFieldBegin('stream', TType.STRUCT, 1)
      self.stream.write(oprot)
      oprot.writeFieldEnd()
    if self.computationName is not None:
      oprot.writeFieldBegin('computationName', TType.STRING, 2)
      oprot.writeString(self.computationName.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.endpoints is not None:
      oprot.writeFieldBegin('endpoints', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.endpoints))
      for iter80 in self.endpoints:
        iter80.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.stream)
    value = (value * 31) ^ hash(self.computationName)
    value = (value * 31) ^ hash(self.endpoints)
    return value

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

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

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

class BoltComputationRequest:
  """
  Attributes:
   - name
   - instances
   - cpus
   - mem
   - disk
   - taskHelper
   - forceUpdateBinary
   - slug
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'name', None, None, ), # 1
    (2, TType.I64, 'instances', None, 1, ), # 2
    (3, TType.DOUBLE, 'cpus', None, 0.1, ), # 3
    (4, TType.I64, 'mem', None, 2048, ), # 4
    (5, TType.I64, 'disk', None, 10240, ), # 5
    (6, TType.STRUCT, 'taskHelper', (ExecutorTaskInfoHelper, ExecutorTaskInfoHelper.thrift_spec), None, ), # 6
    (7, TType.BOOL, 'forceUpdateBinary', None, None, ), # 7
    (8, TType.STRING, 'slug', None, None, ), # 8
  )

  def __init__(self, name=None, instances=thrift_spec[2][4], cpus=thrift_spec[3][4], mem=thrift_spec[4][4], disk=thrift_spec[5][4], taskHelper=None, forceUpdateBinary=None, slug=None,):
    self.name = name
    self.instances = instances
    self.cpus = cpus
    self.mem = mem
    self.disk = disk
    self.taskHelper = taskHelper
    self.forceUpdateBinary = forceUpdateBinary
    self.slug = slug

  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.name = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.instances = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.DOUBLE:
          self.cpus = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.mem = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.disk = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRUCT:
          self.taskHelper = ExecutorTaskInfoHelper()
          self.taskHelper.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.forceUpdateBinary = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.slug = 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('BoltComputationRequest')
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 1)
      oprot.writeString(self.name.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.instances is not None:
      oprot.writeFieldBegin('instances', TType.I64, 2)
      oprot.writeI64(self.instances)
      oprot.writeFieldEnd()
    if self.cpus is not None:
      oprot.writeFieldBegin('cpus', TType.DOUBLE, 3)
      oprot.writeDouble(self.cpus)
      oprot.writeFieldEnd()
    if self.mem is not None:
      oprot.writeFieldBegin('mem', TType.I64, 4)
      oprot.writeI64(self.mem)
      oprot.writeFieldEnd()
    if self.disk is not None:
      oprot.writeFieldBegin('disk', TType.I64, 5)
      oprot.writeI64(self.disk)
      oprot.writeFieldEnd()
    if self.taskHelper is not None:
      oprot.writeFieldBegin('taskHelper', TType.STRUCT, 6)
      self.taskHelper.write(oprot)
      oprot.writeFieldEnd()
    if self.forceUpdateBinary is not None:
      oprot.writeFieldBegin('forceUpdateBinary', TType.BOOL, 7)
      oprot.writeBool(self.forceUpdateBinary)
      oprot.writeFieldEnd()
    if self.slug is not None:
      oprot.writeFieldBegin('slug', TType.STRING, 8)
      oprot.writeString(self.slug)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.instances)
    value = (value * 31) ^ hash(self.cpus)
    value = (value * 31) ^ hash(self.mem)
    value = (value * 31) ^ hash(self.disk)
    value = (value * 31) ^ hash(self.taskHelper)
    value = (value * 31) ^ hash(self.forceUpdateBinary)
    value = (value * 31) ^ hash(self.slug)
    return value

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

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

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

class Annotation:
  """
  Attributes:
   - timestamp
   - type
   - key
   - value
   - host
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'timestamp', None, None, ), # 1
    (2, TType.I32, 'type', None, None, ), # 2
    (3, TType.STRING, 'key', None, None, ), # 3
    (4, TType.STRING, 'value', None, None, ), # 4
    (5, TType.STRUCT, 'host', (Endpoint, Endpoint.thrift_spec), None, ), # 5
  )

  def __init__(self, timestamp=None, type=None, key=None, value=None, host=None,):
    self.timestamp = timestamp
    self.type = type
    self.key = key
    self.value = value
    self.host = host

  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.timestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.type = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.key = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.value = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRUCT:
          self.host = Endpoint()
          self.host.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('Annotation')
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 1)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 2)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.key is not None:
      oprot.writeFieldBegin('key', TType.STRING, 3)
      oprot.writeString(self.key.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.value is not None:
      oprot.writeFieldBegin('value', TType.STRING, 4)
      oprot.writeString(self.value)
      oprot.writeFieldEnd()
    if self.host is not None:
      oprot.writeFieldBegin('host', TType.STRUCT, 5)
      self.host.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.timestamp)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.key)
    value = (value * 31) ^ hash(self.value)
    value = (value * 31) ^ hash(self.host)
    return value

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

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

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

class Span:
  """
  Attributes:
   - traceId
   - id
   - parentId
   - name
   - annotations
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'traceId', None, None, ), # 1
    (2, TType.I64, 'id', None, None, ), # 2
    (3, TType.I64, 'parentId', None, None, ), # 3
    (4, TType.STRING, 'name', None, None, ), # 4
    (5, TType.LIST, 'annotations', (TType.STRUCT,(Annotation, Annotation.thrift_spec)), None, ), # 5
  )

  def __init__(self, traceId=None, id=None, parentId=None, name=None, annotations=None,):
    self.traceId = traceId
    self.id = id
    self.parentId = parentId
    self.name = name
    self.annotations = annotations

  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.traceId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.parentId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.name = iprot.readString().decode('utf-8')
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.LIST:
          self.annotations = []
          (_etype84, _size81) = iprot.readListBegin()
          for _i85 in xrange(_size81):
            _elem86 = Annotation()
            _elem86.read(iprot)
            self.annotations.append(_elem86)
          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('Span')
    if self.traceId is not None:
      oprot.writeFieldBegin('traceId', TType.I64, 1)
      oprot.writeI64(self.traceId)
      oprot.writeFieldEnd()
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 2)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.parentId is not None:
      oprot.writeFieldBegin('parentId', TType.I64, 3)
      oprot.writeI64(self.parentId)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 4)
      oprot.writeString(self.name.encode('utf-8'))
      oprot.writeFieldEnd()
    if self.annotations is not None:
      oprot.writeFieldBegin('annotations', TType.LIST, 5)
      oprot.writeListBegin(TType.STRUCT, len(self.annotations))
      for iter87 in self.annotations:
        iter87.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.traceId)
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.parentId)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.annotations)
    return value

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

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

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

class Trace:
  """
  Attributes:
   - id
   - spans
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.LIST, 'spans', (TType.STRUCT,(Span, Span.thrift_spec)), None, ), # 2
  )

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

  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.spans = []
          (_etype91, _size88) = iprot.readListBegin()
          for _i92 in xrange(_size88):
            _elem93 = Span()
            _elem93.read(iprot)
            self.spans.append(_elem93)
          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('Trace')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.spans is not None:
      oprot.writeFieldBegin('spans', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.spans))
      for iter94 in self.spans:
        iter94.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.spans)
    return value

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

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

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