Python thrift.Thrift.TType.MAP Examples

The following are 30 code examples of thrift.Thrift.TType.MAP(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module thrift.Thrift.TType , or try the search function .
Example #1
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 6 votes vote down vote up
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.item = {}
          (_ktype208, _vtype209, _size207 ) = iprot.readMapBegin()
          for _i211 in xrange(_size207):
            _key212 = iprot.readString();
            _val213 = Datum()
            _val213.read(iprot)
            self.item[_key212] = _val213
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd() 
Example #2
Source File: AccountSupervisorService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype375, _vtype376, _size374) = iprot.readMapBegin()
                    for _i378 in range(_size374):
                        _key379 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val380 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameterMap[_key379] = _val380
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd() 
Example #3
Source File: ttypes.py    From rift-python with Apache License 2.0 6 votes vote down vote up
def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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.keyvalues = {}
                    (_ktype54, _vtype55, _size53) = iprot.readMapBegin()
                    for _i57 in range(_size53):
                        _key58 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val59 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.keyvalues[_key58] = _val59
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd() 
Example #4
Source File: ChannelApplicationProvidedService.py    From LineVodka with GNU General Public License v3.0 6 votes vote down vote up
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('getUserIdentities_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.MAP, 0)
      oprot.writeMapBegin(TType.I32, TType.STRING, len(self.success))
      for kiter626,viter627 in self.success.items():
        oprot.writeI32(kiter626)
        oprot.writeString(viter627)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.e is not None:
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
      self.e.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #5
Source File: ttypes.py    From cassandra-dtest with Apache License 2.0 6 votes vote down vote up
def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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.credentials = {}
                    (_ktype71, _vtype72, _size70) = iprot.readMapBegin()
                    for _i74 in range(_size70):
                        _key75 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val76 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.credentials[_key75] = _val76
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd() 
Example #6
Source File: ttypes.py    From rift-python with Apache License 2.0 6 votes vote down vote up
def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (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.keyvalues = {}
                    (_ktype54, _vtype55, _size53) = iprot.readMapBegin()
                    for _i57 in range(_size53):
                        _key58 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val59 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.keyvalues[_key58] = _val59
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd() 
Example #7
Source File: BuddyService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('getNewlyReleasedBuddyIds_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.MAP, 0)
            oprot.writeMapBegin(TType.STRING, TType.I64, len(self.success))
            for kiter561, viter562 in self.success.items():
                oprot.writeString(kiter561.encode('utf-8') if sys.version_info[0] == 2 else kiter561)
                oprot.writeI64(viter562)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        if self.e is not None:
            oprot.writeFieldBegin('e', TType.STRUCT, 1)
            self.e.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd() 
Example #8
Source File: ttypes.py    From cassandra-dtest with Apache License 2.0 6 votes vote down vote up
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.credentials = {}
          (_ktype64, _vtype65, _size63 ) = iprot.readMapBegin() 
          for _i67 in range(_size63):
            _key68 = iprot.readString();
            _val69 = iprot.readString();
            self.credentials[_key68] = _val69
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd() 
Example #9
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 6 votes vote down vote up
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.data = {}
          (_ktype58, _vtype59, _size57 ) = iprot.readMapBegin()
          for _i61 in xrange(_size57):
            _key62 = iprot.readString();
            _val63 = sds.table.ttypes.Datum()
            _val63.read(iprot)
            self.data[_key62] = _val63
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd() 
Example #10
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 6 votes vote down vote up
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('RCBasicMeta')
    if self.keys is not None:
      oprot.writeFieldBegin('keys', TType.LIST, 1)
      oprot.writeListBegin(TType.STRING, len(self.keys))
      for iter22 in self.keys:
        oprot.writeString(iter22)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.types is not None:
      oprot.writeFieldBegin('types', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.I32, len(self.types))
      for kiter23,viter24 in self.types.items():
        oprot.writeString(kiter23)
        oprot.writeI32(viter24)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #11
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 6 votes vote down vote up
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('DatumMapRecord')
    if self.data is not None:
      oprot.writeFieldBegin('data', TType.MAP, 1)
      oprot.writeMapBegin(TType.I16, TType.STRUCT, len(self.data))
      for kiter46,viter47 in self.data.items():
        oprot.writeI16(kiter46)
        viter47.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.keyIdMap is not None:
      oprot.writeFieldBegin('keyIdMap', TType.MAP, 2)
      oprot.writeMapBegin(TType.I16, TType.STRING, len(self.keyIdMap))
      for kiter48,viter49 in self.keyIdMap.items():
        oprot.writeI16(kiter48)
        oprot.writeString(viter49)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #12
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 6 votes vote down vote up
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.keyIdMap = {}
          (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin()
          for _i4 in xrange(_size0):
            _key5 = iprot.readI16();
            _val6 = iprot.readString();
            self.keyIdMap[_key5] = _val6
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd() 
Example #13
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 6 votes vote down vote up
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('KeysOnlyEntry')
    if self.record is not None:
      oprot.writeFieldBegin('record', TType.MAP, 1)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.record))
      for kiter391,viter392 in self.record.items():
        oprot.writeString(kiter391)
        viter392.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 2)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.tableName is not None:
      oprot.writeFieldBegin('tableName', TType.STRING, 3)
      oprot.writeString(self.tableName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #14
Source File: AccountSupervisorService.py    From linepy-modified with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 2:
                if ftype == TType.MAP:
                    self.parameterMap = {}
                    (_ktype1279, _vtype1280, _size1278) = iprot.readMapBegin()
                    for _i1282 in range(_size1278):
                        _key1283 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val1284 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.parameterMap[_key1283] = _val1284
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd() 
Example #15
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 6 votes vote down vote up
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.amounts = {}
          (_ktype244, _vtype245, _size243 ) = iprot.readMapBegin()
          for _i247 in xrange(_size243):
            _key248 = iprot.readString();
            _val249 = Datum()
            _val249.read(iprot)
            self.amounts[_key248] = _val249
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd() 
Example #16
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 6 votes vote down vote up
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('TableSplit')
    if self.startKey is not None:
      oprot.writeFieldBegin('startKey', TType.MAP, 1)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.startKey))
      for kiter187,viter188 in self.startKey.items():
        oprot.writeString(kiter187)
        viter188.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.stopKey is not None:
      oprot.writeFieldBegin('stopKey', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.stopKey))
      for kiter189,viter190 in self.stopKey.items():
        oprot.writeString(kiter189)
        viter190.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #17
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 6 votes vote down vote up
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('PutRequest')
    if self.tableName is not None:
      oprot.writeFieldBegin('tableName', TType.STRING, 1)
      oprot.writeString(self.tableName)
      oprot.writeFieldEnd()
    if self.record is not None:
      oprot.writeFieldBegin('record', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.record))
      for kiter223,viter224 in self.record.items():
        oprot.writeString(kiter223)
        viter224.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.condition is not None:
      oprot.writeFieldBegin('condition', TType.STRUCT, 3)
      self.condition.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #18
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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('SendMessageBatchRequestEntry')
    if self.entryId is not None:
      oprot.writeFieldBegin('entryId', TType.STRING, 1)
      oprot.writeString(self.entryId)
      oprot.writeFieldEnd()
    if self.messageBody is not None:
      oprot.writeFieldBegin('messageBody', TType.STRING, 2)
      oprot.writeString(self.messageBody)
      oprot.writeFieldEnd()
    if self.delaySeconds is not None:
      oprot.writeFieldBegin('delaySeconds', TType.I32, 3)
      oprot.writeI32(self.delaySeconds)
      oprot.writeFieldEnd()
    if self.invisibilitySeconds is not None:
      oprot.writeFieldBegin('invisibilitySeconds', TType.I32, 4)
      oprot.writeI32(self.invisibilitySeconds)
      oprot.writeFieldEnd()
    if self.messageAttributes is not None:
      oprot.writeFieldBegin('messageAttributes', TType.MAP, 5)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.messageAttributes))
      for kiter16,viter17 in self.messageAttributes.items():
        oprot.writeString(kiter16)
        viter17.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.priority is not None:
      oprot.writeFieldBegin('priority', TType.I32, 6)
      oprot.writeI32(self.priority)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #19
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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('ListPermissionsResponse')
    if self.permissionList is not None:
      oprot.writeFieldBegin('permissionList', TType.MAP, 1)
      oprot.writeMapBegin(TType.STRING, TType.I32, len(self.permissionList))
      for kiter37,viter38 in self.permissionList.items():
        oprot.writeString(kiter37)
        oprot.writeI32(viter38)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #20
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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('ReceiveMessageResponse')
    if self.messageID is not None:
      oprot.writeFieldBegin('messageID', TType.STRING, 1)
      oprot.writeString(self.messageID)
      oprot.writeFieldEnd()
    if self.receiptHandle is not None:
      oprot.writeFieldBegin('receiptHandle', TType.STRING, 2)
      oprot.writeString(self.receiptHandle)
      oprot.writeFieldEnd()
    if self.messageBody is not None:
      oprot.writeFieldBegin('messageBody', TType.STRING, 3)
      oprot.writeString(self.messageBody)
      oprot.writeFieldEnd()
    if self.attributes is not None:
      oprot.writeFieldBegin('attributes', TType.MAP, 4)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes))
      for kiter53,viter54 in self.attributes.items():
        oprot.writeString(kiter53)
        oprot.writeString(viter54)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.messageAttributes is not None:
      oprot.writeFieldBegin('messageAttributes', TType.MAP, 5)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.messageAttributes))
      for kiter55,viter56 in self.messageAttributes.items():
        oprot.writeString(kiter55)
        viter56.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #21
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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('CreateTagRequest')
    if self.queueName is not None:
      oprot.writeFieldBegin('queueName', TType.STRING, 1)
      oprot.writeString(self.queueName)
      oprot.writeFieldEnd()
    if self.tagName is not None:
      oprot.writeFieldBegin('tagName', TType.STRING, 2)
      oprot.writeString(self.tagName)
      oprot.writeFieldEnd()
    if self.startTimestamp is not None:
      oprot.writeFieldBegin('startTimestamp', TType.I64, 3)
      oprot.writeI64(self.startTimestamp)
      oprot.writeFieldEnd()
    if self.readQPSQuota is not None:
      oprot.writeFieldBegin('readQPSQuota', TType.I64, 4)
      oprot.writeI64(self.readQPSQuota)
      oprot.writeFieldEnd()
    if self.attributeName is not None:
      oprot.writeFieldBegin('attributeName', TType.STRING, 5)
      oprot.writeString(self.attributeName)
      oprot.writeFieldEnd()
    if self.attributeValue is not None:
      oprot.writeFieldBegin('attributeValue', TType.STRUCT, 6)
      self.attributeValue.write(oprot)
      oprot.writeFieldEnd()
    if self.userAttributes is not None:
      oprot.writeFieldBegin('userAttributes', TType.MAP, 7)
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.userAttributes))
      for kiter46,viter47 in self.userAttributes.items():
        oprot.writeString(kiter46)
        oprot.writeString(viter47)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #22
Source File: AccountSupervisorService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
            return
        oprot.writeStructBegin('notifyEmailConfirmationResult_args')
        if self.parameterMap is not None:
            oprot.writeFieldBegin('parameterMap', TType.MAP, 2)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap))
            for kiter381, viter382 in self.parameterMap.items():
                oprot.writeString(kiter381.encode('utf-8') if sys.version_info[0] == 2 else kiter381)
                oprot.writeString(viter382.encode('utf-8') if sys.version_info[0] == 2 else viter382)
            oprot.writeMapEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd() 
Example #23
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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('RecordImage')
    if self.record is not None:
      oprot.writeFieldBegin('record', TType.MAP, 1)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.record))
      for kiter382,viter383 in self.record.items():
        oprot.writeString(kiter382)
        viter383.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.rowDeleted is not None:
      oprot.writeFieldBegin('rowDeleted', TType.BOOL, 2)
      oprot.writeBool(self.rowDeleted)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 3)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.tableName is not None:
      oprot.writeFieldBegin('tableName', TType.STRING, 4)
      oprot.writeString(self.tableName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #24
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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.record = {}
          (_ktype376, _vtype377, _size375 ) = iprot.readMapBegin()
          for _i379 in xrange(_size375):
            _key380 = iprot.readString();
            _val381 = Datum()
            _val381.read(iprot)
            self.record[_key380] = _val381
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.BOOL:
          self.rowDeleted = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.timestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.tableName = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd() 
Example #25
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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('MutationLogEntry')
    if self.record is not None:
      oprot.writeFieldBegin('record', TType.MAP, 1)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.record))
      for kiter371,viter372 in self.record.items():
        oprot.writeString(kiter371)
        viter372.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 2)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.rowDeleted is not None:
      oprot.writeFieldBegin('rowDeleted', TType.BOOL, 3)
      oprot.writeBool(self.rowDeleted)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 4)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.amounts is not None:
      oprot.writeFieldBegin('amounts', TType.MAP, 5)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.amounts))
      for kiter373,viter374 in self.amounts.items():
        oprot.writeString(kiter373)
        viter374.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.tableName is not None:
      oprot.writeFieldBegin('tableName', TType.STRING, 6)
      oprot.writeString(self.tableName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #26
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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('RemoveRequest')
    if self.tableName is not None:
      oprot.writeFieldBegin('tableName', TType.STRING, 1)
      oprot.writeString(self.tableName)
      oprot.writeFieldEnd()
    if self.keys is not None:
      oprot.writeFieldBegin('keys', TType.MAP, 2)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.keys))
      for kiter265,viter266 in self.keys.items():
        oprot.writeString(kiter265)
        viter266.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.attributes is not None:
      oprot.writeFieldBegin('attributes', TType.LIST, 3)
      oprot.writeListBegin(TType.STRING, len(self.attributes))
      for iter267 in self.attributes:
        oprot.writeString(iter267)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.condition is not None:
      oprot.writeFieldBegin('condition', TType.STRUCT, 4)
      self.condition.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #27
Source File: BuddyService.py    From simpleSB with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.MAP:
                    self.success = {}
                    (_ktype555, _vtype556, _size554) = iprot.readMapBegin()
                    for _i558 in range(_size554):
                        _key559 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val560 = iprot.readI64()
                        self.success[_key559] = _val560
                    iprot.readMapEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.e = TalkException()
                    self.e.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd() 
Example #28
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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('IncrementResult')
    if self.amounts is not None:
      oprot.writeFieldBegin('amounts', TType.MAP, 1)
      oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.amounts))
      for kiter250,viter251 in self.amounts.items():
        oprot.writeString(kiter250)
        viter251.write(oprot)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd() 
Example #29
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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.MAP:
          self.record = {}
          (_ktype217, _vtype218, _size216 ) = iprot.readMapBegin()
          for _i220 in xrange(_size216):
            _key221 = iprot.readString();
            _val222 = Datum()
            _val222.read(iprot)
            self.record[_key221] = _val222
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRUCT:
          self.condition = SimpleCondition()
          self.condition.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd() 
Example #30
Source File: ttypes.py    From galaxy-sdk-python with Apache License 2.0 5 votes vote down vote up
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.keys = []
          (_etype12, _size9) = iprot.readListBegin()
          for _i13 in xrange(_size9):
            _elem14 = iprot.readString();
            self.keys.append(_elem14)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.types = {}
          (_ktype16, _vtype17, _size15 ) = iprot.readMapBegin()
          for _i19 in xrange(_size15):
            _key20 = iprot.readString();
            _val21 = iprot.readI32();
            self.types[_key20] = _val21
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()