#
# Autogenerated by Thrift Compiler (0.9.3)
#
# 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, TApplicationException

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


class TModuleInfo(object):
  PROXY_SERVER = 2
  JAVA_CLIENT = 3

  _VALUES_TO_NAMES = {
    2: "PROXY_SERVER",
    3: "JAVA_CLIENT",
  }

  _NAMES_TO_VALUES = {
    "PROXY_SERVER": 2,
    "JAVA_CLIENT": 3,
  }

class TVerifyError(object):
  INVALID_KVSTORE_Name = 1
  INVALID_KVSTORE_HelperHosts = 2
  Unsupported_Driver_ProtocolVersion = 3

  _VALUES_TO_NAMES = {
    1: "INVALID_KVSTORE_Name",
    2: "INVALID_KVSTORE_HelperHosts",
    3: "Unsupported_Driver_ProtocolVersion",
  }

  _NAMES_TO_VALUES = {
    "INVALID_KVSTORE_Name": 1,
    "INVALID_KVSTORE_HelperHosts": 2,
    "Unsupported_Driver_ProtocolVersion": 3,
  }

class TSyncPolicy(object):
  NO_SYNC = 1
  SYNC = 2
  WRITE_NO_SYNC = 3

  _VALUES_TO_NAMES = {
    1: "NO_SYNC",
    2: "SYNC",
    3: "WRITE_NO_SYNC",
  }

  _NAMES_TO_VALUES = {
    "NO_SYNC": 1,
    "SYNC": 2,
    "WRITE_NO_SYNC": 3,
  }

class TReplicaAckPolicy(object):
  ALL = 1
  NONE = 2
  SIMPLE_MAJORITY = 3

  _VALUES_TO_NAMES = {
    1: "ALL",
    2: "NONE",
    3: "SIMPLE_MAJORITY",
  }

  _NAMES_TO_VALUES = {
    "ALL": 1,
    "NONE": 2,
    "SIMPLE_MAJORITY": 3,
  }

class TReturnChoice(object):
  """
  Specifies whether to return the row value, version, both or neither.
  For best performance, it is important to choose only the properties that
  are required. The store is optimized to avoid I/O when the requested
  properties are in cache.

  """
  ALL = 1
  NONE = 2
  ONLY_VALUE = 3
  ONLY_VERSION = 4

  _VALUES_TO_NAMES = {
    1: "ALL",
    2: "NONE",
    3: "ONLY_VALUE",
    4: "ONLY_VERSION",
  }

  _NAMES_TO_VALUES = {
    "ALL": 1,
    "NONE": 2,
    "ONLY_VALUE": 3,
    "ONLY_VERSION": 4,
  }

class TSimpleConsistency(object):
  ABSOLUTE = 1
  NONE_REQUIRED = 2
  NONE_REQUIRED_NO_MASTER = 3

  _VALUES_TO_NAMES = {
    1: "ABSOLUTE",
    2: "NONE_REQUIRED",
    3: "NONE_REQUIRED_NO_MASTER",
  }

  _NAMES_TO_VALUES = {
    "ABSOLUTE": 1,
    "NONE_REQUIRED": 2,
    "NONE_REQUIRED_NO_MASTER": 3,
  }

class TTimeUnit(object):
  HOURS = 1
  DAYS = 2

  _VALUES_TO_NAMES = {
    1: "HOURS",
    2: "DAYS",
  }

  _NAMES_TO_VALUES = {
    "HOURS": 1,
    "DAYS": 2,
  }

class TDirection(object):
  FORWARD = 1
  REVERSE = 2
  UNORDERED = 3

  _VALUES_TO_NAMES = {
    1: "FORWARD",
    2: "REVERSE",
    3: "UNORDERED",
  }

  _NAMES_TO_VALUES = {
    "FORWARD": 1,
    "REVERSE": 2,
    "UNORDERED": 3,
  }

class TOperationType(object):
  """
  The types of TOperation

  """
  DELETE = 1
  DELETE_IF_VERSION = 2
  PUT = 3
  PUT_IF_ABSENT = 4
  PUT_IF_PRESENT = 5
  PUT_IF_VERSION = 6

  _VALUES_TO_NAMES = {
    1: "DELETE",
    2: "DELETE_IF_VERSION",
    3: "PUT",
    4: "PUT_IF_ABSENT",
    5: "PUT_IF_PRESENT",
    6: "PUT_IF_VERSION",
  }

  _NAMES_TO_VALUES = {
    "DELETE": 1,
    "DELETE_IF_VERSION": 2,
    "PUT": 3,
    "PUT_IF_ABSENT": 4,
    "PUT_IF_PRESENT": 5,
    "PUT_IF_VERSION": 6,
  }


