# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @generated # from __future__ import absolute_import import sys from thrift.util.Recursive import fix_spec from thrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterface, TProcessor, TException, TApplicationException, UnimplementedTypedef from thrift.protocol.TProtocol import TProtocolException from json import loads import sys if sys.version_info[0] >= 3: long = int from .ttypes import UTF8STRINGS, MyEnum, HackEnum, MyStruct, MyDataItem, MyUnion, ReservedKeyword, UnionToBeRenamed from thrift.Thrift import TProcessor import pprint import warnings from thrift import Thrift from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol from thrift.protocol import TCompactProtocol from thrift.protocol import THeaderProtocol fastproto = None try: from thrift.protocol import fastproto except ImportError: pass def __EXPAND_THRIFT_SPEC(spec): next_id = 0 for item in spec: if next_id >= 0 and item[0] < 0: next_id = item[0] if item[0] != next_id: for _ in range(next_id, item[0]): yield None yield item next_id = item[0] + 1 class ThriftEnumWrapper(int): def __new__(cls, enum_class, value): return super().__new__(cls, value) def __init__(self, enum_class, value): self.enum_class = enum_class def __repr__(self): return self.enum_class.__name__ + '.' + self.enum_class._VALUES_TO_NAMES[self] all_structs = [] UTF8STRINGS = bool(0) or sys.version_info.major >= 3 from thrift.util.Decorators import ( future_process_main, future_process_method, process_main as thrift_process_main, process_method as thrift_process_method, should_run_on_thread, write_results_after_future, ) class Iface: def ping(self, ): pass def getRandomData(self, ): pass def sink(self, sink=None): r""" Parameters: - sink """ pass def putDataById(self, id=None, data=None): r""" Parameters: - id - data """ pass def hasDataById(self, id=None): r""" Parameters: - id """ pass def getDataById(self, id=None): r""" Parameters: - id """ pass def deleteDataById(self, id=None): r""" Parameters: - id """ pass def lobDataById(self, id=None, data=None): r""" Parameters: - id - data """ pass def invalid_return_for_hack(self, ): pass def rpc_skipped_codegen(self, ): pass class ContextIface: def ping(self, handler_ctx, ): pass def getRandomData(self, handler_ctx, ): pass def sink(self, handler_ctx, sink=None): r""" Parameters: - sink """ pass def putDataById(self, handler_ctx, id=None, data=None): r""" Parameters: - id - data """ pass def hasDataById(self, handler_ctx, id=None): r""" Parameters: - id """ pass def getDataById(self, handler_ctx, id=None): r""" Parameters: - id """ pass def deleteDataById(self, handler_ctx, id=None): r""" Parameters: - id """ pass def lobDataById(self, handler_ctx, id=None, data=None): r""" Parameters: - id - data """ pass def invalid_return_for_hack(self, handler_ctx, ): pass def rpc_skipped_codegen(self, handler_ctx, ): pass # HELPER FUNCTIONS AND STRUCTURES class ping_args: thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('ping_args') oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) def __repr__(self): L = [] padding = ' ' * 4 return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( ) __hash__ = object.__hash__ all_structs.append(ping_args) ping_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( ))) ping_args.thrift_struct_annotations = { } ping_args.thrift_field_annotations = { } class ping_result: thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('ping_result') oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) def __repr__(self): L = [] padding = ' ' * 4 return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( ) __hash__ = object.__hash__ all_structs.append(ping_result) ping_result.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( ))) ping_result.thrift_struct_annotations = { } ping_result.thrift_field_annotations = { } class getRandomData_args: thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('getRandomData_args') oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) def __repr__(self): L = [] padding = ' ' * 4 return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( ) __hash__ = object.__hash__ all_structs.append(getRandomData_args) getRandomData_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( ))) getRandomData_args.thrift_struct_annotations = { } getRandomData_args.thrift_field_annotations = { } class getRandomData_result: r""" Attributes: - success """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('getRandomData_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8')) if UTF8STRINGS and not isinstance(self.success, bytes) else oprot.writeString(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'success' in json_obj and json_obj['success'] is not None: self.success = json_obj['success'] def __repr__(self): L = [] padding = ' ' * 4 if self.success is not None: value = pprint.pformat(self.success, indent=0) value = padding.join(value.splitlines(True)) L.append(' success=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'success', ) __hash__ = object.__hash__ all_structs.append(getRandomData_result) getRandomData_result.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (0, TType.STRING, 'success', True, None, 2, ), # 0 ))) getRandomData_result.thrift_struct_annotations = { } getRandomData_result.thrift_field_annotations = { } def getRandomData_result__init__(self, success=None,): self.success = success getRandomData_result.__init__ = getRandomData_result__init__ def getRandomData_result__setstate__(self, state): state.setdefault('success', None) self.__dict__ = state getRandomData_result.__getstate__ = lambda self: self.__dict__.copy() getRandomData_result.__setstate__ = getRandomData_result__setstate__ class sink_args: r""" Attributes: - sink """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I64: self.sink = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('sink_args') if self.sink != None: oprot.writeFieldBegin('sink', TType.I64, 1) oprot.writeI64(self.sink) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'sink' in json_obj and json_obj['sink'] is not None: self.sink = long(json_obj['sink']) def __repr__(self): L = [] padding = ' ' * 4 if self.sink is not None: value = pprint.pformat(self.sink, indent=0) value = padding.join(value.splitlines(True)) L.append(' sink=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'sink', ) __hash__ = object.__hash__ all_structs.append(sink_args) sink_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (1, TType.I64, 'sink', None, None, 2, ), # 1 ))) sink_args.thrift_struct_annotations = { } sink_args.thrift_field_annotations = { } def sink_args__init__(self, sink=None,): self.sink = sink sink_args.__init__ = sink_args__init__ def sink_args__setstate__(self, state): state.setdefault('sink', None) self.__dict__ = state sink_args.__getstate__ = lambda self: self.__dict__.copy() sink_args.__setstate__ = sink_args__setstate__ class sink_result: thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('sink_result') oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) def __repr__(self): L = [] padding = ' ' * 4 return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( ) __hash__ = object.__hash__ all_structs.append(sink_result) sink_result.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( ))) sink_result.thrift_struct_annotations = { } sink_result.thrift_field_annotations = { } class putDataById_args: r""" Attributes: - id - data """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) 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.data = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('putDataById_args') if self.id != None: oprot.writeFieldBegin('id', TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() if self.data != None: oprot.writeFieldBegin('data', TType.STRING, 2) oprot.writeString(self.data.encode('utf-8')) if UTF8STRINGS and not isinstance(self.data, bytes) else oprot.writeString(self.data) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'id' in json_obj and json_obj['id'] is not None: self.id = long(json_obj['id']) if 'data' in json_obj and json_obj['data'] is not None: self.data = json_obj['data'] def __repr__(self): L = [] padding = ' ' * 4 if self.id is not None: value = pprint.pformat(self.id, indent=0) value = padding.join(value.splitlines(True)) L.append(' id=%s' % (value)) if self.data is not None: value = pprint.pformat(self.data, indent=0) value = padding.join(value.splitlines(True)) L.append(' data=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'id', 'data', ) __hash__ = object.__hash__ all_structs.append(putDataById_args) putDataById_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (1, TType.I64, 'id', None, None, 2, ), # 1 (2, TType.STRING, 'data', True, None, 2, ), # 2 ))) putDataById_args.thrift_struct_annotations = { } putDataById_args.thrift_field_annotations = { } def putDataById_args__init__(self, id=None, data=None,): self.id = id self.data = data putDataById_args.__init__ = putDataById_args__init__ def putDataById_args__setstate__(self, state): state.setdefault('id', None) state.setdefault('data', None) self.__dict__ = state putDataById_args.__getstate__ = lambda self: self.__dict__.copy() putDataById_args.__setstate__ = putDataById_args__setstate__ class putDataById_result: thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('putDataById_result') oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) def __repr__(self): L = [] padding = ' ' * 4 return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( ) __hash__ = object.__hash__ all_structs.append(putDataById_result) putDataById_result.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( ))) putDataById_result.thrift_struct_annotations = { } putDataById_result.thrift_field_annotations = { } class hasDataById_args: r""" Attributes: - id """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) 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) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('hasDataById_args') if self.id != None: oprot.writeFieldBegin('id', TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'id' in json_obj and json_obj['id'] is not None: self.id = long(json_obj['id']) def __repr__(self): L = [] padding = ' ' * 4 if self.id is not None: value = pprint.pformat(self.id, indent=0) value = padding.join(value.splitlines(True)) L.append(' id=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'id', ) __hash__ = object.__hash__ all_structs.append(hasDataById_args) hasDataById_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (1, TType.I64, 'id', None, None, 2, ), # 1 ))) hasDataById_args.thrift_struct_annotations = { } hasDataById_args.thrift_field_annotations = { } def hasDataById_args__init__(self, id=None,): self.id = id hasDataById_args.__init__ = hasDataById_args__init__ def hasDataById_args__setstate__(self, state): state.setdefault('id', None) self.__dict__ = state hasDataById_args.__getstate__ = lambda self: self.__dict__.copy() hasDataById_args.__setstate__ = hasDataById_args__setstate__ class hasDataById_result: r""" Attributes: - success """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('hasDataById_result') if self.success != None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'success' in json_obj and json_obj['success'] is not None: self.success = json_obj['success'] def __repr__(self): L = [] padding = ' ' * 4 if self.success is not None: value = pprint.pformat(self.success, indent=0) value = padding.join(value.splitlines(True)) L.append(' success=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'success', ) __hash__ = object.__hash__ all_structs.append(hasDataById_result) hasDataById_result.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (0, TType.BOOL, 'success', None, None, 2, ), # 0 ))) hasDataById_result.thrift_struct_annotations = { } hasDataById_result.thrift_field_annotations = { } def hasDataById_result__init__(self, success=None,): self.success = success hasDataById_result.__init__ = hasDataById_result__init__ def hasDataById_result__setstate__(self, state): state.setdefault('success', None) self.__dict__ = state hasDataById_result.__getstate__ = lambda self: self.__dict__.copy() hasDataById_result.__setstate__ = hasDataById_result__setstate__ class getDataById_args: r""" Attributes: - id """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) 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) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('getDataById_args') if self.id != None: oprot.writeFieldBegin('id', TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'id' in json_obj and json_obj['id'] is not None: self.id = long(json_obj['id']) def __repr__(self): L = [] padding = ' ' * 4 if self.id is not None: value = pprint.pformat(self.id, indent=0) value = padding.join(value.splitlines(True)) L.append(' id=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'id', ) __hash__ = object.__hash__ all_structs.append(getDataById_args) getDataById_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (1, TType.I64, 'id', None, None, 2, ), # 1 ))) getDataById_args.thrift_struct_annotations = { } getDataById_args.thrift_field_annotations = { } def getDataById_args__init__(self, id=None,): self.id = id getDataById_args.__init__ = getDataById_args__init__ def getDataById_args__setstate__(self, state): state.setdefault('id', None) self.__dict__ = state getDataById_args.__getstate__ = lambda self: self.__dict__.copy() getDataById_args.__setstate__ = getDataById_args__setstate__ class getDataById_result: r""" Attributes: - success """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('getDataById_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8')) if UTF8STRINGS and not isinstance(self.success, bytes) else oprot.writeString(self.success) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'success' in json_obj and json_obj['success'] is not None: self.success = json_obj['success'] def __repr__(self): L = [] padding = ' ' * 4 if self.success is not None: value = pprint.pformat(self.success, indent=0) value = padding.join(value.splitlines(True)) L.append(' success=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'success', ) __hash__ = object.__hash__ all_structs.append(getDataById_result) getDataById_result.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (0, TType.STRING, 'success', True, None, 2, ), # 0 ))) getDataById_result.thrift_struct_annotations = { } getDataById_result.thrift_field_annotations = { } def getDataById_result__init__(self, success=None,): self.success = success getDataById_result.__init__ = getDataById_result__init__ def getDataById_result__setstate__(self, state): state.setdefault('success', None) self.__dict__ = state getDataById_result.__getstate__ = lambda self: self.__dict__.copy() getDataById_result.__setstate__ = getDataById_result__setstate__ class deleteDataById_args: r""" Attributes: - id """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) 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) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('deleteDataById_args') if self.id != None: oprot.writeFieldBegin('id', TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'id' in json_obj and json_obj['id'] is not None: self.id = long(json_obj['id']) def __repr__(self): L = [] padding = ' ' * 4 if self.id is not None: value = pprint.pformat(self.id, indent=0) value = padding.join(value.splitlines(True)) L.append(' id=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'id', ) __hash__ = object.__hash__ all_structs.append(deleteDataById_args) deleteDataById_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (1, TType.I64, 'id', None, None, 2, ), # 1 ))) deleteDataById_args.thrift_struct_annotations = { } deleteDataById_args.thrift_field_annotations = { } def deleteDataById_args__init__(self, id=None,): self.id = id deleteDataById_args.__init__ = deleteDataById_args__init__ def deleteDataById_args__setstate__(self, state): state.setdefault('id', None) self.__dict__ = state deleteDataById_args.__getstate__ = lambda self: self.__dict__.copy() deleteDataById_args.__setstate__ = deleteDataById_args__setstate__ class deleteDataById_result: thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('deleteDataById_result') oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) def __repr__(self): L = [] padding = ' ' * 4 return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( ) __hash__ = object.__hash__ all_structs.append(deleteDataById_result) deleteDataById_result.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( ))) deleteDataById_result.thrift_struct_annotations = { } deleteDataById_result.thrift_field_annotations = { } class lobDataById_args: r""" Attributes: - id - data """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) 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.data = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('lobDataById_args') if self.id != None: oprot.writeFieldBegin('id', TType.I64, 1) oprot.writeI64(self.id) oprot.writeFieldEnd() if self.data != None: oprot.writeFieldBegin('data', TType.STRING, 2) oprot.writeString(self.data.encode('utf-8')) if UTF8STRINGS and not isinstance(self.data, bytes) else oprot.writeString(self.data) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'id' in json_obj and json_obj['id'] is not None: self.id = long(json_obj['id']) if 'data' in json_obj and json_obj['data'] is not None: self.data = json_obj['data'] def __repr__(self): L = [] padding = ' ' * 4 if self.id is not None: value = pprint.pformat(self.id, indent=0) value = padding.join(value.splitlines(True)) L.append(' id=%s' % (value)) if self.data is not None: value = pprint.pformat(self.data, indent=0) value = padding.join(value.splitlines(True)) L.append(' data=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'id', 'data', ) __hash__ = object.__hash__ all_structs.append(lobDataById_args) lobDataById_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (1, TType.I64, 'id', None, None, 2, ), # 1 (2, TType.STRING, 'data', True, None, 2, ), # 2 ))) lobDataById_args.thrift_struct_annotations = { } lobDataById_args.thrift_field_annotations = { } def lobDataById_args__init__(self, id=None, data=None,): self.id = id self.data = data lobDataById_args.__init__ = lobDataById_args__init__ def lobDataById_args__setstate__(self, state): state.setdefault('id', None) state.setdefault('data', None) self.__dict__ = state lobDataById_args.__getstate__ = lambda self: self.__dict__.copy() lobDataById_args.__setstate__ = lobDataById_args__setstate__ class invalid_return_for_hack_args: thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('invalid_return_for_hack_args') oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) def __repr__(self): L = [] padding = ' ' * 4 return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( ) __hash__ = object.__hash__ all_structs.append(invalid_return_for_hack_args) invalid_return_for_hack_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( ))) invalid_return_for_hack_args.thrift_struct_annotations = { } invalid_return_for_hack_args.thrift_field_annotations = { } class invalid_return_for_hack_result: r""" Attributes: - success """ thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None __init__ = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.SET: self.success = set() (_etype21, _size18) = iprot.readSetBegin() if _size18 >= 0: for _i22 in range(_size18): _elem23 = iprot.readFloat() self.success.add(_elem23) else: while iprot.peekSet(): _elem24 = iprot.readFloat() self.success.add(_elem24) iprot.readSetEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('invalid_return_for_hack_result') if self.success != None: oprot.writeFieldBegin('success', TType.SET, 0) oprot.writeSetBegin(TType.FLOAT, len(self.success)) for iter25 in self.success: oprot.writeFloat(iter25) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) if 'success' in json_obj and json_obj['success'] is not None: self.success = set_cls() for _tmp_e26 in json_obj['success']: self.success.add(float(_tmp_e26)) def __repr__(self): L = [] padding = ' ' * 4 if self.success is not None: value = pprint.pformat(self.success, indent=0) value = padding.join(value.splitlines(True)) L.append(' success=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( 'success', ) __hash__ = object.__hash__ all_structs.append(invalid_return_for_hack_result) invalid_return_for_hack_result.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( (0, TType.SET, 'success', (TType.FLOAT,None), None, 2, ), # 0 ))) invalid_return_for_hack_result.thrift_struct_annotations = { } invalid_return_for_hack_result.thrift_field_annotations = { } def invalid_return_for_hack_result__init__(self, success=None,): self.success = success invalid_return_for_hack_result.__init__ = invalid_return_for_hack_result__init__ def invalid_return_for_hack_result__setstate__(self, state): state.setdefault('success', None) self.__dict__ = state invalid_return_for_hack_result.__getstate__ = lambda self: self.__dict__.copy() invalid_return_for_hack_result.__setstate__ = invalid_return_for_hack_result__setstate__ class rpc_skipped_codegen_args: thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('rpc_skipped_codegen_args') oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) def __repr__(self): L = [] padding = ' ' * 4 return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( ) __hash__ = object.__hash__ all_structs.append(rpc_skipped_codegen_args) rpc_skipped_codegen_args.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( ))) rpc_skipped_codegen_args.thrift_struct_annotations = { } rpc_skipped_codegen_args.thrift_field_annotations = { } class rpc_skipped_codegen_result: thrift_spec = None thrift_field_annotations = None thrift_struct_annotations = None @staticmethod def isUnion(): return False def read(self, iprot): if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) return if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) return if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return oprot.writeStructBegin('rpc_skipped_codegen_result') oprot.writeFieldStop() oprot.writeStructEnd() def readFromJson(self, json, is_text=True, **kwargs): kwargs_copy = dict(kwargs) relax_enum_validation = bool(kwargs_copy.pop('relax_enum_validation', False)) set_cls = kwargs_copy.pop('custom_set_cls', set) dict_cls = kwargs_copy.pop('custom_dict_cls', dict) wrap_enum_constants = kwargs_copy.pop('wrap_enum_constants', False) if wrap_enum_constants and relax_enum_validation: raise ValueError( 'wrap_enum_constants cannot be used together with relax_enum_validation' ) if kwargs_copy: extra_kwargs = ', '.join(kwargs_copy.keys()) raise ValueError( 'Unexpected keyword arguments: ' + extra_kwargs ) json_obj = json if is_text: json_obj = loads(json) def __repr__(self): L = [] padding = ' ' * 4 return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) def __dir__(self): return ( ) __hash__ = object.__hash__ all_structs.append(rpc_skipped_codegen_result) rpc_skipped_codegen_result.thrift_spec = tuple(__EXPAND_THRIFT_SPEC(( ))) rpc_skipped_codegen_result.thrift_struct_annotations = { } rpc_skipped_codegen_result.thrift_field_annotations = { } class Client(Iface): _fbthrift_force_cpp_transport = False def __enter__(self): if self._fbthrift_cpp_transport: self._fbthrift_cpp_transport.__enter__() return self def __exit__(self, type, value, tb): if self._fbthrift_cpp_transport: self._fbthrift_cpp_transport.__exit__(type, value, tb) if self._iprot: self._iprot.trans.close() if self._oprot and self._iprot is not self._oprot: self._oprot.trans.close() def __init__(self, iprot=None, oprot=None, cpp_transport=None): self._iprot = self._oprot = iprot if oprot != None: self._oprot = oprot self._seqid = 0 self._fbthrift_cpp_transport = cpp_transport def set_persistent_header(self, key, value): if self._fbthrift_cpp_transport: self._fbthrift_cpp_transport.set_persistent_header(key, value) else: try: self._oprot.trans.set_persistent_header(key, value) except AttributeError: pass def get_persistent_headers(self): if self._fbthrift_cpp_transport: return self._fbthrift_cpp_transport.get_persistent_headers() try: return self._oprot.trans.get_write_persistent_headers() except AttributeError: return {} def clear_persistent_headers(self): if self._fbthrift_cpp_transport: self._fbthrift_cpp_transport.clear_persistent_headers() else: try: self._oprot.trans.clear_persistent_headers() except AttributeError: pass def set_onetime_header(self, key, value): if self._fbthrift_cpp_transport: self._fbthrift_cpp_transport.set_onetime_header(key, value) else: try: self._oprot.trans.set_header(key, value) except AttributeError: pass def get_last_response_headers(self): if self._fbthrift_cpp_transport: return self._fbthrift_cpp_transport.get_last_response_headers() try: return self._iprot.trans.get_headers() except AttributeError: return {} def set_max_frame_size(self, size): if self._fbthrift_cpp_transport: pass else: try: self._oprot.trans.set_max_frame_size(size) except AttributeError: pass def ping(self, ): if (self._fbthrift_cpp_transport): args = ping_args() result = self._fbthrift_cpp_transport._send_request("MyService", "ping", args, ping_result) return None self.send_ping() self.recv_ping() def send_ping(self, ): self._oprot.writeMessageBegin('ping', TMessageType.CALL, self._seqid) args = ping_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_ping(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x result = ping_result() result.read(self._iprot) self._iprot.readMessageEnd() return def getRandomData(self, ): if (self._fbthrift_cpp_transport): args = getRandomData_args() result = self._fbthrift_cpp_transport._send_request("MyService", "getRandomData", args, getRandomData_result) if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT) self.send_getRandomData() return self.recv_getRandomData() def send_getRandomData(self, ): self._oprot.writeMessageBegin('getRandomData', TMessageType.CALL, self._seqid) args = getRandomData_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getRandomData(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x result = getRandomData_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success != None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getRandomData failed: unknown result"); def sink(self, sink=None): r""" Parameters: - sink """ if (self._fbthrift_cpp_transport): args = sink_args() args.sink = sink result = self._fbthrift_cpp_transport._send_request("MyService", "sink", args, sink_result) return None self.send_sink(sink) self.recv_sink() def send_sink(self, sink=None): self._oprot.writeMessageBegin('sink', TMessageType.CALL, self._seqid) args = sink_args() args.sink = sink args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sink(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x result = sink_result() result.read(self._iprot) self._iprot.readMessageEnd() return def putDataById(self, id=None, data=None): r""" Parameters: - id - data """ if (self._fbthrift_cpp_transport): args = putDataById_args() args.id = id args.data = data result = self._fbthrift_cpp_transport._send_request("MyService", "putDataById", args, putDataById_result) return None self.send_putDataById(id, data) self.recv_putDataById() def send_putDataById(self, id=None, data=None): self._oprot.writeMessageBegin('putDataById', TMessageType.CALL, self._seqid) args = putDataById_args() args.id = id args.data = data args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_putDataById(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x result = putDataById_result() result.read(self._iprot) self._iprot.readMessageEnd() return def hasDataById(self, id=None): r""" Parameters: - id """ if (self._fbthrift_cpp_transport): args = hasDataById_args() args.id = id result = self._fbthrift_cpp_transport._send_request("MyService", "hasDataById", args, hasDataById_result) if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT) self.send_hasDataById(id) return self.recv_hasDataById() def send_hasDataById(self, id=None): self._oprot.writeMessageBegin('hasDataById', TMessageType.CALL, self._seqid) args = hasDataById_args() args.id = id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_hasDataById(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x result = hasDataById_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success != None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "hasDataById failed: unknown result"); def getDataById(self, id=None): r""" Parameters: - id """ if (self._fbthrift_cpp_transport): args = getDataById_args() args.id = id result = self._fbthrift_cpp_transport._send_request("MyService", "getDataById", args, getDataById_result) if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT) self.send_getDataById(id) return self.recv_getDataById() def send_getDataById(self, id=None): self._oprot.writeMessageBegin('getDataById', TMessageType.CALL, self._seqid) args = getDataById_args() args.id = id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getDataById(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x result = getDataById_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success != None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "getDataById failed: unknown result"); def deleteDataById(self, id=None): r""" Parameters: - id """ if (self._fbthrift_cpp_transport): args = deleteDataById_args() args.id = id result = self._fbthrift_cpp_transport._send_request("MyService", "deleteDataById", args, deleteDataById_result) return None self.send_deleteDataById(id) self.recv_deleteDataById() def send_deleteDataById(self, id=None): self._oprot.writeMessageBegin('deleteDataById', TMessageType.CALL, self._seqid) args = deleteDataById_args() args.id = id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_deleteDataById(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x result = deleteDataById_result() result.read(self._iprot) self._iprot.readMessageEnd() return def lobDataById(self, id=None, data=None): r""" Parameters: - id - data """ if (self._fbthrift_cpp_transport): args = lobDataById_args() args.id = id args.data = data result = self._fbthrift_cpp_transport._send_request("MyService", "lobDataById", args, lobDataById_result) return None self.send_lobDataById(id, data) def send_lobDataById(self, id=None, data=None): self._oprot.writeMessageBegin('lobDataById', TMessageType.CALL, self._seqid) args = lobDataById_args() args.id = id args.data = data args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.onewayFlush() def invalid_return_for_hack(self, ): if (self._fbthrift_cpp_transport): args = invalid_return_for_hack_args() result = self._fbthrift_cpp_transport._send_request("MyService", "invalid_return_for_hack", args, invalid_return_for_hack_result) if result.success is not None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT) self.send_invalid_return_for_hack() return self.recv_invalid_return_for_hack() def send_invalid_return_for_hack(self, ): self._oprot.writeMessageBegin('invalid_return_for_hack', TMessageType.CALL, self._seqid) args = invalid_return_for_hack_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_invalid_return_for_hack(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x result = invalid_return_for_hack_result() result.read(self._iprot) self._iprot.readMessageEnd() if result.success != None: return result.success raise TApplicationException(TApplicationException.MISSING_RESULT, "invalid_return_for_hack failed: unknown result"); def rpc_skipped_codegen(self, ): if (self._fbthrift_cpp_transport): args = rpc_skipped_codegen_args() result = self._fbthrift_cpp_transport._send_request("MyService", "rpc_skipped_codegen", args, rpc_skipped_codegen_result) return None self.send_rpc_skipped_codegen() self.recv_rpc_skipped_codegen() def send_rpc_skipped_codegen(self, ): self._oprot.writeMessageBegin('rpc_skipped_codegen', TMessageType.CALL, self._seqid) args = rpc_skipped_codegen_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_rpc_skipped_codegen(self, ): (fname, mtype, rseqid) = self._iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(self._iprot) self._iprot.readMessageEnd() raise x result = rpc_skipped_codegen_result() result.read(self._iprot) self._iprot.readMessageEnd() return class Processor(Iface, TProcessor): _onewayMethods = ("lobDataById",) def __init__(self, handler): TProcessor.__init__(self) self._handler = handler self._processMap = {} self._priorityMap = {} self._processMap["ping"] = Processor.process_ping self._priorityMap["ping"] = TPriority.NORMAL self._processMap["getRandomData"] = Processor.process_getRandomData self._priorityMap["getRandomData"] = TPriority.NORMAL self._processMap["sink"] = Processor.process_sink self._priorityMap["sink"] = TPriority.NORMAL self._processMap["putDataById"] = Processor.process_putDataById self._priorityMap["putDataById"] = TPriority.NORMAL self._processMap["hasDataById"] = Processor.process_hasDataById self._priorityMap["hasDataById"] = TPriority.NORMAL self._processMap["getDataById"] = Processor.process_getDataById self._priorityMap["getDataById"] = TPriority.NORMAL self._processMap["deleteDataById"] = Processor.process_deleteDataById self._priorityMap["deleteDataById"] = TPriority.NORMAL self._processMap["lobDataById"] = Processor.process_lobDataById self._priorityMap["lobDataById"] = TPriority.NORMAL self._processMap["invalid_return_for_hack"] = Processor.process_invalid_return_for_hack self._priorityMap["invalid_return_for_hack"] = TPriority.NORMAL self._processMap["rpc_skipped_codegen"] = Processor.process_rpc_skipped_codegen self._priorityMap["rpc_skipped_codegen"] = TPriority.NORMAL def onewayMethods(self): l = [] l.extend(Processor._onewayMethods) return tuple(l) @thrift_process_main() def process(self,): pass @thrift_process_method(ping_args, oneway=False) def process_ping(self, args, handler_ctx): result = ping_result() try: self._handler.ping() except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'ping', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(getRandomData_args, oneway=False) def process_getRandomData(self, args, handler_ctx): result = getRandomData_result() try: result.success = self._handler.getRandomData() except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'getRandomData', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(sink_args, oneway=False) def process_sink(self, args, handler_ctx): result = sink_result() try: self._handler.sink(args.sink) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'sink', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(putDataById_args, oneway=False) def process_putDataById(self, args, handler_ctx): result = putDataById_result() try: self._handler.putDataById(args.id, args.data) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'putDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(hasDataById_args, oneway=False) def process_hasDataById(self, args, handler_ctx): result = hasDataById_result() try: result.success = self._handler.hasDataById(args.id) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'hasDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(getDataById_args, oneway=False) def process_getDataById(self, args, handler_ctx): result = getDataById_result() try: result.success = self._handler.getDataById(args.id) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'getDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(deleteDataById_args, oneway=False) def process_deleteDataById(self, args, handler_ctx): result = deleteDataById_result() try: self._handler.deleteDataById(args.id) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'deleteDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(lobDataById_args, oneway=True) def process_lobDataById(self, args, handler_ctx): try: self._handler.lobDataById(args.id, args.data) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'lobDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) @thrift_process_method(invalid_return_for_hack_args, oneway=False) def process_invalid_return_for_hack(self, args, handler_ctx): result = invalid_return_for_hack_result() try: result.success = self._handler.invalid_return_for_hack() except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'invalid_return_for_hack', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(rpc_skipped_codegen_args, oneway=False) def process_rpc_skipped_codegen(self, args, handler_ctx): result = rpc_skipped_codegen_result() try: self._handler.rpc_skipped_codegen() except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'rpc_skipped_codegen', ex) result = Thrift.TApplicationException(message=repr(ex)) return result Iface._processor_type = Processor class ContextProcessor(ContextIface, TProcessor): _onewayMethods = ("lobDataById",) def __init__(self, handler): TProcessor.__init__(self) self._handler = handler self._processMap = {} self._priorityMap = {} self._processMap["ping"] = ContextProcessor.process_ping self._priorityMap["ping"] = TPriority.NORMAL self._processMap["getRandomData"] = ContextProcessor.process_getRandomData self._priorityMap["getRandomData"] = TPriority.NORMAL self._processMap["sink"] = ContextProcessor.process_sink self._priorityMap["sink"] = TPriority.NORMAL self._processMap["putDataById"] = ContextProcessor.process_putDataById self._priorityMap["putDataById"] = TPriority.NORMAL self._processMap["hasDataById"] = ContextProcessor.process_hasDataById self._priorityMap["hasDataById"] = TPriority.NORMAL self._processMap["getDataById"] = ContextProcessor.process_getDataById self._priorityMap["getDataById"] = TPriority.NORMAL self._processMap["deleteDataById"] = ContextProcessor.process_deleteDataById self._priorityMap["deleteDataById"] = TPriority.NORMAL self._processMap["lobDataById"] = ContextProcessor.process_lobDataById self._priorityMap["lobDataById"] = TPriority.NORMAL self._processMap["invalid_return_for_hack"] = ContextProcessor.process_invalid_return_for_hack self._priorityMap["invalid_return_for_hack"] = TPriority.NORMAL self._processMap["rpc_skipped_codegen"] = ContextProcessor.process_rpc_skipped_codegen self._priorityMap["rpc_skipped_codegen"] = TPriority.NORMAL def onewayMethods(self): l = [] l.extend(ContextProcessor._onewayMethods) return tuple(l) @thrift_process_main() def process(self,): pass @thrift_process_method(ping_args, oneway=False) def process_ping(self, args, handler_ctx): result = ping_result() try: self._handler.ping(handler_ctx) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'ping', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(getRandomData_args, oneway=False) def process_getRandomData(self, args, handler_ctx): result = getRandomData_result() try: result.success = self._handler.getRandomData(handler_ctx) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'getRandomData', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(sink_args, oneway=False) def process_sink(self, args, handler_ctx): result = sink_result() try: self._handler.sink(handler_ctx, args.sink) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'sink', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(putDataById_args, oneway=False) def process_putDataById(self, args, handler_ctx): result = putDataById_result() try: self._handler.putDataById(handler_ctx, args.id, args.data) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'putDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(hasDataById_args, oneway=False) def process_hasDataById(self, args, handler_ctx): result = hasDataById_result() try: result.success = self._handler.hasDataById(handler_ctx, args.id) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'hasDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(getDataById_args, oneway=False) def process_getDataById(self, args, handler_ctx): result = getDataById_result() try: result.success = self._handler.getDataById(handler_ctx, args.id) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'getDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(deleteDataById_args, oneway=False) def process_deleteDataById(self, args, handler_ctx): result = deleteDataById_result() try: self._handler.deleteDataById(handler_ctx, args.id) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'deleteDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(lobDataById_args, oneway=True) def process_lobDataById(self, args, handler_ctx): try: self._handler.lobDataById(handler_ctx, args.id, args.data) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'lobDataById', ex) result = Thrift.TApplicationException(message=repr(ex)) @thrift_process_method(invalid_return_for_hack_args, oneway=False) def process_invalid_return_for_hack(self, args, handler_ctx): result = invalid_return_for_hack_result() try: result.success = self._handler.invalid_return_for_hack(handler_ctx) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'invalid_return_for_hack', ex) result = Thrift.TApplicationException(message=repr(ex)) return result @thrift_process_method(rpc_skipped_codegen_args, oneway=False) def process_rpc_skipped_codegen(self, args, handler_ctx): result = rpc_skipped_codegen_result() try: self._handler.rpc_skipped_codegen(handler_ctx) except: ex = sys.exc_info()[1] self._event_handler.handlerError(handler_ctx, 'rpc_skipped_codegen', ex) result = Thrift.TApplicationException(message=repr(ex)) return result ContextIface._processor_type = ContextProcessor fix_spec(all_structs) del all_structs