Python thrift.Thrift.TType.STRUCT Examples
The following are 30
code examples of thrift.Thrift.TType.STRUCT().
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 cassandra-dtest with Apache License 2.0 | 6 votes |
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('KeySlice') if self.key is not None: oprot.writeFieldBegin('key', TType.STRING, 1) oprot.writeBinary(self.key) oprot.writeFieldEnd() if self.columns is not None: oprot.writeFieldBegin('columns', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.columns)) for iter41 in self.columns: iter41.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #2
Source File: ttypes.py From rift-python with Apache License 2.0 | 6 votes |
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.STRUCT: self.header = TIEHeader() self.header.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.remaining_lifetime = iprot.readI32() 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 |
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('TIEHeader') if self.tieid is not None: oprot.writeFieldBegin('tieid', TType.STRUCT, 2) self.tieid.write(oprot) oprot.writeFieldEnd() if self.seq_nr is not None: oprot.writeFieldBegin('seq_nr', TType.I16, 3) oprot.writeI16(self.seq_nr) oprot.writeFieldEnd() if self.origination_time is not None: oprot.writeFieldBegin('origination_time', TType.STRUCT, 10) self.origination_time.write(oprot) oprot.writeFieldEnd() if self.origination_lifetime is not None: oprot.writeFieldBegin('origination_lifetime', TType.I32, 12) oprot.writeI32(self.origination_lifetime) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #4
Source File: ttypes.py From rift-python with Apache License 2.0 | 6 votes |
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.STRUCT: self.header = PacketHeader() self.header.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.content = PacketContent() self.content.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #5
Source File: ttypes.py From rift-python with Apache License 2.0 | 6 votes |
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.STRUCT: self.ipv4prefix = IPv4PrefixType() self.ipv4prefix.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.ipv6prefix = IPv6PrefixType() self.ipv6prefix.read(iprot) 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 |
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.STRUCT: self.header = TIEHeader() self.header.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.remaining_lifetime = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #7
Source File: ttypes.py From rift-python with Apache License 2.0 | 6 votes |
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.STRUCT: self.timestamp = IEEE802_1ASTimeStampType() self.timestamp.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.BYTE: self.transactionid = iprot.readByte() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #8
Source File: ttypes.py From rift-python with Apache License 2.0 | 6 votes |
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.STRUCT: self.header = TIEHeader() self.header.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.element = TIEElement() self.element.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #9
Source File: ttypes.py From rift-python with Apache License 2.0 | 6 votes |
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.STRUCT: self.header = PacketHeader() self.header.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.content = PacketContent() self.content.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #10
Source File: ttypes.py From rift-python with Apache License 2.0 | 6 votes |
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.STRUCT: self.ipv4prefix = IPv4PrefixType() self.ipv4prefix.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.ipv6prefix = IPv6PrefixType() self.ipv6prefix.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #11
Source File: ttypes.py From rift-python with Apache License 2.0 | 6 votes |
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.STRUCT: self.timestamp = IEEE802_1ASTimeStampType() self.timestamp.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.BYTE: self.transactionid = iprot.readByte() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #12
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('SuperColumn') if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 1) oprot.writeBinary(self.name) oprot.writeFieldEnd() if self.columns is not None: oprot.writeFieldBegin('columns', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.columns)) for iter6 in self.columns: iter6.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #13
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('CounterSuperColumn') if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 1) oprot.writeBinary(self.name) oprot.writeFieldEnd() if self.columns is not None: oprot.writeFieldBegin('columns', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.columns)) for iter13 in self.columns: iter13.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #14
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('ColumnOrSuperColumn') if self.column is not None: oprot.writeFieldBegin('column', TType.STRUCT, 1) self.column.write(oprot) oprot.writeFieldEnd() if self.super_column is not None: oprot.writeFieldBegin('super_column', TType.STRUCT, 2) self.super_column.write(oprot) oprot.writeFieldEnd() if self.counter_column is not None: oprot.writeFieldBegin('counter_column', TType.STRUCT, 3) self.counter_column.write(oprot) oprot.writeFieldEnd() if self.counter_super_column is not None: oprot.writeFieldBegin('counter_super_column', TType.STRUCT, 4) self.counter_super_column.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #15
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('IndexClause') if self.expressions is not None: oprot.writeFieldBegin('expressions', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.expressions)) for iter27 in self.expressions: iter27.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.start_key is not None: oprot.writeFieldBegin('start_key', TType.STRING, 2) oprot.writeBinary(self.start_key) oprot.writeFieldEnd() if self.count is not None: oprot.writeFieldBegin('count', TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #16
Source File: ttypes.py From rift-python with Apache License 2.0 | 6 votes |
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('TIEHeader') if self.tieid is not None: oprot.writeFieldBegin('tieid', TType.STRUCT, 2) self.tieid.write(oprot) oprot.writeFieldEnd() if self.seq_nr is not None: oprot.writeFieldBegin('seq_nr', TType.I16, 3) oprot.writeI16(self.seq_nr) oprot.writeFieldEnd() if self.origination_time is not None: oprot.writeFieldBegin('origination_time', TType.STRUCT, 10) self.origination_time.write(oprot) oprot.writeFieldEnd() if self.origination_lifetime is not None: oprot.writeFieldBegin('origination_lifetime', TType.I32, 12) oprot.writeI32(self.origination_lifetime) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #17
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('Deletion') if self.timestamp is not None: oprot.writeFieldBegin('timestamp', TType.I64, 1) oprot.writeI64(self.timestamp) oprot.writeFieldEnd() if self.super_column is not None: oprot.writeFieldBegin('super_column', TType.STRING, 2) oprot.writeBinary(self.super_column) oprot.writeFieldEnd() if self.predicate is not None: oprot.writeFieldBegin('predicate', TType.STRUCT, 3) self.predicate.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #18
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('CASResult') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 1) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.current_values is not None: oprot.writeFieldBegin('current_values', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.current_values)) for iter48 in self.current_values: iter48.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #19
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('CqlRow') if self.key is not None: oprot.writeFieldBegin('key', TType.STRING, 1) oprot.writeBinary(self.key) oprot.writeFieldEnd() if self.columns is not None: oprot.writeFieldBegin('columns', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.columns)) for iter151 in self.columns: iter151.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #20
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('SuperColumn') if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 1) oprot.writeString(self.name) oprot.writeFieldEnd() if self.columns is not None: oprot.writeFieldBegin('columns', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.columns)) for iter6 in self.columns: iter6.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #21
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('CounterSuperColumn') if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 1) oprot.writeString(self.name) oprot.writeFieldEnd() if self.columns is not None: oprot.writeFieldBegin('columns', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.columns)) for iter13 in self.columns: iter13.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #22
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('ColumnOrSuperColumn') if self.column is not None: oprot.writeFieldBegin('column', TType.STRUCT, 1) self.column.write(oprot) oprot.writeFieldEnd() if self.super_column is not None: oprot.writeFieldBegin('super_column', TType.STRUCT, 2) self.super_column.write(oprot) oprot.writeFieldEnd() if self.counter_column is not None: oprot.writeFieldBegin('counter_column', TType.STRUCT, 3) self.counter_column.write(oprot) oprot.writeFieldEnd() if self.counter_super_column is not None: oprot.writeFieldBegin('counter_super_column', TType.STRUCT, 4) self.counter_super_column.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #23
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('SlicePredicate') if self.column_names is not None: oprot.writeFieldBegin('column_names', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.column_names)) for iter20 in self.column_names: oprot.writeString(iter20) oprot.writeListEnd() oprot.writeFieldEnd() if self.slice_range is not None: oprot.writeFieldBegin('slice_range', TType.STRUCT, 2) self.slice_range.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #24
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('IndexClause') if self.expressions is not None: oprot.writeFieldBegin('expressions', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.expressions)) for iter27 in self.expressions: iter27.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.start_key is not None: oprot.writeFieldBegin('start_key', TType.STRING, 2) oprot.writeString(self.start_key) oprot.writeFieldEnd() if self.count is not None: oprot.writeFieldBegin('count', TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #25
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('Deletion') if self.timestamp is not None: oprot.writeFieldBegin('timestamp', TType.I64, 1) oprot.writeI64(self.timestamp) oprot.writeFieldEnd() if self.super_column is not None: oprot.writeFieldBegin('super_column', TType.STRING, 2) oprot.writeString(self.super_column) oprot.writeFieldEnd() if self.predicate is not None: oprot.writeFieldBegin('predicate', TType.STRUCT, 3) self.predicate.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #26
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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.column_or_supercolumn = ColumnOrSuperColumn() self.column_or_supercolumn.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.deletion = Deletion() self.deletion.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #27
Source File: ttypes.py From cassandra-dtest with Apache License 2.0 | 6 votes |
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('CqlRow') if self.key is not None: oprot.writeFieldBegin('key', TType.STRING, 1) oprot.writeString(self.key) oprot.writeFieldEnd() if self.columns is not None: oprot.writeFieldBegin('columns', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.columns)) for iter135 in self.columns: iter135.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd()
Example #28
Source File: AuthService.py From galaxy-sdk-python with Apache License 2.0 | 6 votes |
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 == 0: if ftype == TType.STRUCT: self.success = Credential() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.se = rpc.errors.ttypes.ServiceException() self.se.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #29
Source File: BaseService.py From galaxy-sdk-python with Apache License 2.0 | 6 votes |
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 == 0: if ftype == TType.STRUCT: self.success = Version() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.se = rpc.errors.ttypes.ServiceException() self.se.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()
Example #30
Source File: BaseService.py From galaxy-sdk-python with Apache License 2.0 | 6 votes |
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.clientVersion = Version() self.clientVersion.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd()