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

from thrift.Thrift import TType, TMessageType, TException, TApplicationException
import koverse.thriftgen.ttypes
import koverse.thriftgen.security.ttypes
import koverse.thriftgen.aggregate.ttypes
import koverse.thriftgen.usergroup.ttypes
import koverse.thriftgen.queryservice.ttypes


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


class TCollectionState:
  Ready = 1
  Deleting = 2
  Initializing = 3

  _VALUES_TO_NAMES = {
    1: "Ready",
    2: "Deleting",
    3: "Initializing",
  }

  _NAMES_TO_VALUES = {
    "Ready": 1,
    "Deleting": 2,
    "Initializing": 3,
  }

class TIndexingPolicyFieldMode:
  Inclusive = 1
  Exclusive = 2

  _VALUES_TO_NAMES = {
    1: "Inclusive",
    2: "Exclusive",
  }

  _NAMES_TO_VALUES = {
    "Inclusive": 1,
    "Exclusive": 2,
  }


class TFieldTypePair:
  """
  Attributes:
   - fieldName
   - fieldType
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'fieldName', None, None, ), # 1
    (2, TType.STRING, 'fieldType', None, None, ), # 2
  )

  def __init__(self, fieldName=None, fieldType=None,):
    self.fieldName = fieldName
    self.fieldType = fieldType

  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.fieldType = 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('TFieldTypePair')
    if self.fieldName is not None:
      oprot.writeFieldBegin('fieldName', TType.STRING, 1)
      oprot.writeString(self.fieldName)
      oprot.writeFieldEnd()
    if self.fieldType is not None:
      oprot.writeFieldBegin('fieldType', TType.STRING, 2)
      oprot.writeString(self.fieldType)
      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.fieldType)
    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 TFieldDetails:
  """
  Attributes:
   - fieldName
   - typeHistogram
   - lengthsHistogram
   - recordCount
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'fieldName', None, None, ), # 1
    (2, TType.MAP, 'typeHistogram', (TType.STRING,None,TType.I64,None), None, ), # 2
    (3, TType.MAP, 'lengthsHistogram', (TType.I32,None,TType.I64,None), None, ), # 3
    (4, TType.I64, 'recordCount', None, None, ), # 4
  )

  def __init__(self, fieldName=None, typeHistogram=None, lengthsHistogram=None, recordCount=None,):
    self.fieldName = fieldName
    self.typeHistogram = typeHistogram
    self.lengthsHistogram = lengthsHistogram
    self.recordCount = recordCount

  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.MAP:
          self.typeHistogram = {}
          (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin()
          for _i4 in xrange(_size0):
            _key5 = iprot.readString()
            _val6 = iprot.readI64()
            self.typeHistogram[_key5] = _val6
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.lengthsHistogram = {}
          (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin()
          for _i11 in xrange(_size7):
            _key12 = iprot.readI32()
            _val13 = iprot.readI64()
            self.lengthsHistogram[_key12] = _val13
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.recordCount = 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('TFieldDetails')
    if self.fieldName is not None:
      oprot.writeFieldBegin('fieldName', TType.STRING, 1)
      oprot.writeString(self.fieldName)
      oprot.writeFieldEnd()
    if self.typeHistogram is not None:
      oprot.writeFieldBegin('typeHistogram', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.typeHistogram))
      for kiter14,viter15 in self.typeHistogram.items():
        oprot.writeString(kiter14)
        oprot.writeI64(viter15)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.lengthsHistogram is not None:
      oprot.writeFieldBegin('lengthsHistogram', TType.MAP, 3)
      oprot.writeMapBegin(TType.I32, TType.I64, len(self.lengthsHistogram))
      for kiter16,viter17 in self.lengthsHistogram.items():
        oprot.writeI32(kiter16)
        oprot.writeI64(viter17)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.recordCount is not None:
      oprot.writeFieldBegin('recordCount', TType.I64, 4)
      oprot.writeI64(self.recordCount)
      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.typeHistogram)
    value = (value * 31) ^ hash(self.lengthsHistogram)
    value = (value * 31) ^ hash(self.recordCount)
    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 TIndexTermConfiguration:
  """
  Attributes:
   - indexTermTransformerClassName
   - parameters
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'indexTermTransformerClassName', None, None, ), # 1
    (2, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 2
  )

  def __init__(self, indexTermTransformerClassName=None, parameters=None,):
    self.indexTermTransformerClassName = indexTermTransformerClassName
    self.parameters = parameters

  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.indexTermTransformerClassName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.parameters = {}
          (_ktype19, _vtype20, _size18 ) = iprot.readMapBegin()
          for _i22 in xrange(_size18):
            _key23 = iprot.readString()
            _val24 = iprot.readString()
            self.parameters[_key23] = _val24
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TIndexTermConfiguration')
    if self.indexTermTransformerClassName is not None:
      oprot.writeFieldBegin('indexTermTransformerClassName', TType.STRING, 1)
      oprot.writeString(self.indexTermTransformerClassName)
      oprot.writeFieldEnd()
    if self.parameters is not None:
      oprot.writeFieldBegin('parameters', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
      for kiter25,viter26 in self.parameters.items():
        oprot.writeString(kiter25)
        oprot.writeString(viter26)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.indexTermTransformerClassName)
    value = (value * 31) ^ hash(self.parameters)
    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 TFieldTypeIndexTermConfigurationPair:
  """
  Attributes:
   - fieldTypePair
   - indexTermConfiguration
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'fieldTypePair', (TFieldTypePair, TFieldTypePair.thrift_spec), None, ), # 1
    (2, TType.STRUCT, 'indexTermConfiguration', (TIndexTermConfiguration, TIndexTermConfiguration.thrift_spec), None, ), # 2
  )

  def __init__(self, fieldTypePair=None, indexTermConfiguration=None,):
    self.fieldTypePair = fieldTypePair
    self.indexTermConfiguration = indexTermConfiguration

  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.fieldTypePair = TFieldTypePair()
          self.fieldTypePair.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.indexTermConfiguration = TIndexTermConfiguration()
          self.indexTermConfiguration.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('TFieldTypeIndexTermConfigurationPair')
    if self.fieldTypePair is not None:
      oprot.writeFieldBegin('fieldTypePair', TType.STRUCT, 1)
      self.fieldTypePair.write(oprot)
      oprot.writeFieldEnd()
    if self.indexTermConfiguration is not None:
      oprot.writeFieldBegin('indexTermConfiguration', TType.STRUCT, 2)
      self.indexTermConfiguration.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.fieldTypePair)
    value = (value * 31) ^ hash(self.indexTermConfiguration)
    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 TIndexingPolicy:
  """
  Attributes:
   - fieldMode
   - fields
   - fieldTermConfigurations
   - compositeIndexes
   - createValueOnlyIndices
   - id
   - dataSetId
   - foreignLanguageIndexing
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'fieldMode', None, None, ), # 1
    (2, TType.SET, 'fields', (TType.STRING,None), None, ), # 2
    (3, TType.LIST, 'fieldTermConfigurations', (TType.STRUCT,(TFieldTypeIndexTermConfigurationPair, TFieldTypeIndexTermConfigurationPair.thrift_spec)), None, ), # 3
    (4, TType.LIST, 'compositeIndexes', (TType.LIST,(TType.STRUCT,(TFieldTypePair, TFieldTypePair.thrift_spec))), None, ), # 4
    (5, TType.BOOL, 'createValueOnlyIndices', None, None, ), # 5
    (6, TType.I64, 'id', None, None, ), # 6
    (7, TType.STRING, 'dataSetId', None, None, ), # 7
    (8, TType.BOOL, 'foreignLanguageIndexing', None, None, ), # 8
  )

  def __init__(self, fieldMode=None, fields=None, fieldTermConfigurations=None, compositeIndexes=None, createValueOnlyIndices=None, id=None, dataSetId=None, foreignLanguageIndexing=None,):
    self.fieldMode = fieldMode
    self.fields = fields
    self.fieldTermConfigurations = fieldTermConfigurations
    self.compositeIndexes = compositeIndexes
    self.createValueOnlyIndices = createValueOnlyIndices
    self.id = id
    self.dataSetId = dataSetId
    self.foreignLanguageIndexing = foreignLanguageIndexing

  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.fieldMode = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.SET:
          self.fields = set()
          (_etype30, _size27) = iprot.readSetBegin()
          for _i31 in xrange(_size27):
            _elem32 = iprot.readString()
            self.fields.add(_elem32)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.fieldTermConfigurations = []
          (_etype36, _size33) = iprot.readListBegin()
          for _i37 in xrange(_size33):
            _elem38 = TFieldTypeIndexTermConfigurationPair()
            _elem38.read(iprot)
            self.fieldTermConfigurations.append(_elem38)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.compositeIndexes = []
          (_etype42, _size39) = iprot.readListBegin()
          for _i43 in xrange(_size39):
            _elem44 = []
            (_etype48, _size45) = iprot.readListBegin()
            for _i49 in xrange(_size45):
              _elem50 = TFieldTypePair()
              _elem50.read(iprot)
              _elem44.append(_elem50)
            iprot.readListEnd()
            self.compositeIndexes.append(_elem44)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.createValueOnlyIndices = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.id = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.dataSetId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.BOOL:
          self.foreignLanguageIndexing = 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('TIndexingPolicy')
    if self.fieldMode is not None:
      oprot.writeFieldBegin('fieldMode', TType.I32, 1)
      oprot.writeI32(self.fieldMode)
      oprot.writeFieldEnd()
    if self.fields is not None:
      oprot.writeFieldBegin('fields', TType.SET, 2)
      oprot.writeSetBegin(TType.STRING, len(self.fields))
      for iter51 in self.fields:
        oprot.writeString(iter51)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.fieldTermConfigurations is not None:
      oprot.writeFieldBegin('fieldTermConfigurations', TType.LIST, 3)
      oprot.writeListBegin(TType.STRUCT, len(self.fieldTermConfigurations))
      for iter52 in self.fieldTermConfigurations:
        iter52.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.compositeIndexes is not None:
      oprot.writeFieldBegin('compositeIndexes', TType.LIST, 4)
      oprot.writeListBegin(TType.LIST, len(self.compositeIndexes))
      for iter53 in self.compositeIndexes:
        oprot.writeListBegin(TType.STRUCT, len(iter53))
        for iter54 in iter53:
          iter54.write(oprot)
        oprot.writeListEnd()
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.createValueOnlyIndices is not None:
      oprot.writeFieldBegin('createValueOnlyIndices', TType.BOOL, 5)
      oprot.writeBool(self.createValueOnlyIndices)
      oprot.writeFieldEnd()
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 6)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.dataSetId is not None:
      oprot.writeFieldBegin('dataSetId', TType.STRING, 7)
      oprot.writeString(self.dataSetId)
      oprot.writeFieldEnd()
    if self.foreignLanguageIndexing is not None:
      oprot.writeFieldBegin('foreignLanguageIndexing', TType.BOOL, 8)
      oprot.writeBool(self.foreignLanguageIndexing)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.fieldMode)
    value = (value * 31) ^ hash(self.fields)
    value = (value * 31) ^ hash(self.fieldTermConfigurations)
    value = (value * 31) ^ hash(self.compositeIndexes)
    value = (value * 31) ^ hash(self.createValueOnlyIndices)
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.dataSetId)
    value = (value * 31) ^ hash(self.foreignLanguageIndexing)
    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 TIndexTermTransformerDescriptor:
  """
  Attributes:
   - inputParameters
   - name
   - fieldTypes
   - implementingClassName
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'inputParameters', (TType.STRUCT,(koverse.thriftgen.ttypes.TParameter, koverse.thriftgen.ttypes.TParameter.thrift_spec)), None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.SET, 'fieldTypes', (TType.STRING,None), None, ), # 3
    (4, TType.STRING, 'implementingClassName', None, None, ), # 4
  )

  def __init__(self, inputParameters=None, name=None, fieldTypes=None, implementingClassName=None,):
    self.inputParameters = inputParameters
    self.name = name
    self.fieldTypes = fieldTypes
    self.implementingClassName = implementingClassName

  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.inputParameters = []
          (_etype58, _size55) = iprot.readListBegin()
          for _i59 in xrange(_size55):
            _elem60 = koverse.thriftgen.ttypes.TParameter()
            _elem60.read(iprot)
            self.inputParameters.append(_elem60)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.SET:
          self.fieldTypes = set()
          (_etype64, _size61) = iprot.readSetBegin()
          for _i65 in xrange(_size61):
            _elem66 = iprot.readString()
            self.fieldTypes.add(_elem66)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.implementingClassName = 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('TIndexTermTransformerDescriptor')
    if self.inputParameters is not None:
      oprot.writeFieldBegin('inputParameters', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.inputParameters))
      for iter67 in self.inputParameters:
        iter67.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.fieldTypes is not None:
      oprot.writeFieldBegin('fieldTypes', TType.SET, 3)
      oprot.writeSetBegin(TType.STRING, len(self.fieldTypes))
      for iter68 in self.fieldTypes:
        oprot.writeString(iter68)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.implementingClassName is not None:
      oprot.writeFieldBegin('implementingClassName', TType.STRING, 4)
      oprot.writeString(self.implementingClassName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.inputParameters)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.fieldTypes)
    value = (value * 31) ^ hash(self.implementingClassName)
    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 TCollectionStatus:
  """
  Attributes:
   - id
   - creationTimestamp
   - recordCount
   - interval
   - collectionId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'creationTimestamp', None, None, ), # 2
    (3, TType.I64, 'recordCount', None, None, ), # 3
    (4, TType.I64, 'interval', None, None, ), # 4
    (5, TType.STRING, 'collectionId', None, None, ), # 5
  )

  def __init__(self, id=None, creationTimestamp=None, recordCount=None, interval=None, collectionId=None,):
    self.id = id
    self.creationTimestamp = creationTimestamp
    self.recordCount = recordCount
    self.interval = interval
    self.collectionId = collectionId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.creationTimestamp = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.recordCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.interval = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.collectionId = 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('TCollectionStatus')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.creationTimestamp is not None:
      oprot.writeFieldBegin('creationTimestamp', TType.I64, 2)
      oprot.writeI64(self.creationTimestamp)
      oprot.writeFieldEnd()
    if self.recordCount is not None:
      oprot.writeFieldBegin('recordCount', TType.I64, 3)
      oprot.writeI64(self.recordCount)
      oprot.writeFieldEnd()
    if self.interval is not None:
      oprot.writeFieldBegin('interval', TType.I64, 4)
      oprot.writeI64(self.interval)
      oprot.writeFieldEnd()
    if self.collectionId is not None:
      oprot.writeFieldBegin('collectionId', TType.STRING, 5)
      oprot.writeString(self.collectionId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.creationTimestamp)
    value = (value * 31) ^ hash(self.recordCount)
    value = (value * 31) ^ hash(self.interval)
    value = (value * 31) ^ hash(self.collectionId)
    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 TFieldStatistics:
  """
  Attributes:
   - collectionId
   - fieldName
   - typeHistogram
   - lengthsHistogram
   - recordCount
   - cardinalityEstimate
   - top40
   - heatmap
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'collectionId', None, None, ), # 1
    (2, TType.STRING, 'fieldName', None, None, ), # 2
    (3, TType.MAP, 'typeHistogram', (TType.STRING,None,TType.I64,None), None, ), # 3
    (4, TType.MAP, 'lengthsHistogram', (TType.I32,None,TType.I64,None), None, ), # 4
    (5, TType.I64, 'recordCount', None, None, ), # 5
    (6, TType.DOUBLE, 'cardinalityEstimate', None, None, ), # 6
    (7, TType.MAP, 'top40', (TType.STRING,None,TType.I32,None), None, ), # 7
    (8, TType.LIST, 'heatmap', (TType.I32,None), None, ), # 8
  )

  def __init__(self, collectionId=None, fieldName=None, typeHistogram=None, lengthsHistogram=None, recordCount=None, cardinalityEstimate=None, top40=None, heatmap=None,):
    self.collectionId = collectionId
    self.fieldName = fieldName
    self.typeHistogram = typeHistogram
    self.lengthsHistogram = lengthsHistogram
    self.recordCount = recordCount
    self.cardinalityEstimate = cardinalityEstimate
    self.top40 = top40
    self.heatmap = heatmap

  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.collectionId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.fieldName = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.typeHistogram = {}
          (_ktype70, _vtype71, _size69 ) = iprot.readMapBegin()
          for _i73 in xrange(_size69):
            _key74 = iprot.readString()
            _val75 = iprot.readI64()
            self.typeHistogram[_key74] = _val75
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.MAP:
          self.lengthsHistogram = {}
          (_ktype77, _vtype78, _size76 ) = iprot.readMapBegin()
          for _i80 in xrange(_size76):
            _key81 = iprot.readI32()
            _val82 = iprot.readI64()
            self.lengthsHistogram[_key81] = _val82
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.recordCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.DOUBLE:
          self.cardinalityEstimate = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.MAP:
          self.top40 = {}
          (_ktype84, _vtype85, _size83 ) = iprot.readMapBegin()
          for _i87 in xrange(_size83):
            _key88 = iprot.readString()
            _val89 = iprot.readI32()
            self.top40[_key88] = _val89
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.LIST:
          self.heatmap = []
          (_etype93, _size90) = iprot.readListBegin()
          for _i94 in xrange(_size90):
            _elem95 = iprot.readI32()
            self.heatmap.append(_elem95)
          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('TFieldStatistics')
    if self.collectionId is not None:
      oprot.writeFieldBegin('collectionId', TType.STRING, 1)
      oprot.writeString(self.collectionId)
      oprot.writeFieldEnd()
    if self.fieldName is not None:
      oprot.writeFieldBegin('fieldName', TType.STRING, 2)
      oprot.writeString(self.fieldName)
      oprot.writeFieldEnd()
    if self.typeHistogram is not None:
      oprot.writeFieldBegin('typeHistogram', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.typeHistogram))
      for kiter96,viter97 in self.typeHistogram.items():
        oprot.writeString(kiter96)
        oprot.writeI64(viter97)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.lengthsHistogram is not None:
      oprot.writeFieldBegin('lengthsHistogram', TType.MAP, 4)
      oprot.writeMapBegin(TType.I32, TType.I64, len(self.lengthsHistogram))
      for kiter98,viter99 in self.lengthsHistogram.items():
        oprot.writeI32(kiter98)
        oprot.writeI64(viter99)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.recordCount is not None:
      oprot.writeFieldBegin('recordCount', TType.I64, 5)
      oprot.writeI64(self.recordCount)
      oprot.writeFieldEnd()
    if self.cardinalityEstimate is not None:
      oprot.writeFieldBegin('cardinalityEstimate', TType.DOUBLE, 6)
      oprot.writeDouble(self.cardinalityEstimate)
      oprot.writeFieldEnd()
    if self.top40 is not None:
      oprot.writeFieldBegin('top40', TType.MAP, 7)
      oprot.writeMapBegin(TType.STRING, TType.I32, len(self.top40))
      for kiter100,viter101 in self.top40.items():
        oprot.writeString(kiter100)
        oprot.writeI32(viter101)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.heatmap is not None:
      oprot.writeFieldBegin('heatmap', TType.LIST, 8)
      oprot.writeListBegin(TType.I32, len(self.heatmap))
      for iter102 in self.heatmap:
        oprot.writeI32(iter102)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.collectionId)
    value = (value * 31) ^ hash(self.fieldName)
    value = (value * 31) ^ hash(self.typeHistogram)
    value = (value * 31) ^ hash(self.lengthsHistogram)
    value = (value * 31) ^ hash(self.recordCount)
    value = (value * 31) ^ hash(self.cardinalityEstimate)
    value = (value * 31) ^ hash(self.top40)
    value = (value * 31) ^ hash(self.heatmap)
    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 TCollectionStatistics:
  """
  Attributes:
   - fieldStatistics
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'fieldStatistics', (TType.STRUCT,(TFieldStatistics, TFieldStatistics.thrift_spec)), None, ), # 1
  )

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

  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.fieldStatistics = []
          (_etype106, _size103) = iprot.readListBegin()
          for _i107 in xrange(_size103):
            _elem108 = TFieldStatistics()
            _elem108.read(iprot)
            self.fieldStatistics.append(_elem108)
          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('TCollectionStatistics')
    if self.fieldStatistics is not None:
      oprot.writeFieldBegin('fieldStatistics', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.fieldStatistics))
      for iter109 in self.fieldStatistics:
        iter109.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.fieldStatistics)
    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 TCollectionGroupPermission:
  """
  Attributes:
   - id
   - groupId
   - permissions
   - collectionId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.I64, 'groupId', None, None, ), # 2
    (3, TType.LIST, 'permissions', (TType.STRING,None), None, ), # 3
    (4, TType.STRING, 'collectionId', None, None, ), # 4
  )

  def __init__(self, id=None, groupId=None, permissions=None, collectionId=None,):
    self.id = id
    self.groupId = groupId
    self.permissions = permissions
    self.collectionId = collectionId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.groupId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.permissions = []
          (_etype113, _size110) = iprot.readListBegin()
          for _i114 in xrange(_size110):
            _elem115 = iprot.readString()
            self.permissions.append(_elem115)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.collectionId = 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('TCollectionGroupPermission')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.groupId is not None:
      oprot.writeFieldBegin('groupId', TType.I64, 2)
      oprot.writeI64(self.groupId)
      oprot.writeFieldEnd()
    if self.permissions is not None:
      oprot.writeFieldBegin('permissions', TType.LIST, 3)
      oprot.writeListBegin(TType.STRING, len(self.permissions))
      for iter116 in self.permissions:
        oprot.writeString(iter116)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.collectionId is not None:
      oprot.writeFieldBegin('collectionId', TType.STRING, 4)
      oprot.writeString(self.collectionId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.groupId)
    value = (value * 31) ^ hash(self.permissions)
    value = (value * 31) ^ hash(self.collectionId)
    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 TCollection:
  """
  Attributes:
   - id
   - name
   - description
   - indexingPolicyId
   - tags
   - userId
   - createdTimestamp
   - updatedTimestamp
   - recordCountUpdatedTimestamp
   - recordCount
   - sizeInBytes
   - state
   - groupPermissionIds
   - hadoopDeleteJobIds
   - version
   - deleted
   - disableFieldStats
   - disableSampling
   - fieldStatsMinimumExecutionPeriod
   - samplingMinimumExecutionPeriod
   - aggregationMinimumExecutionPeriod
   - versionedCollectionId
   - importFlowId
   - importFlowIds
   - indexingPolicy
   - ageOffEnabled
   - ageOffDays
   - ageOffIndexDays
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'id', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
    (3, TType.STRING, 'description', None, None, ), # 3
    (4, TType.I64, 'indexingPolicyId', None, None, ), # 4
    (5, TType.SET, 'tags', (TType.STRING,None), None, ), # 5
    (6, TType.I64, 'userId', None, None, ), # 6
    (7, TType.I64, 'createdTimestamp', None, None, ), # 7
    (8, TType.I64, 'updatedTimestamp', None, None, ), # 8
    (9, TType.I64, 'recordCountUpdatedTimestamp', None, None, ), # 9
    (10, TType.I64, 'recordCount', None, None, ), # 10
    (11, TType.I64, 'sizeInBytes', None, None, ), # 11
    (12, TType.I32, 'state', None, None, ), # 12
    (13, TType.LIST, 'groupPermissionIds', (TType.I64,None), None, ), # 13
    (14, TType.LIST, 'hadoopDeleteJobIds', (TType.STRING,None), None, ), # 14
    (15, TType.I64, 'version', None, None, ), # 15
    (16, TType.BOOL, 'deleted', None, None, ), # 16
    (17, TType.BOOL, 'disableFieldStats', None, None, ), # 17
    (18, TType.BOOL, 'disableSampling', None, None, ), # 18
    (19, TType.I64, 'fieldStatsMinimumExecutionPeriod', None, None, ), # 19
    (20, TType.I64, 'samplingMinimumExecutionPeriod', None, None, ), # 20
    (21, TType.I64, 'aggregationMinimumExecutionPeriod', None, None, ), # 21
    (22, TType.STRING, 'versionedCollectionId', None, None, ), # 22
    (23, TType.I64, 'importFlowId', None, None, ), # 23
    (24, TType.LIST, 'importFlowIds', (TType.I64,None), None, ), # 24
    (25, TType.STRUCT, 'indexingPolicy', (TIndexingPolicy, TIndexingPolicy.thrift_spec), None, ), # 25
    (26, TType.BOOL, 'ageOffEnabled', None, None, ), # 26
    (27, TType.I64, 'ageOffDays', None, None, ), # 27
    (28, TType.I64, 'ageOffIndexDays', None, None, ), # 28
  )

  def __init__(self, id=None, name=None, description=None, indexingPolicyId=None, tags=None, userId=None, createdTimestamp=None, updatedTimestamp=None, recordCountUpdatedTimestamp=None, recordCount=None, sizeInBytes=None, state=None, groupPermissionIds=None, hadoopDeleteJobIds=None, version=None, deleted=None, disableFieldStats=None, disableSampling=None, fieldStatsMinimumExecutionPeriod=None, samplingMinimumExecutionPeriod=None, aggregationMinimumExecutionPeriod=None, versionedCollectionId=None, importFlowId=None, importFlowIds=None, indexingPolicy=None, ageOffEnabled=None, ageOffDays=None, ageOffIndexDays=None,):
    self.id = id
    self.name = name
    self.description = description
    self.indexingPolicyId = indexingPolicyId
    self.tags = tags
    self.userId = userId
    self.createdTimestamp = createdTimestamp
    self.updatedTimestamp = updatedTimestamp
    self.recordCountUpdatedTimestamp = recordCountUpdatedTimestamp
    self.recordCount = recordCount
    self.sizeInBytes = sizeInBytes
    self.state = state
    self.groupPermissionIds = groupPermissionIds
    self.hadoopDeleteJobIds = hadoopDeleteJobIds
    self.version = version
    self.deleted = deleted
    self.disableFieldStats = disableFieldStats
    self.disableSampling = disableSampling
    self.fieldStatsMinimumExecutionPeriod = fieldStatsMinimumExecutionPeriod
    self.samplingMinimumExecutionPeriod = samplingMinimumExecutionPeriod
    self.aggregationMinimumExecutionPeriod = aggregationMinimumExecutionPeriod
    self.versionedCollectionId = versionedCollectionId
    self.importFlowId = importFlowId
    self.importFlowIds = importFlowIds
    self.indexingPolicy = indexingPolicy
    self.ageOffEnabled = ageOffEnabled
    self.ageOffDays = ageOffDays
    self.ageOffIndexDays = ageOffIndexDays

  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.id = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.description = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.indexingPolicyId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.SET:
          self.tags = set()
          (_etype120, _size117) = iprot.readSetBegin()
          for _i121 in xrange(_size117):
            _elem122 = iprot.readString()
            self.tags.add(_elem122)
          iprot.readSetEnd()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.userId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.I64:
          self.createdTimestamp = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.I64:
          self.updatedTimestamp = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.I64:
          self.recordCountUpdatedTimestamp = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I64:
          self.recordCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.I64:
          self.sizeInBytes = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I32:
          self.state = iprot.readI32()
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.LIST:
          self.groupPermissionIds = []
          (_etype126, _size123) = iprot.readListBegin()
          for _i127 in xrange(_size123):
            _elem128 = iprot.readI64()
            self.groupPermissionIds.append(_elem128)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.LIST:
          self.hadoopDeleteJobIds = []
          (_etype132, _size129) = iprot.readListBegin()
          for _i133 in xrange(_size129):
            _elem134 = iprot.readString()
            self.hadoopDeleteJobIds.append(_elem134)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.I64:
          self.version = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.BOOL:
          self.deleted = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.BOOL:
          self.disableFieldStats = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.BOOL:
          self.disableSampling = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 19:
        if ftype == TType.I64:
          self.fieldStatsMinimumExecutionPeriod = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.I64:
          self.samplingMinimumExecutionPeriod = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.I64:
          self.aggregationMinimumExecutionPeriod = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.versionedCollectionId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 23:
        if ftype == TType.I64:
          self.importFlowId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 24:
        if ftype == TType.LIST:
          self.importFlowIds = []
          (_etype138, _size135) = iprot.readListBegin()
          for _i139 in xrange(_size135):
            _elem140 = iprot.readI64()
            self.importFlowIds.append(_elem140)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 25:
        if ftype == TType.STRUCT:
          self.indexingPolicy = TIndexingPolicy()
          self.indexingPolicy.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 26:
        if ftype == TType.BOOL:
          self.ageOffEnabled = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 27:
        if ftype == TType.I64:
          self.ageOffDays = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 28:
        if ftype == TType.I64:
          self.ageOffIndexDays = 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('TCollection')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.STRING, 1)
      oprot.writeString(self.id)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.description is not None:
      oprot.writeFieldBegin('description', TType.STRING, 3)
      oprot.writeString(self.description)
      oprot.writeFieldEnd()
    if self.indexingPolicyId is not None:
      oprot.writeFieldBegin('indexingPolicyId', TType.I64, 4)
      oprot.writeI64(self.indexingPolicyId)
      oprot.writeFieldEnd()
    if self.tags is not None:
      oprot.writeFieldBegin('tags', TType.SET, 5)
      oprot.writeSetBegin(TType.STRING, len(self.tags))
      for iter141 in self.tags:
        oprot.writeString(iter141)
      oprot.writeSetEnd()
      oprot.writeFieldEnd()
    if self.userId is not None:
      oprot.writeFieldBegin('userId', TType.I64, 6)
      oprot.writeI64(self.userId)
      oprot.writeFieldEnd()
    if self.createdTimestamp is not None:
      oprot.writeFieldBegin('createdTimestamp', TType.I64, 7)
      oprot.writeI64(self.createdTimestamp)
      oprot.writeFieldEnd()
    if self.updatedTimestamp is not None:
      oprot.writeFieldBegin('updatedTimestamp', TType.I64, 8)
      oprot.writeI64(self.updatedTimestamp)
      oprot.writeFieldEnd()
    if self.recordCountUpdatedTimestamp is not None:
      oprot.writeFieldBegin('recordCountUpdatedTimestamp', TType.I64, 9)
      oprot.writeI64(self.recordCountUpdatedTimestamp)
      oprot.writeFieldEnd()
    if self.recordCount is not None:
      oprot.writeFieldBegin('recordCount', TType.I64, 10)
      oprot.writeI64(self.recordCount)
      oprot.writeFieldEnd()
    if self.sizeInBytes is not None:
      oprot.writeFieldBegin('sizeInBytes', TType.I64, 11)
      oprot.writeI64(self.sizeInBytes)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 12)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    if self.groupPermissionIds is not None:
      oprot.writeFieldBegin('groupPermissionIds', TType.LIST, 13)
      oprot.writeListBegin(TType.I64, len(self.groupPermissionIds))
      for iter142 in self.groupPermissionIds:
        oprot.writeI64(iter142)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.hadoopDeleteJobIds is not None:
      oprot.writeFieldBegin('hadoopDeleteJobIds', TType.LIST, 14)
      oprot.writeListBegin(TType.STRING, len(self.hadoopDeleteJobIds))
      for iter143 in self.hadoopDeleteJobIds:
        oprot.writeString(iter143)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.version is not None:
      oprot.writeFieldBegin('version', TType.I64, 15)
      oprot.writeI64(self.version)
      oprot.writeFieldEnd()
    if self.deleted is not None:
      oprot.writeFieldBegin('deleted', TType.BOOL, 16)
      oprot.writeBool(self.deleted)
      oprot.writeFieldEnd()
    if self.disableFieldStats is not None:
      oprot.writeFieldBegin('disableFieldStats', TType.BOOL, 17)
      oprot.writeBool(self.disableFieldStats)
      oprot.writeFieldEnd()
    if self.disableSampling is not None:
      oprot.writeFieldBegin('disableSampling', TType.BOOL, 18)
      oprot.writeBool(self.disableSampling)
      oprot.writeFieldEnd()
    if self.fieldStatsMinimumExecutionPeriod is not None:
      oprot.writeFieldBegin('fieldStatsMinimumExecutionPeriod', TType.I64, 19)
      oprot.writeI64(self.fieldStatsMinimumExecutionPeriod)
      oprot.writeFieldEnd()
    if self.samplingMinimumExecutionPeriod is not None:
      oprot.writeFieldBegin('samplingMinimumExecutionPeriod', TType.I64, 20)
      oprot.writeI64(self.samplingMinimumExecutionPeriod)
      oprot.writeFieldEnd()
    if self.aggregationMinimumExecutionPeriod is not None:
      oprot.writeFieldBegin('aggregationMinimumExecutionPeriod', TType.I64, 21)
      oprot.writeI64(self.aggregationMinimumExecutionPeriod)
      oprot.writeFieldEnd()
    if self.versionedCollectionId is not None:
      oprot.writeFieldBegin('versionedCollectionId', TType.STRING, 22)
      oprot.writeString(self.versionedCollectionId)
      oprot.writeFieldEnd()
    if self.importFlowId is not None:
      oprot.writeFieldBegin('importFlowId', TType.I64, 23)
      oprot.writeI64(self.importFlowId)
      oprot.writeFieldEnd()
    if self.importFlowIds is not None:
      oprot.writeFieldBegin('importFlowIds', TType.LIST, 24)
      oprot.writeListBegin(TType.I64, len(self.importFlowIds))
      for iter144 in self.importFlowIds:
        oprot.writeI64(iter144)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.indexingPolicy is not None:
      oprot.writeFieldBegin('indexingPolicy', TType.STRUCT, 25)
      self.indexingPolicy.write(oprot)
      oprot.writeFieldEnd()
    if self.ageOffEnabled is not None:
      oprot.writeFieldBegin('ageOffEnabled', TType.BOOL, 26)
      oprot.writeBool(self.ageOffEnabled)
      oprot.writeFieldEnd()
    if self.ageOffDays is not None:
      oprot.writeFieldBegin('ageOffDays', TType.I64, 27)
      oprot.writeI64(self.ageOffDays)
      oprot.writeFieldEnd()
    if self.ageOffIndexDays is not None:
      oprot.writeFieldBegin('ageOffIndexDays', TType.I64, 28)
      oprot.writeI64(self.ageOffIndexDays)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.description)
    value = (value * 31) ^ hash(self.indexingPolicyId)
    value = (value * 31) ^ hash(self.tags)
    value = (value * 31) ^ hash(self.userId)
    value = (value * 31) ^ hash(self.createdTimestamp)
    value = (value * 31) ^ hash(self.updatedTimestamp)
    value = (value * 31) ^ hash(self.recordCountUpdatedTimestamp)
    value = (value * 31) ^ hash(self.recordCount)
    value = (value * 31) ^ hash(self.sizeInBytes)
    value = (value * 31) ^ hash(self.state)
    value = (value * 31) ^ hash(self.groupPermissionIds)
    value = (value * 31) ^ hash(self.hadoopDeleteJobIds)
    value = (value * 31) ^ hash(self.version)
    value = (value * 31) ^ hash(self.deleted)
    value = (value * 31) ^ hash(self.disableFieldStats)
    value = (value * 31) ^ hash(self.disableSampling)
    value = (value * 31) ^ hash(self.fieldStatsMinimumExecutionPeriod)
    value = (value * 31) ^ hash(self.samplingMinimumExecutionPeriod)
    value = (value * 31) ^ hash(self.aggregationMinimumExecutionPeriod)
    value = (value * 31) ^ hash(self.versionedCollectionId)
    value = (value * 31) ^ hash(self.importFlowId)
    value = (value * 31) ^ hash(self.importFlowIds)
    value = (value * 31) ^ hash(self.indexingPolicy)
    value = (value * 31) ^ hash(self.ageOffEnabled)
    value = (value * 31) ^ hash(self.ageOffDays)
    value = (value * 31) ^ hash(self.ageOffIndexDays)
    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 TDataSetAttributeType:
  """
  Attributes:
   - name
   - displayName
   - prevalence
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'name', None, None, ), # 1
    (2, TType.STRING, 'displayName', None, None, ), # 2
    (3, TType.DOUBLE, 'prevalence', None, None, ), # 3
  )

  def __init__(self, name=None, displayName=None, prevalence=None,):
    self.name = name
    self.displayName = displayName
    self.prevalence = prevalence

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TDataSetAttributeType')
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 1)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 2)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.prevalence is not None:
      oprot.writeFieldBegin('prevalence', TType.DOUBLE, 3)
      oprot.writeDouble(self.prevalence)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.displayName)
    value = (value * 31) ^ hash(self.prevalence)
    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 TCoordinateValues:
  """
  Attributes:
   - lat
   - lon
  """

  thrift_spec = (
    None, # 0
    (1, TType.DOUBLE, 'lat', None, None, ), # 1
    (2, TType.DOUBLE, 'lon', None, None, ), # 2
  )

  def __init__(self, lat=None, lon=None,):
    self.lat = lat
    self.lon = lon

  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.DOUBLE:
          self.lat = iprot.readDouble()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.DOUBLE:
          self.lon = iprot.readDouble()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TCoordinateValues')
    if self.lat is not None:
      oprot.writeFieldBegin('lat', TType.DOUBLE, 1)
      oprot.writeDouble(self.lat)
      oprot.writeFieldEnd()
    if self.lon is not None:
      oprot.writeFieldBegin('lon', TType.DOUBLE, 2)
      oprot.writeDouble(self.lon)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.lat)
    value = (value * 31) ^ hash(self.lon)
    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 TDataSetAttributeValueCount:
  """
  Attributes:
   - value
   - occurances
   - coordinates
   - countryId
   - opacity
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'value', None, None, ), # 1
    (2, TType.I64, 'occurances', None, None, ), # 2
    (3, TType.STRUCT, 'coordinates', (TCoordinateValues, TCoordinateValues.thrift_spec), None, ), # 3
    (4, TType.STRING, 'countryId', None, None, ), # 4
    (5, TType.DOUBLE, 'opacity', None, None, ), # 5
  )

  def __init__(self, value=None, occurances=None, coordinates=None, countryId=None, opacity=None,):
    self.value = value
    self.occurances = occurances
    self.coordinates = coordinates
    self.countryId = countryId
    self.opacity = opacity

  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.value = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.occurances = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.coordinates = TCoordinateValues()
          self.coordinates.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.countryId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.DOUBLE:
          self.opacity = iprot.readDouble()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('TDataSetAttributeValueCount')
    if self.value is not None:
      oprot.writeFieldBegin('value', TType.STRING, 1)
      oprot.writeString(self.value)
      oprot.writeFieldEnd()
    if self.occurances is not None:
      oprot.writeFieldBegin('occurances', TType.I64, 2)
      oprot.writeI64(self.occurances)
      oprot.writeFieldEnd()
    if self.coordinates is not None:
      oprot.writeFieldBegin('coordinates', TType.STRUCT, 3)
      self.coordinates.write(oprot)
      oprot.writeFieldEnd()
    if self.countryId is not None:
      oprot.writeFieldBegin('countryId', TType.STRING, 4)
      oprot.writeString(self.countryId)
      oprot.writeFieldEnd()
    if self.opacity is not None:
      oprot.writeFieldBegin('opacity', TType.DOUBLE, 5)
      oprot.writeDouble(self.opacity)
      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.occurances)
    value = (value * 31) ^ hash(self.coordinates)
    value = (value * 31) ^ hash(self.countryId)
    value = (value * 31) ^ hash(self.opacity)
    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 TDataSetAttribute:
  """
  Attributes:
   - id
   - dataSetId
   - name
   - presenceCount
   - uniqueValueCount
   - valueCount
   - visualizationType
   - types
   - values
   - indexed
   - masked
   - exceptedGroupIds
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'id', None, None, ), # 1
    (2, TType.STRING, 'dataSetId', None, None, ), # 2
    (3, TType.STRING, 'name', None, None, ), # 3
    (4, TType.I64, 'presenceCount', None, None, ), # 4
    (5, TType.I64, 'uniqueValueCount', None, None, ), # 5
    (6, TType.I64, 'valueCount', None, None, ), # 6
    (7, TType.STRING, 'visualizationType', None, None, ), # 7
    (8, TType.LIST, 'types', (TType.STRUCT,(TDataSetAttributeType, TDataSetAttributeType.thrift_spec)), None, ), # 8
    (9, TType.LIST, 'values', (TType.STRUCT,(TDataSetAttributeValueCount, TDataSetAttributeValueCount.thrift_spec)), None, ), # 9
    (10, TType.BOOL, 'indexed', None, None, ), # 10
    (11, TType.BOOL, 'masked', None, None, ), # 11
    (12, TType.LIST, 'exceptedGroupIds', (TType.I64,None), None, ), # 12
  )

  def __init__(self, id=None, dataSetId=None, name=None, presenceCount=None, uniqueValueCount=None, valueCount=None, visualizationType=None, types=None, values=None, indexed=None, masked=None, exceptedGroupIds=None,):
    self.id = id
    self.dataSetId = dataSetId
    self.name = name
    self.presenceCount = presenceCount
    self.uniqueValueCount = uniqueValueCount
    self.valueCount = valueCount
    self.visualizationType = visualizationType
    self.types = types
    self.values = values
    self.indexed = indexed
    self.masked = masked
    self.exceptedGroupIds = exceptedGroupIds

  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.id = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.dataSetId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.name = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.presenceCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.uniqueValueCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.valueCount = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.visualizationType = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.LIST:
          self.types = []
          (_etype148, _size145) = iprot.readListBegin()
          for _i149 in xrange(_size145):
            _elem150 = TDataSetAttributeType()
            _elem150.read(iprot)
            self.types.append(_elem150)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.LIST:
          self.values = []
          (_etype154, _size151) = iprot.readListBegin()
          for _i155 in xrange(_size151):
            _elem156 = TDataSetAttributeValueCount()
            _elem156.read(iprot)
            self.values.append(_elem156)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.BOOL:
          self.indexed = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 11:
        if ftype == TType.BOOL:
          self.masked = iprot.readBool()
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.LIST:
          self.exceptedGroupIds = []
          (_etype160, _size157) = iprot.readListBegin()
          for _i161 in xrange(_size157):
            _elem162 = iprot.readI64()
            self.exceptedGroupIds.append(_elem162)
          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('TDataSetAttribute')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.STRING, 1)
      oprot.writeString(self.id)
      oprot.writeFieldEnd()
    if self.dataSetId is not None:
      oprot.writeFieldBegin('dataSetId', TType.STRING, 2)
      oprot.writeString(self.dataSetId)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 3)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.presenceCount is not None:
      oprot.writeFieldBegin('presenceCount', TType.I64, 4)
      oprot.writeI64(self.presenceCount)
      oprot.writeFieldEnd()
    if self.uniqueValueCount is not None:
      oprot.writeFieldBegin('uniqueValueCount', TType.I64, 5)
      oprot.writeI64(self.uniqueValueCount)
      oprot.writeFieldEnd()
    if self.valueCount is not None:
      oprot.writeFieldBegin('valueCount', TType.I64, 6)
      oprot.writeI64(self.valueCount)
      oprot.writeFieldEnd()
    if self.visualizationType is not None:
      oprot.writeFieldBegin('visualizationType', TType.STRING, 7)
      oprot.writeString(self.visualizationType)
      oprot.writeFieldEnd()
    if self.types is not None:
      oprot.writeFieldBegin('types', TType.LIST, 8)
      oprot.writeListBegin(TType.STRUCT, len(self.types))
      for iter163 in self.types:
        iter163.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.values is not None:
      oprot.writeFieldBegin('values', TType.LIST, 9)
      oprot.writeListBegin(TType.STRUCT, len(self.values))
      for iter164 in self.values:
        iter164.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.indexed is not None:
      oprot.writeFieldBegin('indexed', TType.BOOL, 10)
      oprot.writeBool(self.indexed)
      oprot.writeFieldEnd()
    if self.masked is not None:
      oprot.writeFieldBegin('masked', TType.BOOL, 11)
      oprot.writeBool(self.masked)
      oprot.writeFieldEnd()
    if self.exceptedGroupIds is not None:
      oprot.writeFieldBegin('exceptedGroupIds', TType.LIST, 12)
      oprot.writeListBegin(TType.I64, len(self.exceptedGroupIds))
      for iter165 in self.exceptedGroupIds:
        oprot.writeI64(iter165)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.dataSetId)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.presenceCount)
    value = (value * 31) ^ hash(self.uniqueValueCount)
    value = (value * 31) ^ hash(self.valueCount)
    value = (value * 31) ^ hash(self.visualizationType)
    value = (value * 31) ^ hash(self.types)
    value = (value * 31) ^ hash(self.values)
    value = (value * 31) ^ hash(self.indexed)
    value = (value * 31) ^ hash(self.masked)
    value = (value * 31) ^ hash(self.exceptedGroupIds)
    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 TLabelAssignment:
  """
  Attributes:
   - id
   - labelId
   - dataSetId
  """

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

  def __init__(self, id=None, labelId=None, dataSetId=None,):
    self.id = id
    self.labelId = labelId
    self.dataSetId = dataSetId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.labelId = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.dataSetId = 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('TLabelAssignment')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.labelId is not None:
      oprot.writeFieldBegin('labelId', TType.I64, 2)
      oprot.writeI64(self.labelId)
      oprot.writeFieldEnd()
    if self.dataSetId is not None:
      oprot.writeFieldBegin('dataSetId', TType.STRING, 3)
      oprot.writeString(self.dataSetId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.labelId)
    value = (value * 31) ^ hash(self.dataSetId)
    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 TMaskedAttribute:
  """
  Attributes:
   - id
   - name
   - exceptedGroupIds
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.LIST:
          self.exceptedGroupIds = []
          (_etype169, _size166) = iprot.readListBegin()
          for _i170 in xrange(_size166):
            _elem171 = iprot.readI64()
            self.exceptedGroupIds.append(_elem171)
          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('TMaskedAttribute')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    if self.exceptedGroupIds is not None:
      oprot.writeFieldBegin('exceptedGroupIds', TType.LIST, 3)
      oprot.writeListBegin(TType.I64, len(self.exceptedGroupIds))
      for iter172 in self.exceptedGroupIds:
        oprot.writeI64(iter172)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.id)
    value = (value * 31) ^ hash(self.name)
    value = (value * 31) ^ hash(self.exceptedGroupIds)
    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 TMaskedAttributes:
  """
  Attributes:
   - dataSetId
   - attributes
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'dataSetId', None, None, ), # 1
    (2, TType.LIST, 'attributes', (TType.STRUCT,(TMaskedAttribute, TMaskedAttribute.thrift_spec)), None, ), # 2
  )

  def __init__(self, dataSetId=None, attributes=None,):
    self.dataSetId = dataSetId
    self.attributes = attributes

  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.dataSetId = iprot.readString()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.LIST:
          self.attributes = []
          (_etype176, _size173) = iprot.readListBegin()
          for _i177 in xrange(_size173):
            _elem178 = TMaskedAttribute()
            _elem178.read(iprot)
            self.attributes.append(_elem178)
          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('TMaskedAttributes')
    if self.dataSetId is not None:
      oprot.writeFieldBegin('dataSetId', TType.STRING, 1)
      oprot.writeString(self.dataSetId)
      oprot.writeFieldEnd()
    if self.attributes is not None:
      oprot.writeFieldBegin('attributes', TType.LIST, 2)
      oprot.writeListBegin(TType.STRUCT, len(self.attributes))
      for iter179 in self.attributes:
        iter179.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __hash__(self):
    value = 17
    value = (value * 31) ^ hash(self.dataSetId)
    value = (value * 31) ^ hash(self.attributes)
    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)