class TVerifyProperties(object):
  """
  Attributes:
   - kvStoreName: Must match the store name of the Proxy Server

   - kvStoreHelperHosts: List must have at least one entry and all entries
  must be contained in the list that the server was started with.
   - username: The security username, required for secured stores.

   - readZones: The zones in which nodes must be located to be used for read operations.

   - driverProtocolVersion: The protocol version that the driver uses. This is a required field,
  for all drivers v2+.

  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'kvStoreName', None, None, ), # 1
    (2, TType.LIST, 'kvStoreHelperHosts', (TType.STRING,None), None, ), # 2
    (3, TType.STRING, 'username', None, None, ), # 3
    (4, TType.LIST, 'readZones', (TType.STRING,None), None, ), # 4
    (5, TType.I32, 'driverProtocolVersion', None, None, ), # 5
  )

  def __init__(self, kvStoreName=None, kvStoreHelperHosts=None, username=None, readZones=None, driverProtocolVersion=None,):
    self.kvStoreName = kvStoreName
    self.kvStoreHelperHosts = kvStoreHelperHosts
    self.username = username
    self.readZones = readZones
    self.driverProtocolVersion = driverProtocolVersion

  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.kvStoreName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.kvStoreHelperHosts = []
          (_etype3, _size0) = iprot.readListBegin()
          for _i4 in xrange(_size0):
            _elem5 = iprot.readString()
            self.kvStoreHelperHosts.append(_elem5)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.username = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.readZones = []
          (_etype9, _size6) = iprot.readListBegin()
          for _i10 in xrange(_size6):
            _elem11 = iprot.readString()
            self.readZones.append(_elem11)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.driverProtocolVersion = 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('TVerifyProperties')
    if self.kvStoreName is not None:
      oprot.writeFieldBegin('kvStoreName', TType.STRING, 1)
      oprot.writeString(self.kvStoreName)
      oprot.writeFieldEnd()
    if self.kvStoreHelperHosts is not None:
      oprot.writeFieldBegin('kvStoreHelperHosts', TType.LIST, 2)
      oprot.writeListBegin(TType.STRING, len(self.kvStoreHelperHosts))
      for iter12 in self.kvStoreHelperHosts:
        oprot.writeString(iter12)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.username is not None:
      oprot.writeFieldBegin('username', TType.STRING, 3)
      oprot.writeString(self.username)
      oprot.writeFieldEnd()
    if self.readZones is not None:
      oprot.writeFieldBegin('readZones', TType.LIST, 4)
      oprot.writeListBegin(TType.STRING, len(self.readZones))
      for iter13 in self.readZones:
        oprot.writeString(iter13)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.driverProtocolVersion is not None:
      oprot.writeFieldBegin('driverProtocolVersion', TType.I32, 5)
      oprot.writeI32(self.driverProtocolVersion)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.kvStoreName)
    value = (value * 31) ^ hash(self.kvStoreHelperHosts)
    value = (value * 31) ^ hash(self.username)
    value = (value * 31) ^ hash(self.readZones)
    value = (value * 31) ^ hash(self.driverProtocolVersion)
    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 TVerifyResult(object):
  """
  Attributes:
   - isConnected
   - errorType
   - message
   - proxyProtocolVersion
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'isConnected', None, None, ), # 1
    (2, TType.I32, 'errorType', None, None, ), # 2
    (3, TType.STRING, 'message', None, None, ), # 3
    (4, TType.I32, 'proxyProtocolVersion', None, 3, ), # 4
  )

  def __init__(self, isConnected=None, errorType=None, message=None, proxyProtocolVersion=thrift_spec[4][4],):
    self.isConnected = isConnected
    self.errorType = errorType
    self.message = message
    if proxyProtocolVersion is self.thrift_spec[4][4]:
      proxyProtocolVersion = 3
    self.proxyProtocolVersion = proxyProtocolVersion

  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.BOOL:
          self.isConnected = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.errorType = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.message = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.proxyProtocolVersion = 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('TVerifyResult')
    if self.isConnected is not None:
      oprot.writeFieldBegin('isConnected', TType.BOOL, 1)
      oprot.writeBool(self.isConnected)
      oprot.writeFieldEnd()
    if self.errorType is not None:
      oprot.writeFieldBegin('errorType', TType.I32, 2)
      oprot.writeI32(self.errorType)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 3)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    if self.proxyProtocolVersion is not None:
      oprot.writeFieldBegin('proxyProtocolVersion', TType.I32, 4)
      oprot.writeI32(self.proxyProtocolVersion)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.isConnected)
    value = (value * 31) ^ hash(self.errorType)
    value = (value * 31) ^ hash(self.message)
    value = (value * 31) ^ hash(self.proxyProtocolVersion)
    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 TDurability(object):
  """
  Attributes:
   - masterSync
   - replicaAck
   - replicaSync
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'masterSync', None, None, ), # 1
    (2, TType.I32, 'replicaAck', None, None, ), # 2
    (3, TType.I32, 'replicaSync', None, None, ), # 3
  )

  def __init__(self, masterSync=None, replicaAck=None, replicaSync=None,):
    self.masterSync = masterSync
    self.replicaAck = replicaAck
    self.replicaSync = replicaSync

  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.masterSync = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.replicaAck = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.replicaSync = 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('TDurability')
    if self.masterSync is not None:
      oprot.writeFieldBegin('masterSync', TType.I32, 1)
      oprot.writeI32(self.masterSync)
      oprot.writeFieldEnd()
    if self.replicaAck is not None:
      oprot.writeFieldBegin('replicaAck', TType.I32, 2)
      oprot.writeI32(self.replicaAck)
      oprot.writeFieldEnd()
    if self.replicaSync is not None:
      oprot.writeFieldBegin('replicaSync', TType.I32, 3)
      oprot.writeI32(self.replicaSync)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.masterSync)
    value = (value * 31) ^ hash(self.replicaAck)
    value = (value * 31) ^ hash(self.replicaSync)
    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 TWriteOptions(object):
  """
  Attributes:
   - durability
   - timeoutMs
   - returnChoice
   - updateTTL
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'durability', (TDurability, TDurability.thrift_spec), None, ), # 1
    (2, TType.I64, 'timeoutMs', None, None, ), # 2
    (3, TType.I32, 'returnChoice', None, None, ), # 3
    (4, TType.BOOL, 'updateTTL', None, False, ), # 4
  )

  def __init__(self, durability=None, timeoutMs=None, returnChoice=None, updateTTL=thrift_spec[4][4],):
    self.durability = durability
    self.timeoutMs = timeoutMs
    self.returnChoice = returnChoice
    self.updateTTL = updateTTL

  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.durability = TDurability()
          self.durability.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.timeoutMs = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.returnChoice = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.updateTTL = 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('TWriteOptions')
    if self.durability is not None:
      oprot.writeFieldBegin('durability', TType.STRUCT, 1)
      self.durability.write(oprot)
      oprot.writeFieldEnd()
    if self.timeoutMs is not None:
      oprot.writeFieldBegin('timeoutMs', TType.I64, 2)
      oprot.writeI64(self.timeoutMs)
      oprot.writeFieldEnd()
    if self.returnChoice is not None:
      oprot.writeFieldBegin('returnChoice', TType.I32, 3)
      oprot.writeI32(self.returnChoice)
      oprot.writeFieldEnd()
    if self.updateTTL is not None:
      oprot.writeFieldBegin('updateTTL', TType.BOOL, 4)
      oprot.writeBool(self.updateTTL)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.durability)
    value = (value * 31) ^ hash(self.timeoutMs)
    value = (value * 31) ^ hash(self.returnChoice)
    value = (value * 31) ^ hash(self.updateTTL)
    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 TTimeConsistency(object):
  """
  Attributes:
   - permissibleLag
   - timeoutMs
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'permissibleLag', None, None, ), # 1
    (2, TType.I64, 'timeoutMs', None, None, ), # 2
  )

  def __init__(self, permissibleLag=None, timeoutMs=None,):
    self.permissibleLag = permissibleLag
    self.timeoutMs = timeoutMs

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

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.permissibleLag)
    value = (value * 31) ^ hash(self.timeoutMs)
    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 TVersionConsistency(object):
  """
  Attributes:
   - version
   - timeoutMs
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'version', None, None, ), # 1
    (2, TType.I64, 'timeoutMs', None, None, ), # 2
  )

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

  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.version = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.timeoutMs = 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('TVersionConsistency')
    if self.version is not None:
      oprot.writeFieldBegin('version', TType.STRING, 1)
      oprot.writeString(self.version)
      oprot.writeFieldEnd()
    if self.timeoutMs is not None:
      oprot.writeFieldBegin('timeoutMs', TType.I64, 2)
      oprot.writeI64(self.timeoutMs)
      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.timeoutMs)
    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 TConsistency(object):
  """
  Attributes:
   - simple
   - time
   - version
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'simple', None, None, ), # 1
    (2, TType.STRUCT, 'time', (TTimeConsistency, TTimeConsistency.thrift_spec), None, ), # 2
    (3, TType.STRUCT, 'version', (TVersionConsistency, TVersionConsistency.thrift_spec), None, ), # 3
  )

  def __init__(self, simple=None, time=None, version=None,):
    self.simple = simple
    self.time = time
    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.I32:
          self.simple = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.time = TTimeConsistency()
          self.time.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.version = TVersionConsistency()
          self.version.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('TConsistency')
    if self.simple is not None:
      oprot.writeFieldBegin('simple', TType.I32, 1)
      oprot.writeI32(self.simple)
      oprot.writeFieldEnd()
    if self.time is not None:
      oprot.writeFieldBegin('time', TType.STRUCT, 2)
      self.time.write(oprot)
      oprot.writeFieldEnd()
    if self.version is not None:
      oprot.writeFieldBegin('version', TType.STRUCT, 3)
      self.version.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.simple)
    value = (value * 31) ^ hash(self.time)
    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 TReadOptions(object):
  """
  Attributes:
   - consistency
   - timeoutMs
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'consistency', (TConsistency, TConsistency.thrift_spec), None, ), # 1
    (2, TType.I64, 'timeoutMs', None, None, ), # 2
  )

  def __init__(self, consistency=None, timeoutMs=None,):
    self.consistency = consistency
    self.timeoutMs = timeoutMs

  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.consistency = TConsistency()
          self.consistency.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.timeoutMs = 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('TReadOptions')
    if self.consistency is not None:
      oprot.writeFieldBegin('consistency', TType.STRUCT, 1)
      self.consistency.write(oprot)
      oprot.writeFieldEnd()
    if self.timeoutMs is not None:
      oprot.writeFieldBegin('timeoutMs', TType.I64, 2)
      oprot.writeI64(self.timeoutMs)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.consistency)
    value = (value * 31) ^ hash(self.timeoutMs)
    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 TTimeToLive(object):
  """
  Attributes:
   - value
   - timeUnit
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'value', None, None, ), # 1
    (2, TType.I32, 'timeUnit', None, None, ), # 2
  )

  def __init__(self, value=None, timeUnit=None,):
    self.value = value
    self.timeUnit = timeUnit

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

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.value)
    value = (value * 31) ^ hash(self.timeUnit)
    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 TRow(object):
  """
  Attributes:
   - jsonRow
   - ttl
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'jsonRow', None, None, ), # 1
    (2, TType.STRUCT, 'ttl', (TTimeToLive, TTimeToLive.thrift_spec), None, ), # 2
  )

  def __init__(self, jsonRow=None, ttl=None,):
    self.jsonRow = jsonRow
    self.ttl = ttl

  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.jsonRow = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.ttl = TTimeToLive()
          self.ttl.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('TRow')
    if self.jsonRow is not None:
      oprot.writeFieldBegin('jsonRow', TType.STRING, 1)
      oprot.writeString(self.jsonRow)
      oprot.writeFieldEnd()
    if self.ttl is not None:
      oprot.writeFieldBegin('ttl', TType.STRUCT, 2)
      self.ttl.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.jsonRow)
    value = (value * 31) ^ hash(self.ttl)
    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 TWriteResult(object):
  """
  Attributes:
   - currentRowVersion
   - previousRow
   - previousRowVersion
   - wasDeleted
   - expiration
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'currentRowVersion', None, None, ), # 1
    (2, TType.STRUCT, 'previousRow', (TRow, TRow.thrift_spec), None, ), # 2
    (3, TType.STRING, 'previousRowVersion', None, None, ), # 3
    (4, TType.BOOL, 'wasDeleted', None, None, ), # 4
    (5, TType.I64, 'expiration', None, 0, ), # 5
  )

  def __init__(self, currentRowVersion=None, previousRow=None, previousRowVersion=None, wasDeleted=None, expiration=thrift_spec[5][4],):
    self.currentRowVersion = currentRowVersion
    self.previousRow = previousRow
    self.previousRowVersion = previousRowVersion
    self.wasDeleted = wasDeleted
    if expiration is self.thrift_spec[5][4]:
      expiration = 0
    self.expiration = expiration

  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.currentRowVersion = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.previousRow = TRow()
          self.previousRow.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.previousRowVersion = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.wasDeleted = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.expiration = 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('TWriteResult')
    if self.currentRowVersion is not None:
      oprot.writeFieldBegin('currentRowVersion', TType.STRING, 1)
      oprot.writeString(self.currentRowVersion)
      oprot.writeFieldEnd()
    if self.previousRow is not None:
      oprot.writeFieldBegin('previousRow', TType.STRUCT, 2)
      self.previousRow.write(oprot)
      oprot.writeFieldEnd()
    if self.previousRowVersion is not None:
      oprot.writeFieldBegin('previousRowVersion', TType.STRING, 3)
      oprot.writeString(self.previousRowVersion)
      oprot.writeFieldEnd()
    if self.wasDeleted is not None:
      oprot.writeFieldBegin('wasDeleted', TType.BOOL, 4)
      oprot.writeBool(self.wasDeleted)
      oprot.writeFieldEnd()
    if self.expiration is not None:
      oprot.writeFieldBegin('expiration', TType.I64, 5)
      oprot.writeI64(self.expiration)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.currentRowVersion)
    value = (value * 31) ^ hash(self.previousRow)
    value = (value * 31) ^ hash(self.previousRowVersion)
    value = (value * 31) ^ hash(self.wasDeleted)
    value = (value * 31) ^ hash(self.expiration)
    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 TGetResult(object):
  """
  Attributes:
   - currentRow
   - currentRowVersion
   - expiration
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'currentRow', (TRow, TRow.thrift_spec), None, ), # 1
    (2, TType.STRING, 'currentRowVersion', None, None, ), # 2
    (3, TType.I64, 'expiration', None, 0, ), # 3
  )

  def __init__(self, currentRow=None, currentRowVersion=None, expiration=thrift_spec[3][4],):
    self.currentRow = currentRow
    self.currentRowVersion = currentRowVersion
    if expiration is self.thrift_spec[3][4]:
      expiration = 0
    self.expiration = expiration

  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.currentRow = TRow()
          self.currentRow.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.currentRowVersion = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.expiration = 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('TGetResult')
    if self.currentRow is not None:
      oprot.writeFieldBegin('currentRow', TType.STRUCT, 1)
      self.currentRow.write(oprot)
      oprot.writeFieldEnd()
    if self.currentRowVersion is not None:
      oprot.writeFieldBegin('currentRowVersion', TType.STRING, 2)
      oprot.writeString(self.currentRowVersion)
      oprot.writeFieldEnd()
    if self.expiration is not None:
      oprot.writeFieldBegin('expiration', TType.I64, 3)
      oprot.writeI64(self.expiration)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.currentRow)
    value = (value * 31) ^ hash(self.currentRowVersion)
    value = (value * 31) ^ hash(self.expiration)
    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 TFieldRange(object):
  """
  Attributes:
   - fieldName
   - startValue
   - startIsInclusive
   - endValue
   - endIsInclusive
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'fieldName', None, None, ), # 1
    (2, TType.STRING, 'startValue', None, None, ), # 2
    (3, TType.BOOL, 'startIsInclusive', None, None, ), # 3
    (4, TType.STRING, 'endValue', None, None, ), # 4
    (5, TType.BOOL, 'endIsInclusive', None, None, ), # 5
  )

  def __init__(self, fieldName=None, startValue=None, startIsInclusive=None, endValue=None, endIsInclusive=None,):
    self.fieldName = fieldName
    self.startValue = startValue
    self.startIsInclusive = startIsInclusive
    self.endValue = endValue
    self.endIsInclusive = endIsInclusive

  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.fieldName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.startValue = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.startIsInclusive = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.endValue = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.endIsInclusive = 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('TFieldRange')
    if self.fieldName is not None:
      oprot.writeFieldBegin('fieldName', TType.STRING, 1)
      oprot.writeString(self.fieldName)
      oprot.writeFieldEnd()
    if self.startValue is not None:
      oprot.writeFieldBegin('startValue', TType.STRING, 2)
      oprot.writeString(self.startValue)
      oprot.writeFieldEnd()
    if self.startIsInclusive is not None:
      oprot.writeFieldBegin('startIsInclusive', TType.BOOL, 3)
      oprot.writeBool(self.startIsInclusive)
      oprot.writeFieldEnd()
    if self.endValue is not None:
      oprot.writeFieldBegin('endValue', TType.STRING, 4)
      oprot.writeString(self.endValue)
      oprot.writeFieldEnd()
    if self.endIsInclusive is not None:
      oprot.writeFieldBegin('endIsInclusive', TType.BOOL, 5)
      oprot.writeBool(self.endIsInclusive)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.fieldName)
    value = (value * 31) ^ hash(self.startValue)
    value = (value * 31) ^ hash(self.startIsInclusive)
    value = (value * 31) ^ hash(self.endValue)
    value = (value * 31) ^ hash(self.endIsInclusive)
    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 TRowAndMetadata(object):
  """
  Attributes:
   - jsonRow
   - rowVersion
   - tableId
   - expiration
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'jsonRow', None, None, ), # 1
    (2, TType.STRING, 'rowVersion', None, None, ), # 2
    (3, TType.I32, 'tableId', None, None, ), # 3
    (4, TType.I64, 'expiration', None, 0, ), # 4
  )

  def __init__(self, jsonRow=None, rowVersion=None, tableId=None, expiration=thrift_spec[4][4],):
    self.jsonRow = jsonRow
    self.rowVersion = rowVersion
    self.tableId = tableId
    if expiration is self.thrift_spec[4][4]:
      expiration = 0
    self.expiration = expiration

  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.jsonRow = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.rowVersion = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.tableId = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.expiration = 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('TRowAndMetadata')
    if self.jsonRow is not None:
      oprot.writeFieldBegin('jsonRow', TType.STRING, 1)
      oprot.writeString(self.jsonRow)
      oprot.writeFieldEnd()
    if self.rowVersion is not None:
      oprot.writeFieldBegin('rowVersion', TType.STRING, 2)
      oprot.writeString(self.rowVersion)
      oprot.writeFieldEnd()
    if self.tableId is not None:
      oprot.writeFieldBegin('tableId', TType.I32, 3)
      oprot.writeI32(self.tableId)
      oprot.writeFieldEnd()
    if self.expiration is not None:
      oprot.writeFieldBegin('expiration', TType.I64, 4)
      oprot.writeI64(self.expiration)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.jsonRow)
    value = (value * 31) ^ hash(self.rowVersion)
    value = (value * 31) ^ hash(self.tableId)
    value = (value * 31) ^ hash(self.expiration)
    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 TMultiGetResult(object):
  """
  Attributes:
   - idToTableNames
   - rowsWithMetadata
  """

  thrift_spec = (
    None, # 0
    (1, TType.MAP, 'idToTableNames', (TType.I32,None,TType.STRING,None), None, ), # 1
    (2, TType.LIST, 'rowsWithMetadata', (TType.STRUCT,(TRowAndMetadata, TRowAndMetadata.thrift_spec)), None, ), # 2
  )

  def __init__(self, idToTableNames=None, rowsWithMetadata=None,):
    self.idToTableNames = idToTableNames
    self.rowsWithMetadata = rowsWithMetadata

  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.idToTableNames = {}
          (_ktype15, _vtype16, _size14 ) = iprot.readMapBegin()
          for _i18 in xrange(_size14):
            _key19 = iprot.readI32()
            _val20 = iprot.readString()
            self.idToTableNames[_key19] = _val20
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.rowsWithMetadata = []
          (_etype24, _size21) = iprot.readListBegin()
          for _i25 in xrange(_size21):
            _elem26 = TRowAndMetadata()
            _elem26.read(iprot)
            self.rowsWithMetadata.append(_elem26)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TMultiGetResult')
    if self.idToTableNames is not None:
      oprot.writeFieldBegin('idToTableNames', TType.MAP, 1)
      oprot.writeMapBegin(TType.I32, TType.STRING, len(self.idToTableNames))
      for kiter27,viter28 in self.idToTableNames.items():
        oprot.writeI32(kiter27)
        oprot.writeString(viter28)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.rowsWithMetadata is not None:
      oprot.writeFieldBegin('rowsWithMetadata', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.rowsWithMetadata))
      for iter29 in self.rowsWithMetadata:
        iter29.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.idToTableNames)
    value = (value * 31) ^ hash(self.rowsWithMetadata)
    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 TIteratorResult(object):
  """
  Attributes:
   - iteratorId
   - result
   - hasMore
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'iteratorId', None, None, ), # 1
    (2, TType.STRUCT, 'result', (TMultiGetResult, TMultiGetResult.thrift_spec), None, ), # 2
    (3, TType.BOOL, 'hasMore', None, None, ), # 3
  )

  def __init__(self, iteratorId=None, result=None, hasMore=None,):
    self.iteratorId = iteratorId
    self.result = result
    self.hasMore = hasMore

  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.iteratorId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.result = TMultiGetResult()
          self.result.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.hasMore = 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('TIteratorResult')
    if self.iteratorId is not None:
      oprot.writeFieldBegin('iteratorId', TType.I64, 1)
      oprot.writeI64(self.iteratorId)
      oprot.writeFieldEnd()
    if self.result is not None:
      oprot.writeFieldBegin('result', TType.STRUCT, 2)
      self.result.write(oprot)
      oprot.writeFieldEnd()
    if self.hasMore is not None:
      oprot.writeFieldBegin('hasMore', TType.BOOL, 3)
      oprot.writeBool(self.hasMore)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.iteratorId)
    value = (value * 31) ^ hash(self.result)
    value = (value * 31) ^ hash(self.hasMore)
    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 TStatementResult(object):
  """
  A StatementResult provides information about the execution and outcome of an
  asynchronously executed table statement. If obtained via
  executionFutureGetStatus(), it can represent information about either a
  completed or in progress operation. If obtained via executionFutureGet(),
  it represents the final status of a finished operation.


  Attributes:
   - planId: The administrative plan id for this operation if the operation
  was a create or remove table, a create or remove index,
  or an alter index.

  The plan id will be 0 if this statement was not an administrative
  operation, or did not require execution.
   - info: detailed information about the status of the command execution in human
  readable form.

   - infoAsJson: detailed information about the status of the statement execution, in
  JSON text.

   - isSuccessful: true if this statement has finished and was successful.

   - errorMessage: If the operation failed, and isSuccessful is false, errorMsg will return
  a description of the problem.

   - isCancelled: true if the operation was cancelled. Not set by executeSync.

   - isDone: true if the operation has been terminated. Always true for executeSync.

  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'planId', None, None, ), # 1
    (2, TType.STRING, 'info', None, None, ), # 2
    (3, TType.STRING, 'infoAsJson', None, None, ), # 3
    (4, TType.BOOL, 'isSuccessful', None, None, ), # 4
    (5, TType.STRING, 'errorMessage', None, None, ), # 5
    (6, TType.BOOL, 'isCancelled', None, None, ), # 6
    (7, TType.BOOL, 'isDone', None, None, ), # 7
  )

  def __init__(self, planId=None, info=None, infoAsJson=None, isSuccessful=None, errorMessage=None, isCancelled=None, isDone=None,):
    self.planId = planId
    self.info = info
    self.infoAsJson = infoAsJson
    self.isSuccessful = isSuccessful
    self.errorMessage = errorMessage
    self.isCancelled = isCancelled
    self.isDone = isDone

  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.planId = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.info = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.infoAsJson = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.isSuccessful = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.errorMessage = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.BOOL:
          self.isCancelled = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.isDone = 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('TStatementResult')
    if self.planId is not None:
      oprot.writeFieldBegin('planId', TType.I32, 1)
      oprot.writeI32(self.planId)
      oprot.writeFieldEnd()
    if self.info is not None:
      oprot.writeFieldBegin('info', TType.STRING, 2)
      oprot.writeString(self.info)
      oprot.writeFieldEnd()
    if self.infoAsJson is not None:
      oprot.writeFieldBegin('infoAsJson', TType.STRING, 3)
      oprot.writeString(self.infoAsJson)
      oprot.writeFieldEnd()
    if self.isSuccessful is not None:
      oprot.writeFieldBegin('isSuccessful', TType.BOOL, 4)
      oprot.writeBool(self.isSuccessful)
      oprot.writeFieldEnd()
    if self.errorMessage is not None:
      oprot.writeFieldBegin('errorMessage', TType.STRING, 5)
      oprot.writeString(self.errorMessage)
      oprot.writeFieldEnd()
    if self.isCancelled is not None:
      oprot.writeFieldBegin('isCancelled', TType.BOOL, 6)
      oprot.writeBool(self.isCancelled)
      oprot.writeFieldEnd()
    if self.isDone is not None:
      oprot.writeFieldBegin('isDone', TType.BOOL, 7)
      oprot.writeBool(self.isDone)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.planId)
    value = (value * 31) ^ hash(self.info)
    value = (value * 31) ^ hash(self.infoAsJson)
    value = (value * 31) ^ hash(self.isSuccessful)
    value = (value * 31) ^ hash(self.errorMessage)
    value = (value * 31) ^ hash(self.isCancelled)
    value = (value * 31) ^ hash(self.isDone)
    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 TResult(object):
  """
  TResult is a union of possible result types returned via a StatementResultV2.
  It is expected that as new result types are created this union will be
  expanded.

  Attributes:
   - stringResult: A single text string result.
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'stringResult', None, None, ), # 1
  )

  def __init__(self, stringResult=None,):
    self.stringResult = stringResult

  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.stringResult = 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('TResult')
    if self.stringResult is not None:
      oprot.writeFieldBegin('stringResult', TType.STRING, 1)
      oprot.writeString(self.stringResult)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.stringResult)
    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 TStatementResultV2(object):
  """
  A StatementResultV2 provides information about the execution and outcome
  of an asynchronously executed table statement. If obtained via
  executionFutureGetStatusV2(), it can represent information about either a
  completed or in progress operation. If obtained via executionFutureGetV2(),
  it represents the final status of a finished operation.


  Attributes:
   - executionId: The identification of the execution. This will be used with the
  following methods: executionFutureCancelV2, executionFutureGetV2,
  executionFutureGetTimeoutV2 and executionFutureUpdateStatusV2.

  It is null when is the result of executeSyncV2().
   - planId: The administrative plan id for this operation if the operation
  was a create or remove table, a create or remove index,
  or an alter index.

  The plan id will be 0 if this statement was not an administrative
  operation, or did not require execution.
   - info: detailed information about the status of the command execution in human
  readable form.

   - infoAsJson: detailed information about the status of the statement execution, in
  JSON text.

   - isSuccessful: true if this statement has finished and was successful.

   - errorMessage: If the operation failed, and isSuccessful is false, errorMsg will return
  a description of the problem.

   - isCancelled: true if the operation was cancelled. Not set by executeSync.

   - isDone: true if the operation has been terminated. Always true for executeSync.

   - statement: the statement of this execution

   - result: a string result if the statement has a text result value and was
  successful.

  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'executionId', None, None, ), # 1
    (2, TType.I32, 'planId', None, None, ), # 2
    (3, TType.STRING, 'info', None, None, ), # 3
    (4, TType.STRING, 'infoAsJson', None, None, ), # 4
    (5, TType.BOOL, 'isSuccessful', None, None, ), # 5
    (6, TType.STRING, 'errorMessage', None, None, ), # 6
    (7, TType.BOOL, 'isCancelled', None, None, ), # 7
    (8, TType.BOOL, 'isDone', None, None, ), # 8
    (9, TType.STRING, 'statement', None, None, ), # 9
    (10, TType.STRUCT, 'result', (TResult, TResult.thrift_spec), None, ), # 10
  )

  def __init__(self, executionId=None, planId=None, info=None, infoAsJson=None, isSuccessful=None, errorMessage=None, isCancelled=None, isDone=None, statement=None, result=None,):
    self.executionId = executionId
    self.planId = planId
    self.info = info
    self.infoAsJson = infoAsJson
    self.isSuccessful = isSuccessful
    self.errorMessage = errorMessage
    self.isCancelled = isCancelled
    self.isDone = isDone
    self.statement = statement
    self.result = result

  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.executionId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.planId = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.info = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.infoAsJson = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.isSuccessful = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.errorMessage = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.BOOL:
          self.isCancelled = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.BOOL:
          self.isDone = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.statement = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.STRUCT:
          self.result = TResult()
          self.result.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('TStatementResultV2')
    if self.executionId is not None:
      oprot.writeFieldBegin('executionId', TType.STRING, 1)
      oprot.writeString(self.executionId)
      oprot.writeFieldEnd()
    if self.planId is not None:
      oprot.writeFieldBegin('planId', TType.I32, 2)
      oprot.writeI32(self.planId)
      oprot.writeFieldEnd()
    if self.info is not None:
      oprot.writeFieldBegin('info', TType.STRING, 3)
      oprot.writeString(self.info)
      oprot.writeFieldEnd()
    if self.infoAsJson is not None:
      oprot.writeFieldBegin('infoAsJson', TType.STRING, 4)
      oprot.writeString(self.infoAsJson)
      oprot.writeFieldEnd()
    if self.isSuccessful is not None:
      oprot.writeFieldBegin('isSuccessful', TType.BOOL, 5)
      oprot.writeBool(self.isSuccessful)
      oprot.writeFieldEnd()
    if self.errorMessage is not None:
      oprot.writeFieldBegin('errorMessage', TType.STRING, 6)
      oprot.writeString(self.errorMessage)
      oprot.writeFieldEnd()
    if self.isCancelled is not None:
      oprot.writeFieldBegin('isCancelled', TType.BOOL, 7)
      oprot.writeBool(self.isCancelled)
      oprot.writeFieldEnd()
    if self.isDone is not None:
      oprot.writeFieldBegin('isDone', TType.BOOL, 8)
      oprot.writeBool(self.isDone)
      oprot.writeFieldEnd()
    if self.statement is not None:
      oprot.writeFieldBegin('statement', TType.STRING, 9)
      oprot.writeString(self.statement)
      oprot.writeFieldEnd()
    if self.result is not None:
      oprot.writeFieldBegin('result', TType.STRUCT, 10)
      self.result.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.executionId)
    value = (value * 31) ^ hash(self.planId)
    value = (value * 31) ^ hash(self.info)
    value = (value * 31) ^ hash(self.infoAsJson)
    value = (value * 31) ^ hash(self.isSuccessful)
    value = (value * 31) ^ hash(self.errorMessage)
    value = (value * 31) ^ hash(self.isCancelled)
    value = (value * 31) ^ hash(self.isDone)
    value = (value * 31) ^ hash(self.statement)
    value = (value * 31) ^ hash(self.result)
    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 TOperation(object):
  """
  Defines an update operation to be passed to executeUpdates.


  Attributes:
   - tableName: The table name on which this operation is executed on.

   - type: Determines which update operation to be executed.

   - row: For put operations: represents the row to be stored.
  For delete operations: represents the key of the row to be deleted.

   - returnChoice: Specifies whether to return the row value, version, both or neither.

   - abortIfUnsuccessful: true if this operation should cause the execute transaction to abort
  when the operation fails, where failure is the condition when the
  delete or put method returns null.

   - matchVersion: The version to be matched for: putIfVersion and deleteIfVersion.

  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'tableName', None, None, ), # 1
    (2, TType.I32, 'type', None, None, ), # 2
    (3, TType.STRUCT, 'row', (TRow, TRow.thrift_spec), None, ), # 3
    (4, TType.I32, 'returnChoice', None, None, ), # 4
    (5, TType.BOOL, 'abortIfUnsuccessful', None, None, ), # 5
    (6, TType.STRING, 'matchVersion', None, None, ), # 6
  )

  def __init__(self, tableName=None, type=None, row=None, returnChoice=None, abortIfUnsuccessful=None, matchVersion=None,):
    self.tableName = tableName
    self.type = type
    self.row = row
    self.returnChoice = returnChoice
    self.abortIfUnsuccessful = abortIfUnsuccessful
    self.matchVersion = matchVersion

  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.tableName = iprot.readString()
        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.STRUCT:
          self.row = TRow()
          self.row.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.returnChoice = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.abortIfUnsuccessful = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.STRING:
          self.matchVersion = 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('TOperation')
    if self.tableName is not None:
      oprot.writeFieldBegin('tableName', TType.STRING, 1)
      oprot.writeString(self.tableName)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 2)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.row is not None:
      oprot.writeFieldBegin('row', TType.STRUCT, 3)
      self.row.write(oprot)
      oprot.writeFieldEnd()
    if self.returnChoice is not None:
      oprot.writeFieldBegin('returnChoice', TType.I32, 4)
      oprot.writeI32(self.returnChoice)
      oprot.writeFieldEnd()
    if self.abortIfUnsuccessful is not None:
      oprot.writeFieldBegin('abortIfUnsuccessful', TType.BOOL, 5)
      oprot.writeBool(self.abortIfUnsuccessful)
      oprot.writeFieldEnd()
    if self.matchVersion is not None:
      oprot.writeFieldBegin('matchVersion', TType.STRING, 6)
      oprot.writeString(self.matchVersion)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.tableName)
    value = (value * 31) ^ hash(self.type)
    value = (value * 31) ^ hash(self.row)
    value = (value * 31) ^ hash(self.returnChoice)
    value = (value * 31) ^ hash(self.abortIfUnsuccessful)
    value = (value * 31) ^ hash(self.matchVersion)
    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 TDurabilityException(TException):
  """
  Attributes:
   - availableReplicas
   - commitPolicy
   - requiredNodeCount
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'availableReplicas', (TType.STRING,None), None, ), # 1
    (2, TType.I32, 'commitPolicy', None, None, ), # 2
    (3, TType.I32, 'requiredNodeCount', None, None, ), # 3
    (4, TType.STRING, 'message', None, None, ), # 4
  )

  def __init__(self, availableReplicas=None, commitPolicy=None, requiredNodeCount=None, message=None,):
    self.availableReplicas = availableReplicas
    self.commitPolicy = commitPolicy
    self.requiredNodeCount = requiredNodeCount
    self.message = message

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.LIST:
          self.availableReplicas = []
          (_etype33, _size30) = iprot.readListBegin()
          for _i34 in xrange(_size30):
            _elem35 = iprot.readString()
            self.availableReplicas.append(_elem35)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.commitPolicy = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.requiredNodeCount = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.message = iprot.readString()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TDurabilityException')
    if self.availableReplicas is not None:
      oprot.writeFieldBegin('availableReplicas', TType.LIST, 1)
      oprot.writeListBegin(TType.STRING, len(self.availableReplicas))
      for iter36 in self.availableReplicas:
        oprot.writeString(iter36)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.commitPolicy is not None:
      oprot.writeFieldBegin('commitPolicy', TType.I32, 2)
      oprot.writeI32(self.commitPolicy)
      oprot.writeFieldEnd()
    if self.requiredNodeCount is not None:
      oprot.writeFieldBegin('requiredNodeCount', TType.I32, 3)
      oprot.writeI32(self.requiredNodeCount)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 4)
      oprot.writeString(self.message)
      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.availableReplicas)
    value = (value * 31) ^ hash(self.commitPolicy)
    value = (value * 31) ^ hash(self.requiredNodeCount)
    value = (value * 31) ^ hash(self.message)
    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 TRequestTimeoutException(TException):
  """
  Attributes:
   - message
   - timeoutMs
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.message = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.timeoutMs = 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('TRequestTimeoutException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    if self.timeoutMs is not None:
      oprot.writeFieldBegin('timeoutMs', TType.I64, 2)
      oprot.writeI64(self.timeoutMs)
      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.message)
    value = (value * 31) ^ hash(self.timeoutMs)
    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 TFaultException(TException):
  """
  Attributes:
   - faultClassName
   - remoteStackTrace
   - wasLoggedRemotely
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'faultClassName', None, None, ), # 1
    (2, TType.STRING, 'remoteStackTrace', None, None, ), # 2
    (3, TType.BOOL, 'wasLoggedRemotely', None, None, ), # 3
    (4, TType.STRING, 'message', None, None, ), # 4
  )

  def __init__(self, faultClassName=None, remoteStackTrace=None, wasLoggedRemotely=None, message=None,):
    self.faultClassName = faultClassName
    self.remoteStackTrace = remoteStackTrace
    self.wasLoggedRemotely = wasLoggedRemotely
    self.message = message

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.faultClassName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.remoteStackTrace = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.wasLoggedRemotely = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.message = iprot.readString()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TFaultException')
    if self.faultClassName is not None:
      oprot.writeFieldBegin('faultClassName', TType.STRING, 1)
      oprot.writeString(self.faultClassName)
      oprot.writeFieldEnd()
    if self.remoteStackTrace is not None:
      oprot.writeFieldBegin('remoteStackTrace', TType.STRING, 2)
      oprot.writeString(self.remoteStackTrace)
      oprot.writeFieldEnd()
    if self.wasLoggedRemotely is not None:
      oprot.writeFieldBegin('wasLoggedRemotely', TType.BOOL, 3)
      oprot.writeBool(self.wasLoggedRemotely)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 4)
      oprot.writeString(self.message)
      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.faultClassName)
    value = (value * 31) ^ hash(self.remoteStackTrace)
    value = (value * 31) ^ hash(self.wasLoggedRemotely)
    value = (value * 31) ^ hash(self.message)
    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 TConsistencyException(TException):
  """
  Attributes:
   - consistencyPolicy
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'consistencyPolicy', (TConsistency, TConsistency.thrift_spec), None, ), # 1
    (2, TType.STRING, 'message', None, None, ), # 2
  )

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TConsistencyException')
    if self.consistencyPolicy is not None:
      oprot.writeFieldBegin('consistencyPolicy', TType.STRUCT, 1)
      self.consistencyPolicy.write(oprot)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 2)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.consistencyPolicy)
    value = (value * 31) ^ hash(self.message)
    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 TIllegalArgumentException(TException):
  """
  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TIllegalArgumentException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TIteratorTimeoutException(TException):
  """
  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TIteratorTimeoutException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TUnverifiedConnectionException(TException):
  """
  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TUnverifiedConnectionException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TProxyException(TException):
  """
  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TProxyException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TCancellationException(TException):
  """
  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TCancellationException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TExecutionException(TException):
  """
  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TExecutionException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TInterruptedException(TException):
  """
  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TInterruptedException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TTimeoutException(TException):
  """
  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TTimeoutException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TTableOpExecutionException(TException):
  """
  Used to indicate a failure in executeUpdates.


  Attributes:
   - operation: The operation that caused the execution to be aborted. *
   - failedOperationIndex: The list index of the operation that caused the execution to be aborted. *
   - operationResult: The result of the operation that caused the execution to be aborted. *
   - message: The exception message
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'operation', (TOperation, TOperation.thrift_spec), None, ), # 1
    (2, TType.I32, 'failedOperationIndex', None, None, ), # 2
    (3, TType.STRUCT, 'operationResult', (TWriteResult, TWriteResult.thrift_spec), None, ), # 3
    (4, TType.STRING, 'message', None, None, ), # 4
  )

  def __init__(self, operation=None, failedOperationIndex=None, operationResult=None, message=None,):
    self.operation = operation
    self.failedOperationIndex = failedOperationIndex
    self.operationResult = operationResult
    self.message = message

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRUCT:
          self.operation = TOperation()
          self.operation.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.failedOperationIndex = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.operationResult = TWriteResult()
          self.operationResult.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.message = iprot.readString()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TTableOpExecutionException')
    if self.operation is not None:
      oprot.writeFieldBegin('operation', TType.STRUCT, 1)
      self.operation.write(oprot)
      oprot.writeFieldEnd()
    if self.failedOperationIndex is not None:
      oprot.writeFieldBegin('failedOperationIndex', TType.I32, 2)
      oprot.writeI32(self.failedOperationIndex)
      oprot.writeFieldEnd()
    if self.operationResult is not None:
      oprot.writeFieldBegin('operationResult', TType.STRUCT, 3)
      self.operationResult.write(oprot)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 4)
      oprot.writeString(self.message)
      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.operation)
    value = (value * 31) ^ hash(self.failedOperationIndex)
    value = (value * 31) ^ hash(self.operationResult)
    value = (value * 31) ^ hash(self.message)
    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 TRequestLimitException(TException):
  """
  Thrown when a request cannot be processed because it would exceed the
  maximum number of active requests for a node as configured by
  -request-limit.


  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TRequestLimitException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TAuthenticationFailureException(TException):
  """
  This exception is thrown if an application passes invalid credentials to
  an authentication operation.


  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TAuthenticationFailureException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TAuthenticationRequiredException(TException):
  """
  This exception is thrown when a secured operation is attempted and the
  client is not currently authenticated. It can occur if login credentials
  were specified, but the login session has expired, requiring that the client
  reauthenticate itself.


  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TAuthenticationRequiredException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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 TUnauthorizedException(TException):
  """
  This exception is thrown from methods where an authenticated user is
  attempting to perform an operation for which they are not authorized.
  An application that receives this exception typically should not retry the
  operation.


  Attributes:
   - message
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TUnauthorizedException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      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.message)
    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)
