├── .gitignore ├── FasterLinepy ├── speedTest.py └── transport.py ├── README.md └── protoAkad ├── protoService ├── protoAuthService.py ├── protoCallService.py ├── protoChannelService.py ├── protoShopService.py ├── protoSquareService.py └── protoTalkService.py └── protoTtypes ├── protoAnnouncement.py ├── protoApplicationType.py ├── protoAuthQrCode.py ├── protoChatRoomAnnouncement.py ├── protoChatRoomAnnouncementContents.py ├── protoContact.py ├── protoE2EEPublicKey.py ├── protoFriendRequest.py ├── protoGroup.py ├── protoGroupPreference.py ├── protoIdentityProvider.py ├── protoLocation.py ├── protoLoginRequest.py ├── protoLoginResult.py ├── protoLoginResultType.py ├── protoLoginType.py ├── protoMessage.py ├── protoOpType.py ├── protoOperation.py ├── protoRegisterWithPhoneNumberResult.py ├── protoRoom.py ├── protoSecurityCenterResult.py ├── protoShouldSyncException.py ├── protoSnsIdUserStatus.py ├── protoSyncParamContact.py ├── protoSyncParamMid.py ├── protoSyncRelatations.py ├── protoSyncScope.py ├── protoTalkException.py ├── protoTicket.py └── protoVerificationSessionData.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /FasterLinepy/speedTest.py: -------------------------------------------------------------------------------- 1 | from linepy import LINE,OEPoll 2 | import time 3 | import concurrent.futures 4 | #coding:utf-8 5 | 6 | def send(gid): 7 | j = 0 8 | for i in range(10): 9 | start = time.time() 10 | bot.sendMessage(gid,"message") 11 | stop = time.time() 12 | bot.sendMessage(gid,str(stop-start)) 13 | j += stop-start 14 | else: 15 | bot.sendMessage(gid, "average time: " + str(j / 10)) 16 | def botCore(op): 17 | if op.type == 26: 18 | msg = op.message 19 | receiver = msg.to 20 | if msg.toType == 2: 21 | if msg.contentType == 0: 22 | if msg.text == "速度测量仪表": 23 | start = time.time() 24 | with concurrent.futures.ProcessPoolExecutor(max_workers=4) as excuter: 25 | excuter.map(send(receiver)) 26 | stop = time.time() 27 | bot.sendMessage(receiver,"result: " + str(stop - start)) 28 | 29 | def botOEupdater(oePoll): 30 | for i in loop: 31 | try: 32 | ops = oePoll.singleTrace(count=50) 33 | if ops is not None: 34 | for op in ops: 35 | botCore(op) 36 | oePoll.setRevision(op.revision) 37 | loop.append(i + 1) 38 | except Exception as oeUpdaterError: 39 | bot.log(oeUpdaterError) 40 | 41 | if __name__ == "__main__": 42 | loop = [0] 43 | bot = LINE("","") 44 | print(bot.authToken) 45 | botOE = OEPoll(bot) 46 | botOEupdater(botOE) -------------------------------------------------------------------------------- /FasterLinepy/transport.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from io import BytesIO 3 | from six.moves import urllib, http_client 4 | import os, socket, sys, warnings, base64, time, json, asyncio, six 5 | from thrift.transport.TTransport import TTransportBase 6 | 7 | class THttpClient(TTransportBase): 8 | """Http implementation of TTransport base.""" 9 | 10 | def __init__(self, uri_or_host, port=None, path=None, customThrift=True): 11 | """THttpClient supports two different types constructor parameters. 12 | 13 | THttpClient(host, port, path) - deprecated 14 | THttpClient(uri) 15 | 16 | Only the second supports https. 17 | """ 18 | parsed = urllib.parse.urlparse(uri_or_host) 19 | self.scheme = parsed.scheme 20 | assert self.scheme in ('http', 'https') 21 | if self.scheme == 'http': 22 | self.port = parsed.port or http_client.HTTP_PORT 23 | elif self.scheme == 'https': 24 | self.port = parsed.port or http_client.HTTPS_PORT 25 | self.host = parsed.hostname 26 | self.path = parsed.path 27 | if parsed.query: 28 | self.path += '?%s' % parsed.query 29 | self.realhost = self.realport = self.proxy_auth = None 30 | self.__wbuf = BytesIO() 31 | self.__http = http_client.HTTPConnection(self.host, self.port) 32 | self.__http_response = None 33 | self.__timeout = None 34 | self.__custom_headers = None 35 | self.__time = time.time() 36 | self.__custom_thrift = customThrift 37 | self.__loop = 0 38 | 39 | @staticmethod 40 | def basic_proxy_auth_header(proxy): 41 | if proxy is None or not proxy.username: 42 | return None 43 | ap = "%s:%s" % (urllib.parse.unquote(proxy.username), 44 | urllib.parse.unquote(proxy.password)) 45 | cr = base64.b64encode(ap).strip() 46 | return "Basic " + cr 47 | 48 | def using_proxy(self): 49 | return self.realhost is not None 50 | 51 | def open(self): 52 | self.__http = http_client.HTTPSConnection(self.host, self.port) 53 | 54 | def close(self): 55 | self.__http = None 56 | self.__http_response = None 57 | 58 | def getHeaders(self): 59 | return self.headers 60 | 61 | def isOpen(self): 62 | return self.__http is not None 63 | 64 | def setTimeout(self): 65 | self.__timeout = 1e-323 66 | 67 | def setCustomHeaders(self, headers): 68 | self.__custom_headers = headers 69 | 70 | def read(self, sz): 71 | return self.__http_response.read(sz) 72 | def readAll(self, sz): 73 | buff = b'' 74 | have = 0 75 | while (have < sz): 76 | chunk = self.read(sz - have) 77 | chunkLen = len(chunk) 78 | have += chunkLen 79 | buff += chunk 80 | 81 | if chunkLen == 0: 82 | raise EOFError() 83 | 84 | return buff 85 | 86 | def write(self, buf): 87 | self.__wbuf.write(buf) 88 | 89 | def __withTimeout(f): 90 | def _f(*args, **kwargs): 91 | socket.setdefaulttimeout(args[0].__timeout) 92 | result = f(*args, **kwargs) 93 | return result 94 | return _f 95 | 96 | def flush(self): 97 | if self.__loop <= 1e-323:self.open();self.__loop += 1e-323 98 | 99 | # Pull data out of buffer 100 | data = self.__wbuf.getvalue();self.__wbuf = BytesIO(); 101 | 102 | # HTTP request 103 | self.__http.putrequest('POST', self.path) 104 | 105 | # Write headers 106 | self.__http.putheader('Content-Type', 'application/x-thrift');self.__http.putheader('Content-Length', str(len(data)));self.__http.putheader('User-Agent', 'Python/THttpClient') 107 | 108 | for key, val in six.iteritems(self.__custom_headers): 109 | self.__http.putheader(key, val) 110 | 111 | self.__http.endheaders() 112 | 113 | # Write payload 114 | self.__http.send(data) 115 | 116 | # Get reply to flush the request 117 | self.__http_response = self.__http.getresponse();self.code = self.__http_response.status;self.message = self.__http_response.reason;self.headers = self.__http_response.msg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LineStorage 2 | 3 | ## EN 4 | This is just an closet,
5 | I'd push some code to who can learn it,
6 | I dont think its optimized though.
7 | what I made is
8 | [FasterLinepy-transport.py](https://github.com/TakagiChan/LineStorage/blob/master/FasterLinepy/transport.py) - about 0.8secs faster even on my home PC
9 | ![REWRIE-EN](https://i.imgur.com/M3he3Wt.png)
10 | [ProtoAkad](https://github.com/TakagiChan/LineStorage/tree/master/protoAkad) - not much files, but worthy for learn akad 11 | 12 | ## JA 13 | ただの物置です
14 | 学習できる人向けにコードを書きます
15 | 最適だとは思えません
16 | 作ったもの
17 | [FasterLinepy-transport.py](https://github.com/TakagiChan/LineStorage/blob/master/FasterLinepy/transport.py) - 自宅のPCでも約0.8秒ほど早くなる
18 | ![REWRIE-JA](https://i.imgur.com/9hcSHeZ.png)
19 | [ProtoAkad](https://github.com/TakagiChan/LineStorage/tree/master/protoAkad) - 少ししかないけど、akadを学ぶには価値がある 20 | 21 | ## Contact/連絡先 22 | 23 | [Twitter](https://twitter.com/TakagiChanDayo)
24 | LINE
25 | ![LINE](https://i.imgur.com/2Cc6vJj.png) 26 | -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoAnnouncement.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | 5 | class Announcement(object): 6 | """ 7 | Attributes: 8 | - index 9 | - forceUpdate 10 | - title 11 | - text 12 | - createdTime 13 | - pictureUrl 14 | - thumbnailUrl 15 | """ 16 | 17 | 18 | def __init__(self, index=None, forceUpdate=None, title=None, text=None, createdTime=None, pictureUrl=None, thumbnailUrl=None,): 19 | self.index = index 20 | self.forceUpdate = forceUpdate 21 | self.title = title 22 | self.text = text 23 | self.createdTime = createdTime 24 | self.pictureUrl = pictureUrl 25 | self.thumbnailUrl = thumbnailUrl 26 | 27 | def read(self, iprot): 28 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 29 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 30 | return 31 | iprot.readStructBegin() 32 | while True: 33 | (fname, ftype, fid) = iprot.readFieldBegin() 34 | if ftype == TType.STOP: 35 | break 36 | if fid == 1: 37 | if ftype == TType.I32: 38 | self.index = iprot.readI32() 39 | else: 40 | iprot.skip(ftype) 41 | elif fid == 10: 42 | if ftype == TType.BOOL: 43 | self.forceUpdate = iprot.readBool() 44 | else: 45 | iprot.skip(ftype) 46 | elif fid == 11: 47 | if ftype == TType.STRING: 48 | self.title = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 49 | else: 50 | iprot.skip(ftype) 51 | elif fid == 12: 52 | if ftype == TType.STRING: 53 | self.text = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 54 | else: 55 | iprot.skip(ftype) 56 | elif fid == 13: 57 | if ftype == TType.I64: 58 | self.createdTime = iprot.readI64() 59 | else: 60 | iprot.skip(ftype) 61 | elif fid == 14: 62 | if ftype == TType.STRING: 63 | self.pictureUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 64 | else: 65 | iprot.skip(ftype) 66 | elif fid == 15: 67 | if ftype == TType.STRING: 68 | self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 69 | else: 70 | iprot.skip(ftype) 71 | else: 72 | iprot.skip(ftype) 73 | iprot.readFieldEnd() 74 | iprot.readStructEnd() 75 | 76 | def write(self, oprot): 77 | if oprot._fast_encode is not None and self.thrift_spec is not None: 78 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 79 | return 80 | oprot.writeStructBegin('Announcement') 81 | if self.index is not None: 82 | oprot.writeFieldBegin('index', TType.I32, 1) 83 | oprot.writeI32(self.index) 84 | oprot.writeFieldEnd() 85 | if self.forceUpdate is not None: 86 | oprot.writeFieldBegin('forceUpdate', TType.BOOL, 10) 87 | oprot.writeBool(self.forceUpdate) 88 | oprot.writeFieldEnd() 89 | if self.title is not None: 90 | oprot.writeFieldBegin('title', TType.STRING, 11) 91 | oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) 92 | oprot.writeFieldEnd() 93 | if self.text is not None: 94 | oprot.writeFieldBegin('text', TType.STRING, 12) 95 | oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text) 96 | oprot.writeFieldEnd() 97 | if self.createdTime is not None: 98 | oprot.writeFieldBegin('createdTime', TType.I64, 13) 99 | oprot.writeI64(self.createdTime) 100 | oprot.writeFieldEnd() 101 | if self.pictureUrl is not None: 102 | oprot.writeFieldBegin('pictureUrl', TType.STRING, 14) 103 | oprot.writeString(self.pictureUrl.encode('utf-8') if sys.version_info[0] == 2 else self.pictureUrl) 104 | oprot.writeFieldEnd() 105 | if self.thumbnailUrl is not None: 106 | oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 15) 107 | oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl) 108 | oprot.writeFieldEnd() 109 | oprot.writeFieldStop() 110 | oprot.writeStructEnd() 111 | 112 | def validate(self): 113 | return 114 | 115 | def __repr__(self): 116 | L = ['%s=%r' % (key, value) 117 | for key, value in self.__dict__.items()] 118 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 119 | 120 | def __eq__(self, other): 121 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 122 | 123 | def __ne__(self, other): 124 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoApplicationType.py: -------------------------------------------------------------------------------- 1 | class ApplicationType(object): 2 | IOS = 16 3 | IOS_RC = 17 4 | IOS_BETA = 18 5 | IOS_ALPHA = 19 6 | ANDROID = 32 7 | ANDROID_RC = 33 8 | ANDROID_BETA = 34 9 | ANDROID_ALPHA = 35 10 | WAP = 48 11 | WAP_RC = 49 12 | WAP_BETA = 50 13 | WAP_ALPHA = 51 14 | BOT = 64 15 | BOT_RC = 65 16 | BOT_BETA = 66 17 | BOT_ALPHA = 67 18 | WEB = 80 19 | WEB_RC = 81 20 | WEB_BETA = 82 21 | WEB_ALPHA = 83 22 | DESKTOPWIN = 96 23 | DESKTOPWIN_RC = 97 24 | DESKTOPWIN_BETA = 98 25 | DESKTOPWIN_ALPHA = 99 26 | DESKTOPMAC = 112 27 | DESKTOPMAC_RC = 113 28 | DESKTOPMAC_BETA = 114 29 | DESKTOPMAC_ALPHA = 115 30 | CHANNELGW = 128 31 | CHANNELGW_RC = 129 32 | CHANNELGW_BETA = 130 33 | CHANNELGW_ALPHA = 131 34 | CHANNELCP = 144 35 | CHANNELCP_RC = 145 36 | CHANNELCP_BETA = 146 37 | CHANNELCP_ALPHA = 147 38 | WINPHONE = 160 39 | WINPHONE_RC = 161 40 | WINPHONE_BETA = 162 41 | WINPHONE_ALPHA = 163 42 | BLACKBERRY = 176 43 | BLACKBERRY_RC = 177 44 | BLACKBERRY_BETA = 178 45 | BLACKBERRY_ALPHA = 179 46 | WINMETRO = 192 47 | WINMETRO_RC = 193 48 | WINMETRO_BETA = 194 49 | WINMETRO_ALPHA = 195 50 | S40 = 208 51 | S40_RC = 209 52 | S40_BETA = 210 53 | S40_ALPHA = 211 54 | CHRONO = 224 55 | CHRONO_RC = 225 56 | CHRONO_BETA = 226 57 | CHRONO_ALPHA = 227 58 | TIZEN = 256 59 | TIZEN_RC = 257 60 | TIZEN_BETA = 258 61 | TIZEN_ALPHA = 259 62 | VIRTUAL = 272 63 | FIREFOXOS = 288 64 | FIREFOXOS_RC = 289 65 | FIREFOXOS_BETA = 290 66 | FIREFOXOS_ALPHA = 291 67 | IOSIPAD = 304 68 | IOSIPAD_RC = 305 69 | IOSIPAD_BETA = 306 70 | IOSIPAD_ALPHA = 307 71 | BIZIOS = 320 72 | BIZIOS_RC = 321 73 | BIZIOS_BETA = 322 74 | BIZIOS_ALPHA = 323 75 | BIZANDROID = 336 76 | BIZANDROID_RC = 337 77 | BIZANDROID_BETA = 338 78 | BIZANDROID_ALPHA = 339 79 | BIZBOT = 352 80 | BIZBOT_RC = 353 81 | BIZBOT_BETA = 354 82 | BIZBOT_ALPHA = 355 83 | CHROMEOS = 368 84 | CHROMEOS_RC = 369 85 | CHROMEOS_BETA = 370 86 | CHROMEOS_ALPHA = 371 87 | ANDROIDLITE = 384 88 | ANDROIDLITE_RC = 385 89 | ANDROIDLITE_BETA = 386 90 | ANDROIDLITE_ALPHA = 387 91 | WIN10 = 400 92 | WIN10_RC = 401 93 | WIN10_BETA = 402 94 | WIN10_ALPHA = 403 95 | BIZWEB = 416 96 | BIZWEB_RC = 417 97 | BIZWEB_BETA = 418 98 | BIZWEB_ALPHA = 419 99 | DUMMYPRIMARY = 432 100 | DUMMYPRIMARY_RC = 433 101 | DUMMYPRIMARY_BETA = 434 102 | DUMMYPRIMARY_ALPHA = 435 103 | SQUARE = 448 104 | SQUARE_RC = 449 105 | SQUARE_BETA = 450 106 | SQUARE_ALPHA = 451 107 | INTERNAL = 464 108 | INTERNAL_RC = 465 109 | INTERNAL_BETA = 466 110 | INTERNAL_ALPHA = 467 111 | CLOVAFRIENDS = 480 112 | CLOVAFRIENDS_RC = 481 113 | CLOVAFRIENDS_BETA = 482 114 | CLOVAFRIENDS_ALPHA = 483 115 | 116 | _VALUES_TO_NAMES = { 117 | 16: "IOS", 118 | 17: "IOS_RC", 119 | 18: "IOS_BETA", 120 | 19: "IOS_ALPHA", 121 | 32: "ANDROID", 122 | 33: "ANDROID_RC", 123 | 34: "ANDROID_BETA", 124 | 35: "ANDROID_ALPHA", 125 | 48: "WAP", 126 | 49: "WAP_RC", 127 | 50: "WAP_BETA", 128 | 51: "WAP_ALPHA", 129 | 64: "BOT", 130 | 65: "BOT_RC", 131 | 66: "BOT_BETA", 132 | 67: "BOT_ALPHA", 133 | 80: "WEB", 134 | 81: "WEB_RC", 135 | 82: "WEB_BETA", 136 | 83: "WEB_ALPHA", 137 | 96: "DESKTOPWIN", 138 | 97: "DESKTOPWIN_RC", 139 | 98: "DESKTOPWIN_BETA", 140 | 99: "DESKTOPWIN_ALPHA", 141 | 112: "DESKTOPMAC", 142 | 113: "DESKTOPMAC_RC", 143 | 114: "DESKTOPMAC_BETA", 144 | 115: "DESKTOPMAC_ALPHA", 145 | 128: "CHANNELGW", 146 | 129: "CHANNELGW_RC", 147 | 130: "CHANNELGW_BETA", 148 | 131: "CHANNELGW_ALPHA", 149 | 144: "CHANNELCP", 150 | 145: "CHANNELCP_RC", 151 | 146: "CHANNELCP_BETA", 152 | 147: "CHANNELCP_ALPHA", 153 | 160: "WINPHONE", 154 | 161: "WINPHONE_RC", 155 | 162: "WINPHONE_BETA", 156 | 163: "WINPHONE_ALPHA", 157 | 176: "BLACKBERRY", 158 | 177: "BLACKBERRY_RC", 159 | 178: "BLACKBERRY_BETA", 160 | 179: "BLACKBERRY_ALPHA", 161 | 192: "WINMETRO", 162 | 193: "WINMETRO_RC", 163 | 194: "WINMETRO_BETA", 164 | 195: "WINMETRO_ALPHA", 165 | 208: "S40", 166 | 209: "S40_RC", 167 | 210: "S40_BETA", 168 | 211: "S40_ALPHA", 169 | 224: "CHRONO", 170 | 225: "CHRONO_RC", 171 | 226: "CHRONO_BETA", 172 | 227: "CHRONO_ALPHA", 173 | 256: "TIZEN", 174 | 257: "TIZEN_RC", 175 | 258: "TIZEN_BETA", 176 | 259: "TIZEN_ALPHA", 177 | 272: "VIRTUAL", 178 | 288: "FIREFOXOS", 179 | 289: "FIREFOXOS_RC", 180 | 290: "FIREFOXOS_BETA", 181 | 291: "FIREFOXOS_ALPHA", 182 | 304: "IOSIPAD", 183 | 305: "IOSIPAD_RC", 184 | 306: "IOSIPAD_BETA", 185 | 307: "IOSIPAD_ALPHA", 186 | 320: "BIZIOS", 187 | 321: "BIZIOS_RC", 188 | 322: "BIZIOS_BETA", 189 | 323: "BIZIOS_ALPHA", 190 | 336: "BIZANDROID", 191 | 337: "BIZANDROID_RC", 192 | 338: "BIZANDROID_BETA", 193 | 339: "BIZANDROID_ALPHA", 194 | 352: "BIZBOT", 195 | 353: "BIZBOT_RC", 196 | 354: "BIZBOT_BETA", 197 | 355: "BIZBOT_ALPHA", 198 | 368: "CHROMEOS", 199 | 369: "CHROMEOS_RC", 200 | 370: "CHROMEOS_BETA", 201 | 371: "CHROMEOS_ALPHA", 202 | 384: "ANDROIDLITE", 203 | 385: "ANDROIDLITE_RC", 204 | 386: "ANDROIDLITE_BETA", 205 | 387: "ANDROIDLITE_ALPHA", 206 | 400: "WIN10", 207 | 401: "WIN10_RC", 208 | 402: "WIN10_BETA", 209 | 403: "WIN10_ALPHA", 210 | 416: "BIZWEB", 211 | 417: "BIZWEB_RC", 212 | 418: "BIZWEB_BETA", 213 | 419: "BIZWEB_ALPHA", 214 | 432: "DUMMYPRIMARY", 215 | 433: "DUMMYPRIMARY_RC", 216 | 434: "DUMMYPRIMARY_BETA", 217 | 435: "DUMMYPRIMARY_ALPHA", 218 | 448: "SQUARE", 219 | 449: "SQUARE_RC", 220 | 450: "SQUARE_BETA", 221 | 451: "SQUARE_ALPHA", 222 | 464: "INTERNAL", 223 | 465: "INTERNAL_RC", 224 | 466: "INTERNAL_BETA", 225 | 467: "INTERNAL_ALPHA", 226 | 480: "CLOVAFRIENDS", 227 | 481: "CLOVAFRIENDS_RC", 228 | 482: "CLOVAFRIENDS_BETA", 229 | 483: "CLOVAFRIENDS_ALPHA", 230 | } 231 | 232 | _NAMES_TO_VALUES = { 233 | "IOS": 16, 234 | "IOS_RC": 17, 235 | "IOS_BETA": 18, 236 | "IOS_ALPHA": 19, 237 | "ANDROID": 32, 238 | "ANDROID_RC": 33, 239 | "ANDROID_BETA": 34, 240 | "ANDROID_ALPHA": 35, 241 | "WAP": 48, 242 | "WAP_RC": 49, 243 | "WAP_BETA": 50, 244 | "WAP_ALPHA": 51, 245 | "BOT": 64, 246 | "BOT_RC": 65, 247 | "BOT_BETA": 66, 248 | "BOT_ALPHA": 67, 249 | "WEB": 80, 250 | "WEB_RC": 81, 251 | "WEB_BETA": 82, 252 | "WEB_ALPHA": 83, 253 | "DESKTOPWIN": 96, 254 | "DESKTOPWIN_RC": 97, 255 | "DESKTOPWIN_BETA": 98, 256 | "DESKTOPWIN_ALPHA": 99, 257 | "DESKTOPMAC": 112, 258 | "DESKTOPMAC_RC": 113, 259 | "DESKTOPMAC_BETA": 114, 260 | "DESKTOPMAC_ALPHA": 115, 261 | "CHANNELGW": 128, 262 | "CHANNELGW_RC": 129, 263 | "CHANNELGW_BETA": 130, 264 | "CHANNELGW_ALPHA": 131, 265 | "CHANNELCP": 144, 266 | "CHANNELCP_RC": 145, 267 | "CHANNELCP_BETA": 146, 268 | "CHANNELCP_ALPHA": 147, 269 | "WINPHONE": 160, 270 | "WINPHONE_RC": 161, 271 | "WINPHONE_BETA": 162, 272 | "WINPHONE_ALPHA": 163, 273 | "BLACKBERRY": 176, 274 | "BLACKBERRY_RC": 177, 275 | "BLACKBERRY_BETA": 178, 276 | "BLACKBERRY_ALPHA": 179, 277 | "WINMETRO": 192, 278 | "WINMETRO_RC": 193, 279 | "WINMETRO_BETA": 194, 280 | "WINMETRO_ALPHA": 195, 281 | "S40": 208, 282 | "S40_RC": 209, 283 | "S40_BETA": 210, 284 | "S40_ALPHA": 211, 285 | "CHRONO": 224, 286 | "CHRONO_RC": 225, 287 | "CHRONO_BETA": 226, 288 | "CHRONO_ALPHA": 227, 289 | "TIZEN": 256, 290 | "TIZEN_RC": 257, 291 | "TIZEN_BETA": 258, 292 | "TIZEN_ALPHA": 259, 293 | "VIRTUAL": 272, 294 | "FIREFOXOS": 288, 295 | "FIREFOXOS_RC": 289, 296 | "FIREFOXOS_BETA": 290, 297 | "FIREFOXOS_ALPHA": 291, 298 | "IOSIPAD": 304, 299 | "IOSIPAD_RC": 305, 300 | "IOSIPAD_BETA": 306, 301 | "IOSIPAD_ALPHA": 307, 302 | "BIZIOS": 320, 303 | "BIZIOS_RC": 321, 304 | "BIZIOS_BETA": 322, 305 | "BIZIOS_ALPHA": 323, 306 | "BIZANDROID": 336, 307 | "BIZANDROID_RC": 337, 308 | "BIZANDROID_BETA": 338, 309 | "BIZANDROID_ALPHA": 339, 310 | "BIZBOT": 352, 311 | "BIZBOT_RC": 353, 312 | "BIZBOT_BETA": 354, 313 | "BIZBOT_ALPHA": 355, 314 | "CHROMEOS": 368, 315 | "CHROMEOS_RC": 369, 316 | "CHROMEOS_BETA": 370, 317 | "CHROMEOS_ALPHA": 371, 318 | "ANDROIDLITE": 384, 319 | "ANDROIDLITE_RC": 385, 320 | "ANDROIDLITE_BETA": 386, 321 | "ANDROIDLITE_ALPHA": 387, 322 | "WIN10": 400, 323 | "WIN10_RC": 401, 324 | "WIN10_BETA": 402, 325 | "WIN10_ALPHA": 403, 326 | "BIZWEB": 416, 327 | "BIZWEB_RC": 417, 328 | "BIZWEB_BETA": 418, 329 | "BIZWEB_ALPHA": 419, 330 | "DUMMYPRIMARY": 432, 331 | "DUMMYPRIMARY_RC": 433, 332 | "DUMMYPRIMARY_BETA": 434, 333 | "DUMMYPRIMARY_ALPHA": 435, 334 | "SQUARE": 448, 335 | "SQUARE_RC": 449, 336 | "SQUARE_BETA": 450, 337 | "SQUARE_ALPHA": 451, 338 | "INTERNAL": 464, 339 | "INTERNAL_RC": 465, 340 | "INTERNAL_BETA": 466, 341 | "INTERNAL_ALPHA": 467, 342 | "CLOVAFRIENDS": 480, 343 | "CLOVAFRIENDS_RC": 481, 344 | "CLOVAFRIENDS_BETA": 482, 345 | "CLOVAFRIENDS_ALPHA": 483, 346 | } -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoAuthQrCode.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | 5 | class AuthQrcode(object): 6 | """ 7 | Attributes: 8 | - qrcode 9 | - verifier 10 | - callbackUrl 11 | """ 12 | 13 | 14 | def __init__(self, qrcode=None, verifier=None, callbackUrl=None,): 15 | self.qrcode = qrcode 16 | self.verifier = verifier 17 | self.callbackUrl = callbackUrl 18 | 19 | def read(self, iprot): 20 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 21 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 22 | return 23 | iprot.readStructBegin() 24 | while True: 25 | (fname, ftype, fid) = iprot.readFieldBegin() 26 | if ftype == TType.STOP: 27 | break 28 | if fid == 1: 29 | if ftype == TType.STRING: 30 | self.qrcode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 31 | else: 32 | iprot.skip(ftype) 33 | elif fid == 2: 34 | if ftype == TType.STRING: 35 | self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 36 | else: 37 | iprot.skip(ftype) 38 | elif fid == 3: 39 | if ftype == TType.STRING: 40 | self.callbackUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 41 | else: 42 | iprot.skip(ftype) 43 | else: 44 | iprot.skip(ftype) 45 | iprot.readFieldEnd() 46 | iprot.readStructEnd() 47 | 48 | def write(self, oprot): 49 | if oprot._fast_encode is not None and self.thrift_spec is not None: 50 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 51 | return 52 | oprot.writeStructBegin('AuthQrcode') 53 | if self.qrcode is not None: 54 | oprot.writeFieldBegin('qrcode', TType.STRING, 1) 55 | oprot.writeString(self.qrcode.encode('utf-8') if sys.version_info[0] == 2 else self.qrcode) 56 | oprot.writeFieldEnd() 57 | if self.verifier is not None: 58 | oprot.writeFieldBegin('verifier', TType.STRING, 2) 59 | oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) 60 | oprot.writeFieldEnd() 61 | if self.callbackUrl is not None: 62 | oprot.writeFieldBegin('callbackUrl', TType.STRING, 3) 63 | oprot.writeString(self.callbackUrl.encode('utf-8') if sys.version_info[0] == 2 else self.callbackUrl) 64 | oprot.writeFieldEnd() 65 | oprot.writeFieldStop() 66 | oprot.writeStructEnd() 67 | 68 | def validate(self): 69 | return 70 | 71 | def __repr__(self): 72 | L = ['%s=%r' % (key, value) 73 | for key, value in self.__dict__.items()] 74 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 75 | 76 | def __eq__(self, other): 77 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 78 | 79 | def __ne__(self, other): 80 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoChatRoomAnnouncement.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | from protoAkad.protoTtypes.protoChatRoomAnnouncementContents import ChatRoomAnnouncementContents 5 | 6 | class ChatRoomAnnouncement(object): 7 | """ 8 | Attributes: 9 | - announcementSeq 10 | - type 11 | - contents 12 | - creatorMid 13 | - createdTime 14 | """ 15 | 16 | 17 | def __init__(self, announcementSeq=None, type=None, contents=None, creatorMid=None, createdTime=None,): 18 | self.announcementSeq = announcementSeq 19 | self.type = type 20 | self.contents = contents 21 | self.creatorMid = creatorMid 22 | self.createdTime = createdTime 23 | 24 | def read(self, iprot): 25 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 26 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 27 | return 28 | iprot.readStructBegin() 29 | while True: 30 | (fname, ftype, fid) = iprot.readFieldBegin() 31 | if ftype == TType.STOP: 32 | break 33 | if fid == 1: 34 | if ftype == TType.I64: 35 | self.announcementSeq = iprot.readI64() 36 | else: 37 | iprot.skip(ftype) 38 | elif fid == 2: 39 | if ftype == TType.I32: 40 | self.type = iprot.readI32() 41 | else: 42 | iprot.skip(ftype) 43 | elif fid == 3: 44 | if ftype == TType.STRUCT: 45 | self.contents = ChatRoomAnnouncementContents() 46 | self.contents.read(iprot) 47 | else: 48 | iprot.skip(ftype) 49 | elif fid == 4: 50 | if ftype == TType.STRING: 51 | self.creatorMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 52 | else: 53 | iprot.skip(ftype) 54 | elif fid == 5: 55 | if ftype == TType.I64: 56 | self.createdTime = iprot.readI64() 57 | else: 58 | iprot.skip(ftype) 59 | else: 60 | iprot.skip(ftype) 61 | iprot.readFieldEnd() 62 | iprot.readStructEnd() 63 | 64 | def write(self, oprot): 65 | if oprot._fast_encode is not None and self.thrift_spec is not None: 66 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 67 | return 68 | oprot.writeStructBegin('ChatRoomAnnouncement') 69 | if self.announcementSeq is not None: 70 | oprot.writeFieldBegin('announcementSeq', TType.I64, 1) 71 | oprot.writeI64(self.announcementSeq) 72 | oprot.writeFieldEnd() 73 | if self.type is not None: 74 | oprot.writeFieldBegin('type', TType.I32, 2) 75 | oprot.writeI32(self.type) 76 | oprot.writeFieldEnd() 77 | if self.contents is not None: 78 | oprot.writeFieldBegin('contents', TType.STRUCT, 3) 79 | self.contents.write(oprot) 80 | oprot.writeFieldEnd() 81 | if self.creatorMid is not None: 82 | oprot.writeFieldBegin('creatorMid', TType.STRING, 4) 83 | oprot.writeString(self.creatorMid.encode('utf-8') if sys.version_info[0] == 2 else self.creatorMid) 84 | oprot.writeFieldEnd() 85 | if self.createdTime is not None: 86 | oprot.writeFieldBegin('createdTime', TType.I64, 5) 87 | oprot.writeI64(self.createdTime) 88 | oprot.writeFieldEnd() 89 | oprot.writeFieldStop() 90 | oprot.writeStructEnd() 91 | 92 | def validate(self): 93 | return 94 | 95 | def __repr__(self): 96 | L = ['%s=%r' % (key, value) 97 | for key, value in self.__dict__.items()] 98 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 99 | 100 | def __eq__(self, other): 101 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 102 | 103 | def __ne__(self, other): 104 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoChatRoomAnnouncementContents.py: -------------------------------------------------------------------------------- 1 | 2 | from thrift.transport import TTransport 3 | from thrift.Thrift import TType 4 | import sys 5 | 6 | class ChatRoomAnnouncementContents(object): 7 | """ 8 | Attributes: 9 | - displayFields 10 | - text 11 | - link 12 | - thumbnail 13 | """ 14 | 15 | 16 | def __init__(self, displayFields=None, text=None, link=None, thumbnail=None,): 17 | self.displayFields = displayFields 18 | self.text = text 19 | self.link = link 20 | self.thumbnail = thumbnail 21 | 22 | def read(self, iprot): 23 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 24 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 25 | return 26 | iprot.readStructBegin() 27 | while True: 28 | (fname, ftype, fid) = iprot.readFieldBegin() 29 | if ftype == TType.STOP: 30 | break 31 | if fid == 1: 32 | if ftype == TType.I32: 33 | self.displayFields = iprot.readI32() 34 | else: 35 | iprot.skip(ftype) 36 | elif fid == 2: 37 | if ftype == TType.STRING: 38 | self.text = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 39 | else: 40 | iprot.skip(ftype) 41 | elif fid == 3: 42 | if ftype == TType.STRING: 43 | self.link = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 44 | else: 45 | iprot.skip(ftype) 46 | elif fid == 4: 47 | if ftype == TType.STRING: 48 | self.thumbnail = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 49 | else: 50 | iprot.skip(ftype) 51 | else: 52 | iprot.skip(ftype) 53 | iprot.readFieldEnd() 54 | iprot.readStructEnd() 55 | 56 | def write(self, oprot): 57 | if oprot._fast_encode is not None and self.thrift_spec is not None: 58 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 59 | return 60 | oprot.writeStructBegin('ChatRoomAnnouncementContents') 61 | if self.displayFields is not None: 62 | oprot.writeFieldBegin('displayFields', TType.I32, 1) 63 | oprot.writeI32(self.displayFields) 64 | oprot.writeFieldEnd() 65 | if self.text is not None: 66 | oprot.writeFieldBegin('text', TType.STRING, 2) 67 | oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text) 68 | oprot.writeFieldEnd() 69 | if self.link is not None: 70 | oprot.writeFieldBegin('link', TType.STRING, 3) 71 | oprot.writeString(self.link.encode('utf-8') if sys.version_info[0] == 2 else self.link) 72 | oprot.writeFieldEnd() 73 | if self.thumbnail is not None: 74 | oprot.writeFieldBegin('thumbnail', TType.STRING, 4) 75 | oprot.writeString(self.thumbnail.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnail) 76 | oprot.writeFieldEnd() 77 | oprot.writeFieldStop() 78 | oprot.writeStructEnd() 79 | 80 | def validate(self): 81 | return 82 | 83 | def __repr__(self): 84 | L = ['%s=%r' % (key, value) 85 | for key, value in self.__dict__.items()] 86 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 87 | 88 | def __eq__(self, other): 89 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 90 | 91 | def __ne__(self, other): 92 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoContact.py: -------------------------------------------------------------------------------- 1 | from thrift.Thrift import TType 2 | from thrift.transport import TTransport 3 | import sys 4 | 5 | class Contact(object): 6 | """ 7 | Attributes: 8 | - mid 9 | - createdTime 10 | - type 11 | - status 12 | - relation 13 | - displayName 14 | - phoneticName 15 | - pictureStatus 16 | - thumbnailUrl 17 | - statusMessage 18 | - displayNameOverridden 19 | - favoriteTime 20 | - capableVoiceCall 21 | - capableVideoCall 22 | - capableMyhome 23 | - capableBuddy 24 | - attributes 25 | - settings 26 | - picturePath 27 | - recommendParams 28 | - friendRequestStatus 29 | - musicProfile 30 | - videoProfile 31 | """ 32 | 33 | 34 | def __init__(self, mid=None, createdTime=None, type=None, status=None, relation=None, displayName=None, phoneticName=None, pictureStatus=None, thumbnailUrl=None, statusMessage=None, displayNameOverridden=None, favoriteTime=None, capableVoiceCall=None, capableVideoCall=None, capableMyhome=None, capableBuddy=None, attributes=None, settings=None, picturePath=None, recommendParams=None, friendRequestStatus=None, musicProfile=None, videoProfile=None,): 35 | self.mid = mid 36 | self.createdTime = createdTime 37 | self.type = type 38 | self.status = status 39 | self.relation = relation 40 | self.displayName = displayName 41 | self.phoneticName = phoneticName 42 | self.pictureStatus = pictureStatus 43 | self.thumbnailUrl = thumbnailUrl 44 | self.statusMessage = statusMessage 45 | self.displayNameOverridden = displayNameOverridden 46 | self.favoriteTime = favoriteTime 47 | self.capableVoiceCall = capableVoiceCall 48 | self.capableVideoCall = capableVideoCall 49 | self.capableMyhome = capableMyhome 50 | self.capableBuddy = capableBuddy 51 | self.attributes = attributes 52 | self.settings = settings 53 | self.picturePath = picturePath 54 | self.recommendParams = recommendParams 55 | self.friendRequestStatus = friendRequestStatus 56 | self.musicProfile = musicProfile 57 | self.videoProfile = videoProfile 58 | 59 | def read(self, iprot): 60 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 61 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 62 | return 63 | iprot.readStructBegin() 64 | while True: 65 | (fname, ftype, fid) = iprot.readFieldBegin() 66 | if ftype == TType.STOP: 67 | break 68 | if fid == 1: 69 | if ftype == TType.STRING: 70 | self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 71 | else: 72 | iprot.skip(ftype) 73 | elif fid == 2: 74 | if ftype == TType.I64: 75 | self.createdTime = iprot.readI64() 76 | else: 77 | iprot.skip(ftype) 78 | elif fid == 10: 79 | if ftype == TType.I32: 80 | self.type = iprot.readI32() 81 | else: 82 | iprot.skip(ftype) 83 | elif fid == 11: 84 | if ftype == TType.I32: 85 | self.status = iprot.readI32() 86 | else: 87 | iprot.skip(ftype) 88 | elif fid == 21: 89 | if ftype == TType.I32: 90 | self.relation = iprot.readI32() 91 | else: 92 | iprot.skip(ftype) 93 | elif fid == 22: 94 | if ftype == TType.STRING: 95 | self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 96 | else: 97 | iprot.skip(ftype) 98 | elif fid == 23: 99 | if ftype == TType.STRING: 100 | self.phoneticName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 101 | else: 102 | iprot.skip(ftype) 103 | elif fid == 24: 104 | if ftype == TType.STRING: 105 | self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 106 | else: 107 | iprot.skip(ftype) 108 | elif fid == 25: 109 | if ftype == TType.STRING: 110 | self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 111 | else: 112 | iprot.skip(ftype) 113 | elif fid == 26: 114 | if ftype == TType.STRING: 115 | self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 116 | else: 117 | iprot.skip(ftype) 118 | elif fid == 27: 119 | if ftype == TType.STRING: 120 | self.displayNameOverridden = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 121 | else: 122 | iprot.skip(ftype) 123 | elif fid == 28: 124 | if ftype == TType.I64: 125 | self.favoriteTime = iprot.readI64() 126 | else: 127 | iprot.skip(ftype) 128 | elif fid == 31: 129 | if ftype == TType.BOOL: 130 | self.capableVoiceCall = iprot.readBool() 131 | else: 132 | iprot.skip(ftype) 133 | elif fid == 32: 134 | if ftype == TType.BOOL: 135 | self.capableVideoCall = iprot.readBool() 136 | else: 137 | iprot.skip(ftype) 138 | elif fid == 33: 139 | if ftype == TType.BOOL: 140 | self.capableMyhome = iprot.readBool() 141 | else: 142 | iprot.skip(ftype) 143 | elif fid == 34: 144 | if ftype == TType.BOOL: 145 | self.capableBuddy = iprot.readBool() 146 | else: 147 | iprot.skip(ftype) 148 | elif fid == 35: 149 | if ftype == TType.I32: 150 | self.attributes = iprot.readI32() 151 | else: 152 | iprot.skip(ftype) 153 | elif fid == 36: 154 | if ftype == TType.I64: 155 | self.settings = iprot.readI64() 156 | else: 157 | iprot.skip(ftype) 158 | elif fid == 37: 159 | if ftype == TType.STRING: 160 | self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 161 | else: 162 | iprot.skip(ftype) 163 | elif fid == 38: 164 | if ftype == TType.STRING: 165 | self.recommendParams = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 166 | else: 167 | iprot.skip(ftype) 168 | elif fid == 39: 169 | if ftype == TType.I32: 170 | self.friendRequestStatus = iprot.readI32() 171 | else: 172 | iprot.skip(ftype) 173 | elif fid == 40: 174 | if ftype == TType.STRING: 175 | self.musicProfile = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 176 | else: 177 | iprot.skip(ftype) 178 | elif fid == 42: 179 | if ftype == TType.STRING: 180 | self.videoProfile = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 181 | else: 182 | iprot.skip(ftype) 183 | else: 184 | iprot.skip(ftype) 185 | iprot.readFieldEnd() 186 | iprot.readStructEnd() 187 | 188 | def write(self, oprot): 189 | if oprot._fast_encode is not None and self.thrift_spec is not None: 190 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 191 | return 192 | oprot.writeStructBegin('Contact') 193 | if self.mid is not None: 194 | oprot.writeFieldBegin('mid', TType.STRING, 1) 195 | oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) 196 | oprot.writeFieldEnd() 197 | if self.createdTime is not None: 198 | oprot.writeFieldBegin('createdTime', TType.I64, 2) 199 | oprot.writeI64(self.createdTime) 200 | oprot.writeFieldEnd() 201 | if self.type is not None: 202 | oprot.writeFieldBegin('type', TType.I32, 10) 203 | oprot.writeI32(self.type) 204 | oprot.writeFieldEnd() 205 | if self.status is not None: 206 | oprot.writeFieldBegin('status', TType.I32, 11) 207 | oprot.writeI32(self.status) 208 | oprot.writeFieldEnd() 209 | if self.relation is not None: 210 | oprot.writeFieldBegin('relation', TType.I32, 21) 211 | oprot.writeI32(self.relation) 212 | oprot.writeFieldEnd() 213 | if self.displayName is not None: 214 | oprot.writeFieldBegin('displayName', TType.STRING, 22) 215 | oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName) 216 | oprot.writeFieldEnd() 217 | if self.phoneticName is not None: 218 | oprot.writeFieldBegin('phoneticName', TType.STRING, 23) 219 | oprot.writeString(self.phoneticName.encode('utf-8') if sys.version_info[0] == 2 else self.phoneticName) 220 | oprot.writeFieldEnd() 221 | if self.pictureStatus is not None: 222 | oprot.writeFieldBegin('pictureStatus', TType.STRING, 24) 223 | oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus) 224 | oprot.writeFieldEnd() 225 | if self.thumbnailUrl is not None: 226 | oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 25) 227 | oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl) 228 | oprot.writeFieldEnd() 229 | if self.statusMessage is not None: 230 | oprot.writeFieldBegin('statusMessage', TType.STRING, 26) 231 | oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage) 232 | oprot.writeFieldEnd() 233 | if self.displayNameOverridden is not None: 234 | oprot.writeFieldBegin('displayNameOverridden', TType.STRING, 27) 235 | oprot.writeString(self.displayNameOverridden.encode('utf-8') if sys.version_info[0] == 2 else self.displayNameOverridden) 236 | oprot.writeFieldEnd() 237 | if self.favoriteTime is not None: 238 | oprot.writeFieldBegin('favoriteTime', TType.I64, 28) 239 | oprot.writeI64(self.favoriteTime) 240 | oprot.writeFieldEnd() 241 | if self.capableVoiceCall is not None: 242 | oprot.writeFieldBegin('capableVoiceCall', TType.BOOL, 31) 243 | oprot.writeBool(self.capableVoiceCall) 244 | oprot.writeFieldEnd() 245 | if self.capableVideoCall is not None: 246 | oprot.writeFieldBegin('capableVideoCall', TType.BOOL, 32) 247 | oprot.writeBool(self.capableVideoCall) 248 | oprot.writeFieldEnd() 249 | if self.capableMyhome is not None: 250 | oprot.writeFieldBegin('capableMyhome', TType.BOOL, 33) 251 | oprot.writeBool(self.capableMyhome) 252 | oprot.writeFieldEnd() 253 | if self.capableBuddy is not None: 254 | oprot.writeFieldBegin('capableBuddy', TType.BOOL, 34) 255 | oprot.writeBool(self.capableBuddy) 256 | oprot.writeFieldEnd() 257 | if self.attributes is not None: 258 | oprot.writeFieldBegin('attributes', TType.I32, 35) 259 | oprot.writeI32(self.attributes) 260 | oprot.writeFieldEnd() 261 | if self.settings is not None: 262 | oprot.writeFieldBegin('settings', TType.I64, 36) 263 | oprot.writeI64(self.settings) 264 | oprot.writeFieldEnd() 265 | if self.picturePath is not None: 266 | oprot.writeFieldBegin('picturePath', TType.STRING, 37) 267 | oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath) 268 | oprot.writeFieldEnd() 269 | if self.recommendParams is not None: 270 | oprot.writeFieldBegin('recommendParams', TType.STRING, 38) 271 | oprot.writeString(self.recommendParams.encode('utf-8') if sys.version_info[0] == 2 else self.recommendParams) 272 | oprot.writeFieldEnd() 273 | if self.friendRequestStatus is not None: 274 | oprot.writeFieldBegin('friendRequestStatus', TType.I32, 39) 275 | oprot.writeI32(self.friendRequestStatus) 276 | oprot.writeFieldEnd() 277 | if self.musicProfile is not None: 278 | oprot.writeFieldBegin('musicProfile', TType.STRING, 40) 279 | oprot.writeString(self.musicProfile.encode('utf-8') if sys.version_info[0] == 2 else self.musicProfile) 280 | oprot.writeFieldEnd() 281 | if self.videoProfile is not None: 282 | oprot.writeFieldBegin('videoProfile', TType.STRING, 42) 283 | oprot.writeString(self.videoProfile.encode('utf-8') if sys.version_info[0] == 2 else self.videoProfile) 284 | oprot.writeFieldEnd() 285 | oprot.writeFieldStop() 286 | oprot.writeStructEnd() 287 | 288 | def validate(self): 289 | return 290 | 291 | def __repr__(self): 292 | L = ['%s=%r' % (key, value) 293 | for key, value in self.__dict__.items()] 294 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 295 | 296 | def __eq__(self, other): 297 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 298 | 299 | def __ne__(self, other): 300 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoE2EEPublicKey.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | all_structs = [] 4 | class E2EEPublicKey(object): 5 | """ 6 | Attributes: 7 | - version 8 | - keyId 9 | - keyData 10 | - createdTime 11 | """ 12 | 13 | 14 | def __init__(self, version=None, keyId=None, keyData=None, createdTime=None,): 15 | self.version = version 16 | self.keyId = keyId 17 | self.keyData = keyData 18 | self.createdTime = createdTime 19 | 20 | def read(self, iprot): 21 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 22 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 23 | return 24 | iprot.readStructBegin() 25 | while True: 26 | (fname, ftype, fid) = iprot.readFieldBegin() 27 | if ftype == TType.STOP: 28 | break 29 | if fid == 1: 30 | if ftype == TType.I32: 31 | self.version = iprot.readI32() 32 | else: 33 | iprot.skip(ftype) 34 | elif fid == 2: 35 | if ftype == TType.I32: 36 | self.keyId = iprot.readI32() 37 | else: 38 | iprot.skip(ftype) 39 | elif fid == 4: 40 | if ftype == TType.STRING: 41 | self.keyData = iprot.readBinary() 42 | else: 43 | iprot.skip(ftype) 44 | elif fid == 5: 45 | if ftype == TType.I64: 46 | self.createdTime = iprot.readI64() 47 | else: 48 | iprot.skip(ftype) 49 | else: 50 | iprot.skip(ftype) 51 | iprot.readFieldEnd() 52 | iprot.readStructEnd() 53 | 54 | def write(self, oprot): 55 | if oprot._fast_encode is not None and self.thrift_spec is not None: 56 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 57 | return 58 | oprot.writeStructBegin('E2EEPublicKey') 59 | if self.version is not None: 60 | oprot.writeFieldBegin('version', TType.I32, 1) 61 | oprot.writeI32(self.version) 62 | oprot.writeFieldEnd() 63 | if self.keyId is not None: 64 | oprot.writeFieldBegin('keyId', TType.I32, 2) 65 | oprot.writeI32(self.keyId) 66 | oprot.writeFieldEnd() 67 | if self.keyData is not None: 68 | oprot.writeFieldBegin('keyData', TType.STRING, 4) 69 | oprot.writeBinary(self.keyData) 70 | oprot.writeFieldEnd() 71 | if self.createdTime is not None: 72 | oprot.writeFieldBegin('createdTime', TType.I64, 5) 73 | oprot.writeI64(self.createdTime) 74 | oprot.writeFieldEnd() 75 | oprot.writeFieldStop() 76 | oprot.writeStructEnd() 77 | 78 | def validate(self): 79 | return 80 | 81 | def __repr__(self): 82 | L = ['%s=%r' % (key, value) 83 | for key, value in self.__dict__.items()] 84 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 85 | 86 | def __eq__(self, other): 87 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 88 | 89 | def __ne__(self, other): 90 | return not (self == other) 91 | 92 | all_structs.append(E2EEPublicKey) 93 | E2EEPublicKey.thrift_spec = ( 94 | None, # 0 95 | (1, TType.I32, 'version', None, None, ), # 1 96 | (2, TType.I32, 'keyId', None, None, ), # 2 97 | None, # 3 98 | (4, TType.STRING, 'keyData', 'BINARY', None, ), # 4 99 | (5, TType.I64, 'createdTime', None, None, ), # 5 100 | ) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoFriendRequest.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | from thrift.TRecursive import fix_spec 5 | 6 | all_structs = [] 7 | 8 | class FriendRequest(object): 9 | """ 10 | Attributes: 11 | - eMid 12 | - mid 13 | - direction 14 | - method 15 | - param 16 | - timestamp 17 | - seqId 18 | - displayName 19 | - picturePath 20 | - pictureStatus 21 | """ 22 | 23 | 24 | def __init__(self, eMid=None, mid=None, direction=None, method=None, param=None, timestamp=None, seqId=None, displayName=None, picturePath=None, pictureStatus=None,): 25 | self.eMid = eMid 26 | self.mid = mid 27 | self.direction = direction 28 | self.method = method 29 | self.param = param 30 | self.timestamp = timestamp 31 | self.seqId = seqId 32 | self.displayName = displayName 33 | self.picturePath = picturePath 34 | self.pictureStatus = pictureStatus 35 | 36 | def read(self, iprot): 37 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 38 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 39 | return 40 | iprot.readStructBegin() 41 | while True: 42 | (fname, ftype, fid) = iprot.readFieldBegin() 43 | if ftype == TType.STOP: 44 | break 45 | if fid == 1: 46 | if ftype == TType.STRING: 47 | self.eMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 48 | else: 49 | iprot.skip(ftype) 50 | elif fid == 2: 51 | if ftype == TType.STRING: 52 | self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 53 | else: 54 | iprot.skip(ftype) 55 | elif fid == 3: 56 | if ftype == TType.I32: 57 | self.direction = iprot.readI32() 58 | else: 59 | iprot.skip(ftype) 60 | elif fid == 4: 61 | if ftype == TType.I32: 62 | self.method = iprot.readI32() 63 | else: 64 | iprot.skip(ftype) 65 | elif fid == 5: 66 | if ftype == TType.STRING: 67 | self.param = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 68 | else: 69 | iprot.skip(ftype) 70 | elif fid == 6: 71 | if ftype == TType.I64: 72 | self.timestamp = iprot.readI64() 73 | else: 74 | iprot.skip(ftype) 75 | elif fid == 7: 76 | if ftype == TType.I64: 77 | self.seqId = iprot.readI64() 78 | else: 79 | iprot.skip(ftype) 80 | elif fid == 10: 81 | if ftype == TType.STRING: 82 | self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 83 | else: 84 | iprot.skip(ftype) 85 | elif fid == 11: 86 | if ftype == TType.STRING: 87 | self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 88 | else: 89 | iprot.skip(ftype) 90 | elif fid == 12: 91 | if ftype == TType.STRING: 92 | self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 93 | else: 94 | iprot.skip(ftype) 95 | else: 96 | iprot.skip(ftype) 97 | iprot.readFieldEnd() 98 | iprot.readStructEnd() 99 | 100 | def write(self, oprot): 101 | if oprot._fast_encode is not None and self.thrift_spec is not None: 102 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 103 | return 104 | oprot.writeStructBegin('FriendRequest') 105 | if self.eMid is not None: 106 | oprot.writeFieldBegin('eMid', TType.STRING, 1) 107 | oprot.writeString(self.eMid.encode('utf-8') if sys.version_info[0] == 2 else self.eMid) 108 | oprot.writeFieldEnd() 109 | if self.mid is not None: 110 | oprot.writeFieldBegin('mid', TType.STRING, 2) 111 | oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) 112 | oprot.writeFieldEnd() 113 | if self.direction is not None: 114 | oprot.writeFieldBegin('direction', TType.I32, 3) 115 | oprot.writeI32(self.direction) 116 | oprot.writeFieldEnd() 117 | if self.method is not None: 118 | oprot.writeFieldBegin('method', TType.I32, 4) 119 | oprot.writeI32(self.method) 120 | oprot.writeFieldEnd() 121 | if self.param is not None: 122 | oprot.writeFieldBegin('param', TType.STRING, 5) 123 | oprot.writeString(self.param.encode('utf-8') if sys.version_info[0] == 2 else self.param) 124 | oprot.writeFieldEnd() 125 | if self.timestamp is not None: 126 | oprot.writeFieldBegin('timestamp', TType.I64, 6) 127 | oprot.writeI64(self.timestamp) 128 | oprot.writeFieldEnd() 129 | if self.seqId is not None: 130 | oprot.writeFieldBegin('seqId', TType.I64, 7) 131 | oprot.writeI64(self.seqId) 132 | oprot.writeFieldEnd() 133 | if self.displayName is not None: 134 | oprot.writeFieldBegin('displayName', TType.STRING, 10) 135 | oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName) 136 | oprot.writeFieldEnd() 137 | if self.picturePath is not None: 138 | oprot.writeFieldBegin('picturePath', TType.STRING, 11) 139 | oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath) 140 | oprot.writeFieldEnd() 141 | if self.pictureStatus is not None: 142 | oprot.writeFieldBegin('pictureStatus', TType.STRING, 12) 143 | oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus) 144 | oprot.writeFieldEnd() 145 | oprot.writeFieldStop() 146 | oprot.writeStructEnd() 147 | 148 | def validate(self): 149 | return 150 | 151 | def __repr__(self): 152 | L = ['%s=%r' % (key, value) 153 | for key, value in self.__dict__.items()] 154 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 155 | 156 | def __eq__(self, other): 157 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 158 | 159 | def __ne__(self, other): 160 | return not (self == other) 161 | 162 | all_structs.append(FriendRequest) 163 | FriendRequest.thrift_spec = ( 164 | None, # 0 165 | (1, TType.STRING, 'eMid', 'UTF8', None, ), # 1 166 | (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 167 | (3, TType.I32, 'direction', None, None, ), # 3 168 | (4, TType.I32, 'method', None, None, ), # 4 169 | (5, TType.STRING, 'param', 'UTF8', None, ), # 5 170 | (6, TType.I64, 'timestamp', None, None, ), # 6 171 | (7, TType.I64, 'seqId', None, None, ), # 7 172 | None, # 8 173 | None, # 9 174 | (10, TType.STRING, 'displayName', 'UTF8', None, ), # 10 175 | (11, TType.STRING, 'picturePath', 'UTF8', None, ), # 11 176 | (12, TType.STRING, 'pictureStatus', 'UTF8', None, ), # 12 177 | ) 178 | 179 | fix_spec(all_structs) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoGroup.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | 5 | class Group(object): 6 | """ 7 | Attributes: 8 | - id 9 | - createdTime 10 | - name 11 | - pictureStatus 12 | - preventedJoinByTicket 13 | - groupPreference 14 | - members 15 | - creator 16 | - invitee 17 | - notificationDisabled 18 | """ 19 | 20 | 21 | def __init__(self, id=None, createdTime=None, name=None, pictureStatus=None, preventedJoinByTicket=None, groupPreference=None, members=None, creator=None, invitee=None, notificationDisabled=None,): 22 | self.id = id 23 | self.createdTime = createdTime 24 | self.name = name 25 | self.pictureStatus = pictureStatus 26 | self.preventedJoinByTicket = preventedJoinByTicket 27 | self.groupPreference = groupPreference 28 | self.members = members 29 | self.creator = creator 30 | self.invitee = invitee 31 | self.notificationDisabled = notificationDisabled 32 | 33 | def read(self, iprot): 34 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 35 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 36 | return 37 | iprot.readStructBegin() 38 | while True: 39 | (fname, ftype, fid) = iprot.readFieldBegin() 40 | if ftype == TType.STOP: 41 | break 42 | if fid == 1: 43 | if ftype == TType.STRING: 44 | self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 45 | else: 46 | iprot.skip(ftype) 47 | elif fid == 2: 48 | if ftype == TType.I64: 49 | self.createdTime = iprot.readI64() 50 | else: 51 | iprot.skip(ftype) 52 | elif fid == 10: 53 | if ftype == TType.STRING: 54 | self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 55 | else: 56 | iprot.skip(ftype) 57 | elif fid == 11: 58 | if ftype == TType.STRING: 59 | self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 60 | else: 61 | iprot.skip(ftype) 62 | elif fid == 12: 63 | if ftype == TType.BOOL: 64 | self.preventedJoinByTicket = iprot.readBool() 65 | else: 66 | iprot.skip(ftype) 67 | elif fid == 13: 68 | if ftype == TType.STRUCT: 69 | self.groupPreference = GroupPreference() 70 | self.groupPreference.read(iprot) 71 | else: 72 | iprot.skip(ftype) 73 | elif fid == 20: 74 | if ftype == TType.LIST: 75 | self.members = [] 76 | (_etype251, _size248) = iprot.readListBegin() 77 | for _i252 in range(_size248): 78 | _elem253 = Contact() 79 | _elem253.read(iprot) 80 | self.members.append(_elem253) 81 | iprot.readListEnd() 82 | else: 83 | iprot.skip(ftype) 84 | elif fid == 21: 85 | if ftype == TType.STRUCT: 86 | self.creator = Contact() 87 | self.creator.read(iprot) 88 | else: 89 | iprot.skip(ftype) 90 | elif fid == 22: 91 | if ftype == TType.LIST: 92 | self.invitee = [] 93 | (_etype257, _size254) = iprot.readListBegin() 94 | for _i258 in range(_size254): 95 | _elem259 = Contact() 96 | _elem259.read(iprot) 97 | self.invitee.append(_elem259) 98 | iprot.readListEnd() 99 | else: 100 | iprot.skip(ftype) 101 | elif fid == 31: 102 | if ftype == TType.BOOL: 103 | self.notificationDisabled = iprot.readBool() 104 | else: 105 | iprot.skip(ftype) 106 | else: 107 | iprot.skip(ftype) 108 | iprot.readFieldEnd() 109 | iprot.readStructEnd() 110 | 111 | def write(self, oprot): 112 | if oprot._fast_encode is not None and self.thrift_spec is not None: 113 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 114 | return 115 | oprot.writeStructBegin('Group') 116 | if self.id is not None: 117 | oprot.writeFieldBegin('id', TType.STRING, 1) 118 | oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) 119 | oprot.writeFieldEnd() 120 | if self.createdTime is not None: 121 | oprot.writeFieldBegin('createdTime', TType.I64, 2) 122 | oprot.writeI64(self.createdTime) 123 | oprot.writeFieldEnd() 124 | if self.name is not None: 125 | oprot.writeFieldBegin('name', TType.STRING, 10) 126 | oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) 127 | oprot.writeFieldEnd() 128 | if self.pictureStatus is not None: 129 | oprot.writeFieldBegin('pictureStatus', TType.STRING, 11) 130 | oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus) 131 | oprot.writeFieldEnd() 132 | if self.preventedJoinByTicket is not None: 133 | oprot.writeFieldBegin('preventedJoinByTicket', TType.BOOL, 12) 134 | oprot.writeBool(self.preventedJoinByTicket) 135 | oprot.writeFieldEnd() 136 | if self.groupPreference is not None: 137 | oprot.writeFieldBegin('groupPreference', TType.STRUCT, 13) 138 | self.groupPreference.write(oprot) 139 | oprot.writeFieldEnd() 140 | if self.members is not None: 141 | oprot.writeFieldBegin('members', TType.LIST, 20) 142 | oprot.writeListBegin(TType.STRUCT, len(self.members)) 143 | for iter260 in self.members: 144 | iter260.write(oprot) 145 | oprot.writeListEnd() 146 | oprot.writeFieldEnd() 147 | if self.creator is not None: 148 | oprot.writeFieldBegin('creator', TType.STRUCT, 21) 149 | self.creator.write(oprot) 150 | oprot.writeFieldEnd() 151 | if self.invitee is not None: 152 | oprot.writeFieldBegin('invitee', TType.LIST, 22) 153 | oprot.writeListBegin(TType.STRUCT, len(self.invitee)) 154 | for iter261 in self.invitee: 155 | iter261.write(oprot) 156 | oprot.writeListEnd() 157 | oprot.writeFieldEnd() 158 | if self.notificationDisabled is not None: 159 | oprot.writeFieldBegin('notificationDisabled', TType.BOOL, 31) 160 | oprot.writeBool(self.notificationDisabled) 161 | oprot.writeFieldEnd() 162 | oprot.writeFieldStop() 163 | oprot.writeStructEnd() 164 | 165 | def validate(self): 166 | return 167 | 168 | def __repr__(self): 169 | L = ['%s=%r' % (key, value) 170 | for key, value in self.__dict__.items()] 171 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 172 | 173 | def __eq__(self, other): 174 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 175 | 176 | def __ne__(self, other): 177 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoGroupPreference.py: -------------------------------------------------------------------------------- 1 | class GroupPreference(object): 2 | """ 3 | Attributes: 4 | - invitationTicket 5 | - favoriteTimestamp 6 | """ 7 | 8 | 9 | def __init__(self, invitationTicket=None, favoriteTimestamp=None,): 10 | self.invitationTicket = invitationTicket 11 | self.favoriteTimestamp = favoriteTimestamp 12 | 13 | def read(self, iprot): 14 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 15 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 16 | return 17 | iprot.readStructBegin() 18 | while True: 19 | (fname, ftype, fid) = iprot.readFieldBegin() 20 | if ftype == TType.STOP: 21 | break 22 | if fid == 1: 23 | if ftype == TType.STRING: 24 | self.invitationTicket = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 25 | else: 26 | iprot.skip(ftype) 27 | elif fid == 2: 28 | if ftype == TType.I64: 29 | self.favoriteTimestamp = iprot.readI64() 30 | else: 31 | iprot.skip(ftype) 32 | else: 33 | iprot.skip(ftype) 34 | iprot.readFieldEnd() 35 | iprot.readStructEnd() 36 | 37 | def write(self, oprot): 38 | if oprot._fast_encode is not None and self.thrift_spec is not None: 39 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 40 | return 41 | oprot.writeStructBegin('GroupPreference') 42 | if self.invitationTicket is not None: 43 | oprot.writeFieldBegin('invitationTicket', TType.STRING, 1) 44 | oprot.writeString(self.invitationTicket.encode('utf-8') if sys.version_info[0] == 2 else self.invitationTicket) 45 | oprot.writeFieldEnd() 46 | if self.favoriteTimestamp is not None: 47 | oprot.writeFieldBegin('favoriteTimestamp', TType.I64, 2) 48 | oprot.writeI64(self.favoriteTimestamp) 49 | oprot.writeFieldEnd() 50 | oprot.writeFieldStop() 51 | oprot.writeStructEnd() 52 | 53 | def validate(self): 54 | return 55 | 56 | def __repr__(self): 57 | L = ['%s=%r' % (key, value) 58 | for key, value in self.__dict__.items()] 59 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 60 | 61 | def __eq__(self, other): 62 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 63 | 64 | def __ne__(self, other): 65 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoIdentityProvider.py: -------------------------------------------------------------------------------- 1 | class IdentityProvider(object): 2 | UNKNOWN = 0 3 | LINE = 1 4 | NAVER_KR = 2 5 | LINE_PHONE = 3 6 | 7 | _VALUES_TO_NAMES = { 8 | 0: "UNKNOWN", 9 | 1: "LINE", 10 | 2: "NAVER_KR", 11 | 3: "LINE_PHONE", 12 | } 13 | 14 | _NAMES_TO_VALUES = { 15 | "UNKNOWN": 0, 16 | "LINE": 1, 17 | "NAVER_KR": 2, 18 | "LINE_PHONE": 3, 19 | } -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoLocation.py: -------------------------------------------------------------------------------- 1 | class Location(object): 2 | """ 3 | Attributes: 4 | - title 5 | - address 6 | - latitude 7 | - longitude 8 | - phone 9 | """ 10 | 11 | 12 | def __init__(self, title=None, address=None, latitude=None, longitude=None, phone=None,): 13 | self.title = title 14 | self.address = address 15 | self.latitude = latitude 16 | self.longitude = longitude 17 | self.phone = phone 18 | 19 | def read(self, iprot): 20 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 21 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 22 | return 23 | iprot.readStructBegin() 24 | while True: 25 | (fname, ftype, fid) = iprot.readFieldBegin() 26 | if ftype == TType.STOP: 27 | break 28 | if fid == 1: 29 | if ftype == TType.STRING: 30 | self.title = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 31 | else: 32 | iprot.skip(ftype) 33 | elif fid == 2: 34 | if ftype == TType.STRING: 35 | self.address = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 36 | else: 37 | iprot.skip(ftype) 38 | elif fid == 3: 39 | if ftype == TType.DOUBLE: 40 | self.latitude = iprot.readDouble() 41 | else: 42 | iprot.skip(ftype) 43 | elif fid == 4: 44 | if ftype == TType.DOUBLE: 45 | self.longitude = iprot.readDouble() 46 | else: 47 | iprot.skip(ftype) 48 | elif fid == 5: 49 | if ftype == TType.STRING: 50 | self.phone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 51 | else: 52 | iprot.skip(ftype) 53 | else: 54 | iprot.skip(ftype) 55 | iprot.readFieldEnd() 56 | iprot.readStructEnd() 57 | 58 | def write(self, oprot): 59 | if oprot._fast_encode is not None and self.thrift_spec is not None: 60 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 61 | return 62 | oprot.writeStructBegin('Location') 63 | if self.title is not None: 64 | oprot.writeFieldBegin('title', TType.STRING, 1) 65 | oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) 66 | oprot.writeFieldEnd() 67 | if self.address is not None: 68 | oprot.writeFieldBegin('address', TType.STRING, 2) 69 | oprot.writeString(self.address.encode('utf-8') if sys.version_info[0] == 2 else self.address) 70 | oprot.writeFieldEnd() 71 | if self.latitude is not None: 72 | oprot.writeFieldBegin('latitude', TType.DOUBLE, 3) 73 | oprot.writeDouble(self.latitude) 74 | oprot.writeFieldEnd() 75 | if self.longitude is not None: 76 | oprot.writeFieldBegin('longitude', TType.DOUBLE, 4) 77 | oprot.writeDouble(self.longitude) 78 | oprot.writeFieldEnd() 79 | if self.phone is not None: 80 | oprot.writeFieldBegin('phone', TType.STRING, 5) 81 | oprot.writeString(self.phone.encode('utf-8') if sys.version_info[0] == 2 else self.phone) 82 | oprot.writeFieldEnd() 83 | oprot.writeFieldStop() 84 | oprot.writeStructEnd() 85 | 86 | def validate(self): 87 | return 88 | 89 | def __repr__(self): 90 | L = ['%s=%r' % (key, value) 91 | for key, value in self.__dict__.items()] 92 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 93 | 94 | def __eq__(self, other): 95 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 96 | 97 | def __ne__(self, other): 98 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoLoginRequest.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | all_structs = [] 5 | 6 | class LoginRequest(object): 7 | """ 8 | Attributes: 9 | - type 10 | - identityProvider 11 | - identifier 12 | - password 13 | - keepLoggedIn 14 | - accessLocation 15 | - systemName 16 | - certificate 17 | - verifier 18 | - secret 19 | - e2eeVersion 20 | """ 21 | 22 | 23 | def __init__(self, type=None, identityProvider=None, identifier=None, password=None, keepLoggedIn=None, accessLocation=None, systemName=None, certificate=None, verifier=None, secret=None, e2eeVersion=None,): 24 | self.type = type 25 | self.identityProvider = identityProvider 26 | self.identifier = identifier 27 | self.password = password 28 | self.keepLoggedIn = keepLoggedIn 29 | self.accessLocation = accessLocation 30 | self.systemName = systemName 31 | self.certificate = certificate 32 | self.verifier = verifier 33 | self.secret = secret 34 | self.e2eeVersion = e2eeVersion 35 | 36 | def read(self, iprot): 37 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 38 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 39 | return 40 | iprot.readStructBegin() 41 | while True: 42 | (fname, ftype, fid) = iprot.readFieldBegin() 43 | if ftype == TType.STOP: 44 | break 45 | if fid == 1: 46 | if ftype == TType.I32: 47 | self.type = iprot.readI32() 48 | else: 49 | iprot.skip(ftype) 50 | elif fid == 2: 51 | if ftype == TType.I32: 52 | self.identityProvider = iprot.readI32() 53 | else: 54 | iprot.skip(ftype) 55 | elif fid == 3: 56 | if ftype == TType.STRING: 57 | self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 58 | else: 59 | iprot.skip(ftype) 60 | elif fid == 4: 61 | if ftype == TType.STRING: 62 | self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 63 | else: 64 | iprot.skip(ftype) 65 | elif fid == 5: 66 | if ftype == TType.BOOL: 67 | self.keepLoggedIn = iprot.readBool() 68 | else: 69 | iprot.skip(ftype) 70 | elif fid == 6: 71 | if ftype == TType.STRING: 72 | self.accessLocation = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 73 | else: 74 | iprot.skip(ftype) 75 | elif fid == 7: 76 | if ftype == TType.STRING: 77 | self.systemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 78 | else: 79 | iprot.skip(ftype) 80 | elif fid == 8: 81 | if ftype == TType.STRING: 82 | self.certificate = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 83 | else: 84 | iprot.skip(ftype) 85 | elif fid == 9: 86 | if ftype == TType.STRING: 87 | self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 88 | else: 89 | iprot.skip(ftype) 90 | elif fid == 10: 91 | if ftype == TType.STRING: 92 | self.secret = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 93 | else: 94 | iprot.skip(ftype) 95 | elif fid == 11: 96 | if ftype == TType.I32: 97 | self.e2eeVersion = iprot.readI32() 98 | else: 99 | iprot.skip(ftype) 100 | else: 101 | iprot.skip(ftype) 102 | iprot.readFieldEnd() 103 | iprot.readStructEnd() 104 | 105 | def write(self, oprot): 106 | if oprot._fast_encode is not None and self.thrift_spec is not None: 107 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 108 | return 109 | oprot.writeStructBegin('LoginRequest') 110 | if self.type is not None: 111 | oprot.writeFieldBegin('type', TType.I32, 1) 112 | oprot.writeI32(self.type) 113 | oprot.writeFieldEnd() 114 | if self.identityProvider is not None: 115 | oprot.writeFieldBegin('identityProvider', TType.I32, 2) 116 | oprot.writeI32(self.identityProvider) 117 | oprot.writeFieldEnd() 118 | if self.identifier is not None: 119 | oprot.writeFieldBegin('identifier', TType.STRING, 3) 120 | oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) 121 | oprot.writeFieldEnd() 122 | if self.password is not None: 123 | oprot.writeFieldBegin('password', TType.STRING, 4) 124 | oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) 125 | oprot.writeFieldEnd() 126 | if self.keepLoggedIn is not None: 127 | oprot.writeFieldBegin('keepLoggedIn', TType.BOOL, 5) 128 | oprot.writeBool(self.keepLoggedIn) 129 | oprot.writeFieldEnd() 130 | if self.accessLocation is not None: 131 | oprot.writeFieldBegin('accessLocation', TType.STRING, 6) 132 | oprot.writeString(self.accessLocation.encode('utf-8') if sys.version_info[0] == 2 else self.accessLocation) 133 | oprot.writeFieldEnd() 134 | if self.systemName is not None: 135 | oprot.writeFieldBegin('systemName', TType.STRING, 7) 136 | oprot.writeString(self.systemName.encode('utf-8') if sys.version_info[0] == 2 else self.systemName) 137 | oprot.writeFieldEnd() 138 | if self.certificate is not None: 139 | oprot.writeFieldBegin('certificate', TType.STRING, 8) 140 | oprot.writeString(self.certificate.encode('utf-8') if sys.version_info[0] == 2 else self.certificate) 141 | oprot.writeFieldEnd() 142 | if self.verifier is not None: 143 | oprot.writeFieldBegin('verifier', TType.STRING, 9) 144 | oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) 145 | oprot.writeFieldEnd() 146 | if self.secret is not None: 147 | oprot.writeFieldBegin('secret', TType.STRING, 10) 148 | oprot.writeString(self.secret.encode('utf-8') if sys.version_info[0] == 2 else self.secret) 149 | oprot.writeFieldEnd() 150 | if self.e2eeVersion is not None: 151 | oprot.writeFieldBegin('e2eeVersion', TType.I32, 11) 152 | oprot.writeI32(self.e2eeVersion) 153 | oprot.writeFieldEnd() 154 | oprot.writeFieldStop() 155 | oprot.writeStructEnd() 156 | 157 | def validate(self): 158 | return 159 | 160 | def __repr__(self): 161 | L = ['%s=%r' % (key, value) 162 | for key, value in self.__dict__.items()] 163 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 164 | 165 | def __eq__(self, other): 166 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 167 | 168 | def __ne__(self, other): 169 | return not (self == other) 170 | 171 | all_structs.append(LoginRequest) 172 | LoginRequest.thrift_spec = ( 173 | None, # 0 174 | (1, TType.I32, 'type', None, None, ), # 1 175 | (2, TType.I32, 'identityProvider', None, None, ), # 2 176 | (3, TType.STRING, 'identifier', 'UTF8', None, ), # 3 177 | (4, TType.STRING, 'password', 'UTF8', None, ), # 4 178 | (5, TType.BOOL, 'keepLoggedIn', None, None, ), # 5 179 | (6, TType.STRING, 'accessLocation', 'UTF8', None, ), # 6 180 | (7, TType.STRING, 'systemName', 'UTF8', None, ), # 7 181 | (8, TType.STRING, 'certificate', 'UTF8', None, ), # 8 182 | (9, TType.STRING, 'verifier', 'UTF8', None, ), # 9 183 | (10, TType.STRING, 'secret', 'UTF8', None, ), # 10 184 | (11, TType.I32, 'e2eeVersion', None, None, ), # 11 185 | ) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoLoginResult.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | from protoAkad.protoTtypes.protoVerificationSessionData import VerificationSessionData 4 | import sys 5 | 6 | class LoginResult(object): 7 | """ 8 | Attributes: 9 | - authToken 10 | - certificate 11 | - verifier 12 | - pinCode 13 | - type 14 | - lastPrimaryBindTime 15 | - displayMessage 16 | - sessionForSMSConfirm 17 | """ 18 | 19 | 20 | def __init__(self, authToken=None, certificate=None, verifier=None, pinCode=None, type=None, lastPrimaryBindTime=None, displayMessage=None, sessionForSMSConfirm=None,): 21 | self.authToken = authToken 22 | self.certificate = certificate 23 | self.verifier = verifier 24 | self.pinCode = pinCode 25 | self.type = type 26 | self.lastPrimaryBindTime = lastPrimaryBindTime 27 | self.displayMessage = displayMessage 28 | self.sessionForSMSConfirm = sessionForSMSConfirm 29 | 30 | def read(self, iprot): 31 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 32 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 33 | return 34 | iprot.readStructBegin() 35 | while True: 36 | (fname, ftype, fid) = iprot.readFieldBegin() 37 | if ftype == TType.STOP: 38 | break 39 | if fid == 1: 40 | if ftype == TType.STRING: 41 | self.authToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 42 | else: 43 | iprot.skip(ftype) 44 | elif fid == 2: 45 | if ftype == TType.STRING: 46 | self.certificate = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 47 | else: 48 | iprot.skip(ftype) 49 | elif fid == 3: 50 | if ftype == TType.STRING: 51 | self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 52 | else: 53 | iprot.skip(ftype) 54 | elif fid == 4: 55 | if ftype == TType.STRING: 56 | self.pinCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 57 | else: 58 | iprot.skip(ftype) 59 | elif fid == 5: 60 | if ftype == TType.I32: 61 | self.type = iprot.readI32() 62 | else: 63 | iprot.skip(ftype) 64 | elif fid == 6: 65 | if ftype == TType.I64: 66 | self.lastPrimaryBindTime = iprot.readI64() 67 | else: 68 | iprot.skip(ftype) 69 | elif fid == 7: 70 | if ftype == TType.STRING: 71 | self.displayMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 72 | else: 73 | iprot.skip(ftype) 74 | elif fid == 8: 75 | if ftype == TType.STRUCT: 76 | self.sessionForSMSConfirm = VerificationSessionData() 77 | self.sessionForSMSConfirm.read(iprot) 78 | else: 79 | iprot.skip(ftype) 80 | else: 81 | iprot.skip(ftype) 82 | iprot.readFieldEnd() 83 | iprot.readStructEnd() 84 | 85 | def write(self, oprot): 86 | if oprot._fast_encode is not None and self.thrift_spec is not None: 87 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 88 | return 89 | oprot.writeStructBegin('LoginResult') 90 | if self.authToken is not None: 91 | oprot.writeFieldBegin('authToken', TType.STRING, 1) 92 | oprot.writeString(self.authToken.encode('utf-8') if sys.version_info[0] == 2 else self.authToken) 93 | oprot.writeFieldEnd() 94 | if self.certificate is not None: 95 | oprot.writeFieldBegin('certificate', TType.STRING, 2) 96 | oprot.writeString(self.certificate.encode('utf-8') if sys.version_info[0] == 2 else self.certificate) 97 | oprot.writeFieldEnd() 98 | if self.verifier is not None: 99 | oprot.writeFieldBegin('verifier', TType.STRING, 3) 100 | oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) 101 | oprot.writeFieldEnd() 102 | if self.pinCode is not None: 103 | oprot.writeFieldBegin('pinCode', TType.STRING, 4) 104 | oprot.writeString(self.pinCode.encode('utf-8') if sys.version_info[0] == 2 else self.pinCode) 105 | oprot.writeFieldEnd() 106 | if self.type is not None: 107 | oprot.writeFieldBegin('type', TType.I32, 5) 108 | oprot.writeI32(self.type) 109 | oprot.writeFieldEnd() 110 | if self.lastPrimaryBindTime is not None: 111 | oprot.writeFieldBegin('lastPrimaryBindTime', TType.I64, 6) 112 | oprot.writeI64(self.lastPrimaryBindTime) 113 | oprot.writeFieldEnd() 114 | if self.displayMessage is not None: 115 | oprot.writeFieldBegin('displayMessage', TType.STRING, 7) 116 | oprot.writeString(self.displayMessage.encode('utf-8') if sys.version_info[0] == 2 else self.displayMessage) 117 | oprot.writeFieldEnd() 118 | if self.sessionForSMSConfirm is not None: 119 | oprot.writeFieldBegin('sessionForSMSConfirm', TType.STRUCT, 8) 120 | self.sessionForSMSConfirm.write(oprot) 121 | oprot.writeFieldEnd() 122 | oprot.writeFieldStop() 123 | oprot.writeStructEnd() 124 | 125 | def validate(self): 126 | return 127 | 128 | def __repr__(self): 129 | L = ['%s=%r' % (key, value) 130 | for key, value in self.__dict__.items()] 131 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 132 | 133 | def __eq__(self, other): 134 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 135 | 136 | def __ne__(self, other): 137 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoLoginResultType.py: -------------------------------------------------------------------------------- 1 | class LoginResultType(object): 2 | SUCCESS = 1 3 | REQUIRE_QRCODE = 2 4 | REQUIRE_DEVICE_CONFIRM = 3 5 | REQUIRE_SMS_CONFIRM = 4 6 | 7 | _VALUES_TO_NAMES = { 8 | 1: "SUCCESS", 9 | 2: "REQUIRE_QRCODE", 10 | 3: "REQUIRE_DEVICE_CONFIRM", 11 | 4: "REQUIRE_SMS_CONFIRM", 12 | } 13 | 14 | _NAMES_TO_VALUES = { 15 | "SUCCESS": 1, 16 | "REQUIRE_QRCODE": 2, 17 | "REQUIRE_DEVICE_CONFIRM": 3, 18 | "REQUIRE_SMS_CONFIRM": 4, 19 | } -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoLoginType.py: -------------------------------------------------------------------------------- 1 | class LoginType(object): 2 | ID_CREDENTIAL = 0 3 | QRCODE = 1 4 | ID_CREDENTIAL_WITH_E2EE = 2 5 | 6 | _VALUES_TO_NAMES = { 7 | 0: "ID_CREDENTIAL", 8 | 1: "QRCODE", 9 | 2: "ID_CREDENTIAL_WITH_E2EE", 10 | } 11 | 12 | _NAMES_TO_VALUES = { 13 | "ID_CREDENTIAL": 0, 14 | "QRCODE": 1, 15 | "ID_CREDENTIAL_WITH_E2EE": 2, 16 | } -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoMessage.py: -------------------------------------------------------------------------------- 1 | from thrift.Thrift import TType 2 | from thrift.transport import TTransport 3 | from protoAkad.protoTtypes.protoLocation import Location 4 | import sys 5 | 6 | class Message(object): 7 | """ 8 | Attributes: 9 | - _from 10 | - to 11 | - toType 12 | - id 13 | - createdTime 14 | - deliveredTime 15 | - text 16 | - location 17 | - hasContent 18 | - contentType 19 | - contentPreview 20 | - contentMetadata 21 | - sessionId 22 | - chunks 23 | - relatedMessageId 24 | - messageRelationType 25 | - readCount 26 | - relatedMessageServiceCode 27 | """ 28 | 29 | 30 | def __init__(self, _from=None, to=None, toType=None, id=None, createdTime=None, deliveredTime=None, text=None, location=None, hasContent=None, contentType=None, contentPreview=None, contentMetadata=None, sessionId=None, chunks=None, relatedMessageId=None, messageRelationType=None, readCount=None, relatedMessageServiceCode=None,): 31 | self._from = _from 32 | self.to = to 33 | self.toType = toType 34 | self.id = id 35 | self.createdTime = createdTime 36 | self.deliveredTime = deliveredTime 37 | self.text = text 38 | self.location = location 39 | self.hasContent = hasContent 40 | self.contentType = contentType 41 | self.contentPreview = contentPreview 42 | self.contentMetadata = contentMetadata 43 | self.sessionId = sessionId 44 | self.chunks = chunks 45 | self.relatedMessageId = relatedMessageId 46 | self.messageRelationType = messageRelationType 47 | self.readCount = readCount 48 | self.relatedMessageServiceCode = relatedMessageServiceCode 49 | 50 | def read(self, iprot): 51 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 52 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 53 | return 54 | iprot.readStructBegin() 55 | while True: 56 | (fname, ftype, fid) = iprot.readFieldBegin() 57 | if ftype == TType.STOP: 58 | break 59 | if fid == 1: 60 | if ftype == TType.STRING: 61 | self._from = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 62 | else: 63 | iprot.skip(ftype) 64 | elif fid == 2: 65 | if ftype == TType.STRING: 66 | self.to = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 67 | else: 68 | iprot.skip(ftype) 69 | elif fid == 3: 70 | if ftype == TType.I32: 71 | self.toType = iprot.readI32() 72 | else: 73 | iprot.skip(ftype) 74 | elif fid == 4: 75 | if ftype == TType.STRING: 76 | self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 77 | else: 78 | iprot.skip(ftype) 79 | elif fid == 5: 80 | if ftype == TType.I64: 81 | self.createdTime = iprot.readI64() 82 | else: 83 | iprot.skip(ftype) 84 | elif fid == 6: 85 | if ftype == TType.I64: 86 | self.deliveredTime = iprot.readI64() 87 | else: 88 | iprot.skip(ftype) 89 | elif fid == 10: 90 | if ftype == TType.STRING: 91 | self.text = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 92 | else: 93 | iprot.skip(ftype) 94 | elif fid == 11: 95 | if ftype == TType.STRUCT: 96 | self.location = Location() 97 | self.location.read(iprot) 98 | else: 99 | iprot.skip(ftype) 100 | elif fid == 14: 101 | if ftype == TType.BOOL: 102 | self.hasContent = iprot.readBool() 103 | else: 104 | iprot.skip(ftype) 105 | elif fid == 15: 106 | if ftype == TType.I32: 107 | self.contentType = iprot.readI32() 108 | else: 109 | iprot.skip(ftype) 110 | elif fid == 17: 111 | if ftype == TType.STRING: 112 | self.contentPreview = iprot.readBinary() 113 | else: 114 | iprot.skip(ftype) 115 | elif fid == 18: 116 | if ftype == TType.MAP: 117 | self.contentMetadata = {} 118 | (_ktype277, _vtype278, _size276) = iprot.readMapBegin() 119 | for _i280 in range(_size276): 120 | _key281 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 121 | _val282 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 122 | self.contentMetadata[_key281] = _val282 123 | iprot.readMapEnd() 124 | else: 125 | iprot.skip(ftype) 126 | elif fid == 19: 127 | if ftype == TType.BYTE: 128 | self.sessionId = iprot.readByte() 129 | else: 130 | iprot.skip(ftype) 131 | elif fid == 20: 132 | if ftype == TType.LIST: 133 | self.chunks = [] 134 | (_etype286, _size283) = iprot.readListBegin() 135 | for _i287 in range(_size283): 136 | _elem288 = iprot.readBinary() 137 | self.chunks.append(_elem288) 138 | iprot.readListEnd() 139 | else: 140 | iprot.skip(ftype) 141 | elif fid == 21: 142 | if ftype == TType.STRING: 143 | self.relatedMessageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 144 | else: 145 | iprot.skip(ftype) 146 | elif fid == 22: 147 | if ftype == TType.I32: 148 | self.messageRelationType = iprot.readI32() 149 | else: 150 | iprot.skip(ftype) 151 | elif fid == 23: 152 | if ftype == TType.I64: 153 | self.readCount = iprot.readI64() 154 | else: 155 | iprot.skip(ftype) 156 | elif fid == 24: 157 | if ftype == TType.I32: 158 | self.relatedMessageServiceCode = iprot.readI32() 159 | else: 160 | iprot.skip(ftype) 161 | else: 162 | iprot.skip(ftype) 163 | iprot.readFieldEnd() 164 | iprot.readStructEnd() 165 | 166 | def write(self, oprot): 167 | if oprot._fast_encode is not None and self.thrift_spec is not None: 168 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 169 | return 170 | oprot.writeStructBegin('Message') 171 | if self._from is not None: 172 | oprot.writeFieldBegin('_from', TType.STRING, 1) 173 | oprot.writeString(self._from.encode('utf-8') if sys.version_info[0] == 2 else self._from) 174 | oprot.writeFieldEnd() 175 | if self.to is not None: 176 | oprot.writeFieldBegin('to', TType.STRING, 2) 177 | oprot.writeString(self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to) 178 | oprot.writeFieldEnd() 179 | if self.toType is not None: 180 | oprot.writeFieldBegin('toType', TType.I32, 3) 181 | oprot.writeI32(self.toType) 182 | oprot.writeFieldEnd() 183 | if self.id is not None: 184 | oprot.writeFieldBegin('id', TType.STRING, 4) 185 | oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) 186 | oprot.writeFieldEnd() 187 | if self.createdTime is not None: 188 | oprot.writeFieldBegin('createdTime', TType.I64, 5) 189 | oprot.writeI64(self.createdTime) 190 | oprot.writeFieldEnd() 191 | if self.deliveredTime is not None: 192 | oprot.writeFieldBegin('deliveredTime', TType.I64, 6) 193 | oprot.writeI64(self.deliveredTime) 194 | oprot.writeFieldEnd() 195 | if self.text is not None: 196 | oprot.writeFieldBegin('text', TType.STRING, 10) 197 | oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text) 198 | oprot.writeFieldEnd() 199 | if self.location is not None: 200 | oprot.writeFieldBegin('location', TType.STRUCT, 11) 201 | self.location.write(oprot) 202 | oprot.writeFieldEnd() 203 | if self.hasContent is not None: 204 | oprot.writeFieldBegin('hasContent', TType.BOOL, 14) 205 | oprot.writeBool(self.hasContent) 206 | oprot.writeFieldEnd() 207 | if self.contentType is not None: 208 | oprot.writeFieldBegin('contentType', TType.I32, 15) 209 | oprot.writeI32(self.contentType) 210 | oprot.writeFieldEnd() 211 | if self.contentPreview is not None: 212 | oprot.writeFieldBegin('contentPreview', TType.STRING, 17) 213 | oprot.writeBinary(self.contentPreview) 214 | oprot.writeFieldEnd() 215 | if self.contentMetadata is not None: 216 | oprot.writeFieldBegin('contentMetadata', TType.MAP, 18) 217 | oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.contentMetadata)) 218 | for kiter289, viter290 in self.contentMetadata.items(): 219 | oprot.writeString(kiter289.encode('utf-8') if sys.version_info[0] == 2 else kiter289) 220 | oprot.writeString(viter290.encode('utf-8') if sys.version_info[0] == 2 else viter290) 221 | oprot.writeMapEnd() 222 | oprot.writeFieldEnd() 223 | if self.sessionId is not None: 224 | oprot.writeFieldBegin('sessionId', TType.BYTE, 19) 225 | oprot.writeByte(self.sessionId) 226 | oprot.writeFieldEnd() 227 | if self.chunks is not None: 228 | oprot.writeFieldBegin('chunks', TType.LIST, 20) 229 | oprot.writeListBegin(TType.STRING, len(self.chunks)) 230 | for iter291 in self.chunks: 231 | oprot.writeBinary(iter291) 232 | oprot.writeListEnd() 233 | oprot.writeFieldEnd() 234 | if self.relatedMessageId is not None: 235 | oprot.writeFieldBegin('relatedMessageId', TType.STRING, 21) 236 | oprot.writeString(self.relatedMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.relatedMessageId) 237 | oprot.writeFieldEnd() 238 | if self.messageRelationType is not None: 239 | oprot.writeFieldBegin('messageRelationType', TType.I32, 22) 240 | oprot.writeI32(self.messageRelationType) 241 | oprot.writeFieldEnd() 242 | if self.readCount is not None: 243 | oprot.writeFieldBegin('readCount', TType.I64, 23) 244 | oprot.writeI64(self.readCount) 245 | oprot.writeFieldEnd() 246 | if self.relatedMessageServiceCode is not None: 247 | oprot.writeFieldBegin('relatedMessageServiceCode', TType.I32, 24) 248 | oprot.writeI32(self.relatedMessageServiceCode) 249 | oprot.writeFieldEnd() 250 | oprot.writeFieldStop() 251 | oprot.writeStructEnd() 252 | 253 | def validate(self): 254 | return 255 | 256 | def __repr__(self): 257 | L = ['%s=%r' % (key, value) 258 | for key, value in self.__dict__.items()] 259 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 260 | 261 | def __eq__(self, other): 262 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 263 | 264 | def __ne__(self, other): 265 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoOpType.py: -------------------------------------------------------------------------------- 1 | class OpType(object): 2 | END_OF_OPERATION = 0 3 | UPDATE_PROFILE = 1 4 | UPDATE_SETTINGS = 36 5 | NOTIFIED_UPDATE_PROFILE = 2 6 | REGISTER_USERID = 3 7 | ADD_CONTACT = 4 8 | NOTIFIED_ADD_CONTACT = 5 9 | BLOCK_CONTACT = 6 10 | UNBLOCK_CONTACT = 7 11 | NOTIFIED_RECOMMEND_CONTACT = 8 12 | CREATE_GROUP = 9 13 | UPDATE_GROUP = 10 14 | NOTIFIED_UPDATE_GROUP = 11 15 | INVITE_INTO_GROUP = 12 16 | NOTIFIED_INVITE_INTO_GROUP = 13 17 | CANCEL_INVITATION_GROUP = 31 18 | NOTIFIED_CANCEL_INVITATION_GROUP = 32 19 | LEAVE_GROUP = 14 20 | NOTIFIED_LEAVE_GROUP = 15 21 | ACCEPT_GROUP_INVITATION = 16 22 | NOTIFIED_ACCEPT_GROUP_INVITATION = 17 23 | REJECT_GROUP_INVITATION = 34 24 | NOTIFIED_REJECT_GROUP_INVITATION = 35 25 | KICKOUT_FROM_GROUP = 18 26 | NOTIFIED_KICKOUT_FROM_GROUP = 19 27 | CREATE_ROOM = 20 28 | INVITE_INTO_ROOM = 21 29 | NOTIFIED_INVITE_INTO_ROOM = 22 30 | LEAVE_ROOM = 23 31 | NOTIFIED_LEAVE_ROOM = 24 32 | SEND_MESSAGE = 25 33 | RECEIVE_MESSAGE = 26 34 | SEND_NOTIFIED_READ_MESSAGECEIPT = 27 35 | RECEIVE_MESSAGE_RECEIPT = 28 36 | SEND_CONTENT_RECEIPT = 29 37 | RECEIVE_ANNOUNCEMENT = 30 38 | NOTIFIED_UNREGISTER_USER = 33 39 | INVITE_VIA_EMAIL = 38 40 | NOTIFIED_REGISTER_USER = 37 41 | NOTIFIED_REQUEST_RECOVERY = 39 42 | SEND_CHAT_CHECKED = 40 43 | SEND_CHAT_REMOVED = 41 44 | NOTIFIED_FORCE_SYNC = 42 45 | SEND_CONTENT = 43 46 | SEND_MESSAGE_MYHOME = 44 47 | NOTIFIED_UPDATE_CONTENT_PREVIEW = 45 48 | REMOVE_ALL_MESSAGES = 46 49 | NOTIFIED_UPDATE_PURCHASES = 47 50 | DUMMY = 48 51 | UPDATE_CONTACT = 49 52 | NOTIFIED_RECEIVED_CALL = 50 53 | CANCEL_CALL = 51 54 | NOTIFIED_REDIRECT = 52 55 | NOTIFIED_CHANNEL_SYNC = 53 56 | FAILED_SEND_MESSAGE = 54 57 | NOTIFIED_READ_MESSAGE = 55 58 | FAILED_EMAIL_CONFIRMATION = 56 59 | NOTIFIED_CHAT_CONTENT = 58 60 | NOTIFIED_PUSH_NOTICENTER_ITEM = 59 61 | NOTIFIED_JOIN_CHAT = 60 62 | NOTIFIED_LEAVE_CHAT = 61 63 | NOTIFIED_TYPING = 62 64 | FRIEND_REQUEST_ACCEPTED = 63 65 | DESTROY_MESSAGE = 64 66 | NOTIFIED_DESTROY_MESSAGE = 65 67 | UPDATE_PUBLICKEYCHAIN = 66 68 | NOTIFIED_UPDATE_PUBLICKEYCHAIN = 67 69 | NOTIFIED_BLOCK_CONTACT = 68 70 | NOTIFIED_UNBLOCK_CONTACT = 69 71 | UPDATE_GROUPPREFERENCE = 70 72 | NOTIFIED_PAYMENT_EVENT = 71 73 | REGISTER_E2EE_PUBLICKEY = 72 74 | NOTIFIED_E2EE_KEY_EXCHANGE_REQ = 73 75 | NOTIFIED_E2EE_KEY_EXCHANGE_RESP = 74 76 | NOTIFIED_E2EE_MESSAGE_RESEND_REQ = 75 77 | NOTIFIED_E2EE_MESSAGE_RESEND_RESP = 76 78 | NOTIFIED_E2EE_KEY_UPDATE = 77 79 | NOTIFIED_BUDDY_UPDATE_PROFILE = 78 80 | NOTIFIED_UPDATE_LINEAT_TABS = 79 81 | UPDATE_ROOM = 80 82 | NOTIFIED_BEACON_DETECTED = 81 83 | UPDATE_EXTENDED_PROFILE = 82 84 | ADD_FOLLOW = 83 85 | NOTIFIED_ADD_FOLLOW = 84 86 | DELETE_FOLLOW = 85 87 | NOTIFIED_DELETE_FOLLOW = 86 88 | UPDATE_TIMELINE_SETTINGS = 87 89 | NOTIFIED_FRIEND_REQUEST = 88 90 | UPDATE_RINGBACK_TONE = 89 91 | NOTIFIED_POSTBACK = 90 92 | RECEIVE_READ_WATERMARK = 91 93 | NOTIFIED_MESSAGE_DELIVERED = 92 94 | NOTIFIED_UPDATE_CHAT_BAR = 93 95 | NOTIFIED_CHATAPP_INSTALLED = 94 96 | NOTIFIED_CHATAPP_UPDATED = 95 97 | NOTIFIED_CHATAPP_NEW_MARK = 96 98 | NOTIFIED_CHATAPP_DELETED = 97 99 | NOTIFIED_CHATAPP_SYNC = 98 100 | NOTIFIED_UPDATE_MESSAGE = 99 101 | 102 | _VALUES_TO_NAMES = { 103 | 0: "END_OF_OPERATION", 104 | 1: "UPDATE_PROFILE", 105 | 36: "UPDATE_SETTINGS", 106 | 2: "NOTIFIED_UPDATE_PROFILE", 107 | 3: "REGISTER_USERID", 108 | 4: "ADD_CONTACT", 109 | 5: "NOTIFIED_ADD_CONTACT", 110 | 6: "BLOCK_CONTACT", 111 | 7: "UNBLOCK_CONTACT", 112 | 8: "NOTIFIED_RECOMMEND_CONTACT", 113 | 9: "CREATE_GROUP", 114 | 10: "UPDATE_GROUP", 115 | 11: "NOTIFIED_UPDATE_GROUP", 116 | 12: "INVITE_INTO_GROUP", 117 | 13: "NOTIFIED_INVITE_INTO_GROUP", 118 | 31: "CANCEL_INVITATION_GROUP", 119 | 32: "NOTIFIED_CANCEL_INVITATION_GROUP", 120 | 14: "LEAVE_GROUP", 121 | 15: "NOTIFIED_LEAVE_GROUP", 122 | 16: "ACCEPT_GROUP_INVITATION", 123 | 17: "NOTIFIED_ACCEPT_GROUP_INVITATION", 124 | 34: "REJECT_GROUP_INVITATION", 125 | 35: "NOTIFIED_REJECT_GROUP_INVITATION", 126 | 18: "KICKOUT_FROM_GROUP", 127 | 19: "NOTIFIED_KICKOUT_FROM_GROUP", 128 | 20: "CREATE_ROOM", 129 | 21: "INVITE_INTO_ROOM", 130 | 22: "NOTIFIED_INVITE_INTO_ROOM", 131 | 23: "LEAVE_ROOM", 132 | 24: "NOTIFIED_LEAVE_ROOM", 133 | 25: "SEND_MESSAGE", 134 | 26: "RECEIVE_MESSAGE", 135 | 27: "SEND_MESSAGE_RECEIPT", 136 | 28: "RECEIVE_MESSAGE_RECEIPT", 137 | 29: "SEND_CONTENT_RECEIPT", 138 | 30: "RECEIVE_ANNOUNCEMENT", 139 | 33: "NOTIFIED_UNREGISTER_USER", 140 | 38: "INVITE_VIA_EMAIL", 141 | 37: "NOTIFIED_REGISTER_USER", 142 | 39: "NOTIFIED_REQUEST_RECOVERY", 143 | 40: "SEND_CHAT_CHECKED", 144 | 41: "SEND_CHAT_REMOVED", 145 | 42: "NOTIFIED_FORCE_SYNC", 146 | 43: "SEND_CONTENT", 147 | 44: "SEND_MESSAGE_MYHOME", 148 | 45: "NOTIFIED_UPDATE_CONTENT_PREVIEW", 149 | 46: "REMOVE_ALL_MESSAGES", 150 | 47: "NOTIFIED_UPDATE_PURCHASES", 151 | 48: "DUMMY", 152 | 49: "UPDATE_CONTACT", 153 | 50: "NOTIFIED_RECEIVED_CALL", 154 | 51: "CANCEL_CALL", 155 | 52: "NOTIFIED_REDIRECT", 156 | 53: "NOTIFIED_CHANNEL_SYNC", 157 | 54: "FAILED_SEND_MESSAGE", 158 | 55: "NOTIFIED_READ_MESSAGE", 159 | 56: "FAILED_EMAIL_CONFIRMATION", 160 | 58: "NOTIFIED_CHAT_CONTENT", 161 | 59: "NOTIFIED_PUSH_NOTICENTER_ITEM", 162 | 60: "NOTIFIED_JOIN_CHAT", 163 | 61: "NOTIFIED_LEAVE_CHAT", 164 | 62: "NOTIFIED_TYPING", 165 | 63: "FRIEND_REQUEST_ACCEPTED", 166 | 64: "DESTROY_MESSAGE", 167 | 65: "NOTIFIED_DESTROY_MESSAGE", 168 | 66: "UPDATE_PUBLICKEYCHAIN", 169 | 67: "NOTIFIED_UPDATE_PUBLICKEYCHAIN", 170 | 68: "NOTIFIED_BLOCK_CONTACT", 171 | 69: "NOTIFIED_UNBLOCK_CONTACT", 172 | 70: "UPDATE_GROUPPREFERENCE", 173 | 71: "NOTIFIED_PAYMENT_EVENT", 174 | 72: "REGISTER_E2EE_PUBLICKEY", 175 | 73: "NOTIFIED_E2EE_KEY_EXCHANGE_REQ", 176 | 74: "NOTIFIED_E2EE_KEY_EXCHANGE_RESP", 177 | 75: "NOTIFIED_E2EE_MESSAGE_RESEND_REQ", 178 | 76: "NOTIFIED_E2EE_MESSAGE_RESEND_RESP", 179 | 77: "NOTIFIED_E2EE_KEY_UPDATE", 180 | 78: "NOTIFIED_BUDDY_UPDATE_PROFILE", 181 | 79: "NOTIFIED_UPDATE_LINEAT_TABS", 182 | 80: "UPDATE_ROOM", 183 | 81: "NOTIFIED_BEACON_DETECTED", 184 | 82: "UPDATE_EXTENDED_PROFILE", 185 | 83: "ADD_FOLLOW", 186 | 84: "NOTIFIED_ADD_FOLLOW", 187 | 85: "DELETE_FOLLOW", 188 | 86: "NOTIFIED_DELETE_FOLLOW", 189 | 87: "UPDATE_TIMELINE_SETTINGS", 190 | 88: "NOTIFIED_FRIEND_REQUEST", 191 | 89: "UPDATE_RINGBACK_TONE", 192 | 90: "NOTIFIED_POSTBACK", 193 | 91: "RECEIVE_READ_WATERMARK", 194 | 92: "NOTIFIED_MESSAGE_DELIVERED", 195 | 93: "NOTIFIED_UPDATE_CHAT_BAR", 196 | 94: "NOTIFIED_CHATAPP_INSTALLED", 197 | 95: "NOTIFIED_CHATAPP_UPDATED", 198 | 96: "NOTIFIED_CHATAPP_NEW_MARK", 199 | 97: "NOTIFIED_CHATAPP_DELETED", 200 | 98: "NOTIFIED_CHATAPP_SYNC", 201 | 99: "NOTIFIED_UPDATE_MESSAGE", 202 | } 203 | 204 | _NAMES_TO_VALUES = { 205 | "END_OF_OPERATION": 0, 206 | "UPDATE_PROFILE": 1, 207 | "UPDATE_SETTINGS": 36, 208 | "NOTIFIED_UPDATE_PROFILE": 2, 209 | "REGISTER_USERID": 3, 210 | "ADD_CONTACT": 4, 211 | "NOTIFIED_ADD_CONTACT": 5, 212 | "BLOCK_CONTACT": 6, 213 | "UNBLOCK_CONTACT": 7, 214 | "NOTIFIED_RECOMMEND_CONTACT": 8, 215 | "CREATE_GROUP": 9, 216 | "UPDATE_GROUP": 10, 217 | "NOTIFIED_UPDATE_GROUP": 11, 218 | "INVITE_INTO_GROUP": 12, 219 | "NOTIFIED_INVITE_INTO_GROUP": 13, 220 | "CANCEL_INVITATION_GROUP": 31, 221 | "NOTIFIED_CANCEL_INVITATION_GROUP": 32, 222 | "LEAVE_GROUP": 14, 223 | "NOTIFIED_LEAVE_GROUP": 15, 224 | "ACCEPT_GROUP_INVITATION": 16, 225 | "NOTIFIED_ACCEPT_GROUP_INVITATION": 17, 226 | "REJECT_GROUP_INVITATION": 34, 227 | "NOTIFIED_REJECT_GROUP_INVITATION": 35, 228 | "KICKOUT_FROM_GROUP": 18, 229 | "NOTIFIED_KICKOUT_FROM_GROUP": 19, 230 | "CREATE_ROOM": 20, 231 | "INVITE_INTO_ROOM": 21, 232 | "NOTIFIED_INVITE_INTO_ROOM": 22, 233 | "LEAVE_ROOM": 23, 234 | "NOTIFIED_LEAVE_ROOM": 24, 235 | "SEND_MESSAGE": 25, 236 | "RECEIVE_MESSAGE": 26, 237 | "SEND_MESSAGE_RECEIPT": 27, 238 | "RECEIVE_MESSAGE_RECEIPT": 28, 239 | "SEND_CONTENT_RECEIPT": 29, 240 | "RECEIVE_ANNOUNCEMENT": 30, 241 | "NOTIFIED_UNREGISTER_USER": 33, 242 | "INVITE_VIA_EMAIL": 38, 243 | "NOTIFIED_REGISTER_USER": 37, 244 | "NOTIFIED_REQUEST_RECOVERY": 39, 245 | "SEND_CHAT_CHECKED": 40, 246 | "SEND_CHAT_REMOVED": 41, 247 | "NOTIFIED_FORCE_SYNC": 42, 248 | "SEND_CONTENT": 43, 249 | "SEND_MESSAGE_MYHOME": 44, 250 | "NOTIFIED_UPDATE_CONTENT_PREVIEW": 45, 251 | "REMOVE_ALL_MESSAGES": 46, 252 | "NOTIFIED_UPDATE_PURCHASES": 47, 253 | "DUMMY": 48, 254 | "UPDATE_CONTACT": 49, 255 | "NOTIFIED_RECEIVED_CALL": 50, 256 | "CANCEL_CALL": 51, 257 | "NOTIFIED_REDIRECT": 52, 258 | "NOTIFIED_CHANNEL_SYNC": 53, 259 | "FAILED_SEND_MESSAGE": 54, 260 | "NOTIFIED_READ_MESSAGE": 55, 261 | "FAILED_EMAIL_CONFIRMATION": 56, 262 | "NOTIFIED_CHAT_CONTENT": 58, 263 | "NOTIFIED_PUSH_NOTICENTER_ITEM": 59, 264 | "NOTIFIED_JOIN_CHAT": 60, 265 | "NOTIFIED_LEAVE_CHAT": 61, 266 | "NOTIFIED_TYPING": 62, 267 | "FRIEND_REQUEST_ACCEPTED": 63, 268 | "DESTROY_MESSAGE": 64, 269 | "NOTIFIED_DESTROY_MESSAGE": 65, 270 | "UPDATE_PUBLICKEYCHAIN": 66, 271 | "NOTIFIED_UPDATE_PUBLICKEYCHAIN": 67, 272 | "NOTIFIED_BLOCK_CONTACT": 68, 273 | "NOTIFIED_UNBLOCK_CONTACT": 69, 274 | "UPDATE_GROUPPREFERENCE": 70, 275 | "NOTIFIED_PAYMENT_EVENT": 71, 276 | "REGISTER_E2EE_PUBLICKEY": 72, 277 | "NOTIFIED_E2EE_KEY_EXCHANGE_REQ": 73, 278 | "NOTIFIED_E2EE_KEY_EXCHANGE_RESP": 74, 279 | "NOTIFIED_E2EE_MESSAGE_RESEND_REQ": 75, 280 | "NOTIFIED_E2EE_MESSAGE_RESEND_RESP": 76, 281 | "NOTIFIED_E2EE_KEY_UPDATE": 77, 282 | "NOTIFIED_BUDDY_UPDATE_PROFILE": 78, 283 | "NOTIFIED_UPDATE_LINEAT_TABS": 79, 284 | "UPDATE_ROOM": 80, 285 | "NOTIFIED_BEACON_DETECTED": 81, 286 | "UPDATE_EXTENDED_PROFILE": 82, 287 | "ADD_FOLLOW": 83, 288 | "NOTIFIED_ADD_FOLLOW": 84, 289 | "DELETE_FOLLOW": 85, 290 | "NOTIFIED_DELETE_FOLLOW": 86, 291 | "UPDATE_TIMELINE_SETTINGS": 87, 292 | "NOTIFIED_FRIEND_REQUEST": 88, 293 | "UPDATE_RINGBACK_TONE": 89, 294 | "NOTIFIED_POSTBACK": 90, 295 | "RECEIVE_READ_WATERMARK": 91, 296 | "NOTIFIED_MESSAGE_DELIVERED": 92, 297 | "NOTIFIED_UPDATE_CHAT_BAR": 93, 298 | "NOTIFIED_CHATAPP_INSTALLED": 94, 299 | "NOTIFIED_CHATAPP_UPDATED": 95, 300 | "NOTIFIED_CHATAPP_NEW_MARK": 96, 301 | "NOTIFIED_CHATAPP_DELETED": 97, 302 | "NOTIFIED_CHATAPP_SYNC": 98, 303 | "NOTIFIED_UPDATE_MESSAGE": 99, 304 | } 305 | 306 | 307 | class PayloadType(object): 308 | PAYLOAD_BUY = 101 309 | PAYLOAD_CS = 111 310 | PAYLOAD_BONUS = 121 311 | PAYLOAD_EVENT = 131 312 | 313 | _VALUES_TO_NAMES = { 314 | 101: "PAYLOAD_BUY", 315 | 111: "PAYLOAD_CS", 316 | 121: "PAYLOAD_BONUS", 317 | 131: "PAYLOAD_EVENT", 318 | } 319 | 320 | _NAMES_TO_VALUES = { 321 | "PAYLOAD_BUY": 101, 322 | "PAYLOAD_CS": 111, 323 | "PAYLOAD_BONUS": 121, 324 | "PAYLOAD_EVENT": 131, 325 | } -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoOperation.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | from protoAkad.protoTtypes.protoMessage import Message 5 | 6 | class Operation(object): 7 | """ 8 | Attributes: 9 | - revision 10 | - createdTime 11 | - type 12 | - reqSeq 13 | - checksum 14 | - status 15 | - param1 16 | - param2 17 | - param3 18 | - message 19 | """ 20 | 21 | 22 | def __init__(self, revision=None, createdTime=None, type=None, reqSeq=None, checksum=None, status=None, param1=None, param2=None, param3=None, message=None,): 23 | self.revision = revision 24 | self.createdTime = createdTime 25 | self.type = type 26 | self.reqSeq = reqSeq 27 | self.checksum = checksum 28 | self.status = status 29 | self.param1 = param1 30 | self.param2 = param2 31 | self.param3 = param3 32 | self.message = message 33 | 34 | def read(self, iprot): 35 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 36 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 37 | return 38 | iprot.readStructBegin() 39 | while True: 40 | (fname, ftype, fid) = iprot.readFieldBegin() 41 | if ftype == TType.STOP: 42 | break 43 | if fid == 1: 44 | if ftype == TType.I64: 45 | self.revision = iprot.readI64() 46 | else: 47 | iprot.skip(ftype) 48 | elif fid == 2: 49 | if ftype == TType.I64: 50 | self.createdTime = iprot.readI64() 51 | else: 52 | iprot.skip(ftype) 53 | elif fid == 3: 54 | if ftype == TType.I32: 55 | self.type = iprot.readI32() 56 | else: 57 | iprot.skip(ftype) 58 | elif fid == 4: 59 | if ftype == TType.I32: 60 | self.reqSeq = iprot.readI32() 61 | else: 62 | iprot.skip(ftype) 63 | elif fid == 5: 64 | if ftype == TType.STRING: 65 | self.checksum = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 66 | else: 67 | iprot.skip(ftype) 68 | elif fid == 7: 69 | if ftype == TType.I32: 70 | self.status = iprot.readI32() 71 | else: 72 | iprot.skip(ftype) 73 | elif fid == 10: 74 | if ftype == TType.STRING: 75 | self.param1 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 76 | else: 77 | iprot.skip(ftype) 78 | elif fid == 11: 79 | if ftype == TType.STRING: 80 | self.param2 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 81 | else: 82 | iprot.skip(ftype) 83 | elif fid == 12: 84 | if ftype == TType.STRING: 85 | self.param3 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 86 | else: 87 | iprot.skip(ftype) 88 | elif fid == 20: 89 | if ftype == TType.STRUCT: 90 | self.message = Message() 91 | self.message.read(iprot) 92 | else: 93 | iprot.skip(ftype) 94 | else: 95 | iprot.skip(ftype) 96 | iprot.readFieldEnd() 97 | iprot.readStructEnd() 98 | 99 | def write(self, oprot): 100 | if oprot._fast_encode is not None and self.thrift_spec is not None: 101 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 102 | return 103 | oprot.writeStructBegin('Operation') 104 | if self.revision is not None: 105 | oprot.writeFieldBegin('revision', TType.I64, 1) 106 | oprot.writeI64(self.revision) 107 | oprot.writeFieldEnd() 108 | if self.createdTime is not None: 109 | oprot.writeFieldBegin('createdTime', TType.I64, 2) 110 | oprot.writeI64(self.createdTime) 111 | oprot.writeFieldEnd() 112 | if self.type is not None: 113 | oprot.writeFieldBegin('type', TType.I32, 3) 114 | oprot.writeI32(self.type) 115 | oprot.writeFieldEnd() 116 | if self.reqSeq is not None: 117 | oprot.writeFieldBegin('reqSeq', TType.I32, 4) 118 | oprot.writeI32(self.reqSeq) 119 | oprot.writeFieldEnd() 120 | if self.checksum is not None: 121 | oprot.writeFieldBegin('checksum', TType.STRING, 5) 122 | oprot.writeString(self.checksum.encode('utf-8') if sys.version_info[0] == 2 else self.checksum) 123 | oprot.writeFieldEnd() 124 | if self.status is not None: 125 | oprot.writeFieldBegin('status', TType.I32, 7) 126 | oprot.writeI32(self.status) 127 | oprot.writeFieldEnd() 128 | if self.param1 is not None: 129 | oprot.writeFieldBegin('param1', TType.STRING, 10) 130 | oprot.writeString(self.param1.encode('utf-8') if sys.version_info[0] == 2 else self.param1) 131 | oprot.writeFieldEnd() 132 | if self.param2 is not None: 133 | oprot.writeFieldBegin('param2', TType.STRING, 11) 134 | oprot.writeString(self.param2.encode('utf-8') if sys.version_info[0] == 2 else self.param2) 135 | oprot.writeFieldEnd() 136 | if self.param3 is not None: 137 | oprot.writeFieldBegin('param3', TType.STRING, 12) 138 | oprot.writeString(self.param3.encode('utf-8') if sys.version_info[0] == 2 else self.param3) 139 | oprot.writeFieldEnd() 140 | if self.message is not None: 141 | oprot.writeFieldBegin('message', TType.STRUCT, 20) 142 | self.message.write(oprot) 143 | oprot.writeFieldEnd() 144 | oprot.writeFieldStop() 145 | oprot.writeStructEnd() 146 | 147 | def validate(self): 148 | return 149 | 150 | def __repr__(self): 151 | L = ['%s=%r' % (key, value) 152 | for key, value in self.__dict__.items()] 153 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 154 | 155 | def __eq__(self, other): 156 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 157 | 158 | def __ne__(self, other): 159 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoRegisterWithPhoneNumberResult.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | 5 | class RegisterWithPhoneNumberResult(object): 6 | """ 7 | Attributes: 8 | - authToken 9 | - recommendEmailRegistration 10 | - certificate 11 | """ 12 | 13 | 14 | def __init__(self, authToken=None, recommendEmailRegistration=None, certificate=None,): 15 | self.authToken = authToken 16 | self.recommendEmailRegistration = recommendEmailRegistration 17 | self.certificate = certificate 18 | 19 | def read(self, iprot): 20 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 21 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 22 | return 23 | iprot.readStructBegin() 24 | while True: 25 | (fname, ftype, fid) = iprot.readFieldBegin() 26 | if ftype == TType.STOP: 27 | break 28 | if fid == 1: 29 | if ftype == TType.STRING: 30 | self.authToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 31 | else: 32 | iprot.skip(ftype) 33 | elif fid == 2: 34 | if ftype == TType.BOOL: 35 | self.recommendEmailRegistration = iprot.readBool() 36 | else: 37 | iprot.skip(ftype) 38 | elif fid == 3: 39 | if ftype == TType.STRING: 40 | self.certificate = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 41 | else: 42 | iprot.skip(ftype) 43 | else: 44 | iprot.skip(ftype) 45 | iprot.readFieldEnd() 46 | iprot.readStructEnd() 47 | 48 | def write(self, oprot): 49 | if oprot._fast_encode is not None and self.thrift_spec is not None: 50 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 51 | return 52 | oprot.writeStructBegin('RegisterWithPhoneNumberResult') 53 | if self.authToken is not None: 54 | oprot.writeFieldBegin('authToken', TType.STRING, 1) 55 | oprot.writeString(self.authToken.encode('utf-8') if sys.version_info[0] == 2 else self.authToken) 56 | oprot.writeFieldEnd() 57 | if self.recommendEmailRegistration is not None: 58 | oprot.writeFieldBegin('recommendEmailRegistration', TType.BOOL, 2) 59 | oprot.writeBool(self.recommendEmailRegistration) 60 | oprot.writeFieldEnd() 61 | if self.certificate is not None: 62 | oprot.writeFieldBegin('certificate', TType.STRING, 3) 63 | oprot.writeString(self.certificate.encode('utf-8') if sys.version_info[0] == 2 else self.certificate) 64 | oprot.writeFieldEnd() 65 | oprot.writeFieldStop() 66 | oprot.writeStructEnd() 67 | 68 | def validate(self): 69 | return 70 | 71 | def __repr__(self): 72 | L = ['%s=%r' % (key, value) 73 | for key, value in self.__dict__.items()] 74 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 75 | 76 | def __eq__(self, other): 77 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 78 | 79 | def __ne__(self, other): 80 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoRoom.py: -------------------------------------------------------------------------------- 1 | from thrift.Thrift import TType 2 | from thrift.transport import TTransport 3 | from protoAkad.protoTtypes.protoContact import Contact 4 | import sys 5 | 6 | class Room(object): 7 | """ 8 | Attributes: 9 | - mid 10 | - createdTime 11 | - contacts 12 | - notificationDisabled 13 | - memberMids 14 | """ 15 | 16 | 17 | def __init__(self, mid=None, createdTime=None, contacts=None, notificationDisabled=None, memberMids=None,): 18 | self.mid = mid 19 | self.createdTime = createdTime 20 | self.contacts = contacts 21 | self.notificationDisabled = notificationDisabled 22 | self.memberMids = memberMids 23 | 24 | def read(self, iprot): 25 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 26 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 27 | return 28 | iprot.readStructBegin() 29 | while True: 30 | (fname, ftype, fid) = iprot.readFieldBegin() 31 | if ftype == TType.STOP: 32 | break 33 | if fid == 1: 34 | if ftype == TType.STRING: 35 | self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 36 | else: 37 | iprot.skip(ftype) 38 | elif fid == 2: 39 | if ftype == TType.I64: 40 | self.createdTime = iprot.readI64() 41 | else: 42 | iprot.skip(ftype) 43 | elif fid == 10: 44 | if ftype == TType.LIST: 45 | self.contacts = [] 46 | (_etype385, _size382) = iprot.readListBegin() 47 | for _i386 in range(_size382): 48 | _elem387 = Contact() 49 | _elem387.read(iprot) 50 | self.contacts.append(_elem387) 51 | iprot.readListEnd() 52 | else: 53 | iprot.skip(ftype) 54 | elif fid == 31: 55 | if ftype == TType.BOOL: 56 | self.notificationDisabled = iprot.readBool() 57 | else: 58 | iprot.skip(ftype) 59 | elif fid == 40: 60 | if ftype == TType.LIST: 61 | self.memberMids = [] 62 | (_etype391, _size388) = iprot.readListBegin() 63 | for _i392 in range(_size388): 64 | _elem393 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 65 | self.memberMids.append(_elem393) 66 | iprot.readListEnd() 67 | else: 68 | iprot.skip(ftype) 69 | else: 70 | iprot.skip(ftype) 71 | iprot.readFieldEnd() 72 | iprot.readStructEnd() 73 | 74 | def write(self, oprot): 75 | if oprot._fast_encode is not None and self.thrift_spec is not None: 76 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 77 | return 78 | oprot.writeStructBegin('Room') 79 | if self.mid is not None: 80 | oprot.writeFieldBegin('mid', TType.STRING, 1) 81 | oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) 82 | oprot.writeFieldEnd() 83 | if self.createdTime is not None: 84 | oprot.writeFieldBegin('createdTime', TType.I64, 2) 85 | oprot.writeI64(self.createdTime) 86 | oprot.writeFieldEnd() 87 | if self.contacts is not None: 88 | oprot.writeFieldBegin('contacts', TType.LIST, 10) 89 | oprot.writeListBegin(TType.STRUCT, len(self.contacts)) 90 | for iter394 in self.contacts: 91 | iter394.write(oprot) 92 | oprot.writeListEnd() 93 | oprot.writeFieldEnd() 94 | if self.notificationDisabled is not None: 95 | oprot.writeFieldBegin('notificationDisabled', TType.BOOL, 31) 96 | oprot.writeBool(self.notificationDisabled) 97 | oprot.writeFieldEnd() 98 | if self.memberMids is not None: 99 | oprot.writeFieldBegin('memberMids', TType.LIST, 40) 100 | oprot.writeListBegin(TType.STRING, len(self.memberMids)) 101 | for iter395 in self.memberMids: 102 | oprot.writeString(iter395.encode('utf-8') if sys.version_info[0] == 2 else iter395) 103 | oprot.writeListEnd() 104 | oprot.writeFieldEnd() 105 | oprot.writeFieldStop() 106 | oprot.writeStructEnd() 107 | 108 | def validate(self): 109 | return 110 | 111 | def __repr__(self): 112 | L = ['%s=%r' % (key, value) 113 | for key, value in self.__dict__.items()] 114 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 115 | 116 | def __eq__(self, other): 117 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 118 | 119 | def __ne__(self, other): 120 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoSecurityCenterResult.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | 5 | class SecurityCenterResult(object): 6 | """ 7 | Attributes: 8 | - uri 9 | - token 10 | - cookiePath 11 | - skip 12 | """ 13 | 14 | 15 | def __init__(self, uri=None, token=None, cookiePath=None, skip=None,): 16 | self.uri = uri 17 | self.token = token 18 | self.cookiePath = cookiePath 19 | self.skip = skip 20 | 21 | def read(self, iprot): 22 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 23 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 24 | return 25 | iprot.readStructBegin() 26 | while True: 27 | (fname, ftype, fid) = iprot.readFieldBegin() 28 | if ftype == TType.STOP: 29 | break 30 | if fid == 1: 31 | if ftype == TType.STRING: 32 | self.uri = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 33 | else: 34 | iprot.skip(ftype) 35 | elif fid == 2: 36 | if ftype == TType.STRING: 37 | self.token = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 38 | else: 39 | iprot.skip(ftype) 40 | elif fid == 3: 41 | if ftype == TType.STRING: 42 | self.cookiePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 43 | else: 44 | iprot.skip(ftype) 45 | elif fid == 4: 46 | if ftype == TType.BOOL: 47 | self.skip = iprot.readBool() 48 | else: 49 | iprot.skip(ftype) 50 | else: 51 | iprot.skip(ftype) 52 | iprot.readFieldEnd() 53 | iprot.readStructEnd() 54 | 55 | def write(self, oprot): 56 | if oprot._fast_encode is not None and self.thrift_spec is not None: 57 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 58 | return 59 | oprot.writeStructBegin('SecurityCenterResult') 60 | if self.uri is not None: 61 | oprot.writeFieldBegin('uri', TType.STRING, 1) 62 | oprot.writeString(self.uri.encode('utf-8') if sys.version_info[0] == 2 else self.uri) 63 | oprot.writeFieldEnd() 64 | if self.token is not None: 65 | oprot.writeFieldBegin('token', TType.STRING, 2) 66 | oprot.writeString(self.token.encode('utf-8') if sys.version_info[0] == 2 else self.token) 67 | oprot.writeFieldEnd() 68 | if self.cookiePath is not None: 69 | oprot.writeFieldBegin('cookiePath', TType.STRING, 3) 70 | oprot.writeString(self.cookiePath.encode('utf-8') if sys.version_info[0] == 2 else self.cookiePath) 71 | oprot.writeFieldEnd() 72 | if self.skip is not None: 73 | oprot.writeFieldBegin('skip', TType.BOOL, 4) 74 | oprot.writeBool(self.skip) 75 | oprot.writeFieldEnd() 76 | oprot.writeFieldStop() 77 | oprot.writeStructEnd() 78 | 79 | def validate(self): 80 | return 81 | 82 | def __repr__(self): 83 | L = ['%s=%r' % (key, value) 84 | for key, value in self.__dict__.items()] 85 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 86 | 87 | def __eq__(self, other): 88 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 89 | 90 | def __ne__(self, other): 91 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoShouldSyncException.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | from protoAkad.protoService.protoTalkService import TException 5 | from protoAkad.protoTtypes.protoSyncScope import SyncScope 6 | from thrift.TRecursive import fix_spec 7 | 8 | class ShouldSyncException(TException): 9 | """ 10 | Attributes: 11 | - syncOpRevision 12 | - syncScope 13 | - syncReason 14 | - message 15 | """ 16 | 17 | 18 | def __init__(self, syncOpRevision=None, syncScope=None, syncReason=None, message=None,): 19 | self.syncOpRevision = syncOpRevision 20 | self.syncScope = syncScope 21 | self.syncReason = syncReason 22 | self.message = message 23 | 24 | def read(self, iprot): 25 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 26 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 27 | return 28 | iprot.readStructBegin() 29 | while True: 30 | (fname, ftype, fid) = iprot.readFieldBegin() 31 | if ftype == TType.STOP: 32 | break 33 | if fid == 1: 34 | if ftype == TType.I64: 35 | self.syncOpRevision = iprot.readI64() 36 | else: 37 | iprot.skip(ftype) 38 | elif fid == 2: 39 | if ftype == TType.STRUCT: 40 | self.syncScope = SyncScope() 41 | self.syncScope.read(iprot) 42 | else: 43 | iprot.skip(ftype) 44 | elif fid == 3: 45 | if ftype == TType.I32: 46 | self.syncReason = iprot.readI32() 47 | else: 48 | iprot.skip(ftype) 49 | elif fid == 4: 50 | if ftype == TType.STRING: 51 | self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 52 | else: 53 | iprot.skip(ftype) 54 | else: 55 | iprot.skip(ftype) 56 | iprot.readFieldEnd() 57 | iprot.readStructEnd() 58 | 59 | def write(self, oprot): 60 | if oprot._fast_encode is not None and self.thrift_spec is not None: 61 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 62 | return 63 | oprot.writeStructBegin('ShouldSyncException') 64 | if self.syncOpRevision is not None: 65 | oprot.writeFieldBegin('syncOpRevision', TType.I64, 1) 66 | oprot.writeI64(self.syncOpRevision) 67 | oprot.writeFieldEnd() 68 | if self.syncScope is not None: 69 | oprot.writeFieldBegin('syncScope', TType.STRUCT, 2) 70 | self.syncScope.write(oprot) 71 | oprot.writeFieldEnd() 72 | if self.syncReason is not None: 73 | oprot.writeFieldBegin('syncReason', TType.I32, 3) 74 | oprot.writeI32(self.syncReason) 75 | oprot.writeFieldEnd() 76 | if self.message is not None: 77 | oprot.writeFieldBegin('message', TType.STRING, 4) 78 | oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) 79 | oprot.writeFieldEnd() 80 | oprot.writeFieldStop() 81 | oprot.writeStructEnd() 82 | 83 | def validate(self): 84 | return 85 | 86 | def __str__(self): 87 | return repr(self) 88 | 89 | def __repr__(self): 90 | L = ['%s=%r' % (key, value) 91 | for key, value in self.__dict__.items()] 92 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 93 | 94 | def __eq__(self, other): 95 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 96 | 97 | def __ne__(self, other): 98 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoSnsIdUserStatus.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | 4 | class SnsIdUserStatus(object): 5 | """ 6 | Attributes: 7 | - userExisting 8 | - phoneNumberRegistered 9 | - sameDevice 10 | """ 11 | 12 | 13 | def __init__(self, userExisting=None, phoneNumberRegistered=None, sameDevice=None,): 14 | self.userExisting = userExisting 15 | self.phoneNumberRegistered = phoneNumberRegistered 16 | self.sameDevice = sameDevice 17 | 18 | def read(self, iprot): 19 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 20 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 21 | return 22 | iprot.readStructBegin() 23 | while True: 24 | (fname, ftype, fid) = iprot.readFieldBegin() 25 | if ftype == TType.STOP: 26 | break 27 | if fid == 1: 28 | if ftype == TType.BOOL: 29 | self.userExisting = iprot.readBool() 30 | else: 31 | iprot.skip(ftype) 32 | elif fid == 2: 33 | if ftype == TType.BOOL: 34 | self.phoneNumberRegistered = iprot.readBool() 35 | else: 36 | iprot.skip(ftype) 37 | elif fid == 3: 38 | if ftype == TType.BOOL: 39 | self.sameDevice = iprot.readBool() 40 | else: 41 | iprot.skip(ftype) 42 | else: 43 | iprot.skip(ftype) 44 | iprot.readFieldEnd() 45 | iprot.readStructEnd() 46 | 47 | def write(self, oprot): 48 | if oprot._fast_encode is not None and self.thrift_spec is not None: 49 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 50 | return 51 | oprot.writeStructBegin('SnsIdUserStatus') 52 | if self.userExisting is not None: 53 | oprot.writeFieldBegin('userExisting', TType.BOOL, 1) 54 | oprot.writeBool(self.userExisting) 55 | oprot.writeFieldEnd() 56 | if self.phoneNumberRegistered is not None: 57 | oprot.writeFieldBegin('phoneNumberRegistered', TType.BOOL, 2) 58 | oprot.writeBool(self.phoneNumberRegistered) 59 | oprot.writeFieldEnd() 60 | if self.sameDevice is not None: 61 | oprot.writeFieldBegin('sameDevice', TType.BOOL, 3) 62 | oprot.writeBool(self.sameDevice) 63 | oprot.writeFieldEnd() 64 | oprot.writeFieldStop() 65 | oprot.writeStructEnd() 66 | 67 | def validate(self): 68 | return 69 | 70 | def __repr__(self): 71 | L = ['%s=%r' % (key, value) 72 | for key, value in self.__dict__.items()] 73 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 74 | 75 | def __eq__(self, other): 76 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 77 | 78 | def __ne__(self, other): 79 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoSyncParamContact.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | 4 | class SyncParamContact(object): 5 | """ 6 | Attributes: 7 | - syncParamMid 8 | - contactStatus 9 | """ 10 | 11 | 12 | def __init__(self, syncParamMid=None, contactStatus=None,): 13 | self.syncParamMid = syncParamMid 14 | self.contactStatus = contactStatus 15 | 16 | def read(self, iprot): 17 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 18 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 19 | return 20 | iprot.readStructBegin() 21 | while True: 22 | (fname, ftype, fid) = iprot.readFieldBegin() 23 | if ftype == TType.STOP: 24 | break 25 | if fid == 1: 26 | if ftype == TType.STRUCT: 27 | self.syncParamMid = SyncParamMid() 28 | self.syncParamMid.read(iprot) 29 | else: 30 | iprot.skip(ftype) 31 | elif fid == 2: 32 | if ftype == TType.I32: 33 | self.contactStatus = iprot.readI32() 34 | else: 35 | iprot.skip(ftype) 36 | else: 37 | iprot.skip(ftype) 38 | iprot.readFieldEnd() 39 | iprot.readStructEnd() 40 | 41 | def write(self, oprot): 42 | if oprot._fast_encode is not None and self.thrift_spec is not None: 43 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 44 | return 45 | oprot.writeStructBegin('SyncParamContact') 46 | if self.syncParamMid is not None: 47 | oprot.writeFieldBegin('syncParamMid', TType.STRUCT, 1) 48 | self.syncParamMid.write(oprot) 49 | oprot.writeFieldEnd() 50 | if self.contactStatus is not None: 51 | oprot.writeFieldBegin('contactStatus', TType.I32, 2) 52 | oprot.writeI32(self.contactStatus) 53 | oprot.writeFieldEnd() 54 | oprot.writeFieldStop() 55 | oprot.writeStructEnd() 56 | 57 | def validate(self): 58 | return 59 | 60 | def __repr__(self): 61 | L = ['%s=%r' % (key, value) 62 | for key, value in self.__dict__.items()] 63 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 64 | 65 | def __eq__(self, other): 66 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 67 | 68 | def __ne__(self, other): 69 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoSyncParamMid.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | 5 | class SyncParamMid(object): 6 | """ 7 | Attributes: 8 | - mid 9 | - diff 10 | - revision 11 | """ 12 | 13 | 14 | def __init__(self, mid=None, diff=None, revision=None,): 15 | self.mid = mid 16 | self.diff = diff 17 | self.revision = revision 18 | 19 | def read(self, iprot): 20 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 21 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 22 | return 23 | iprot.readStructBegin() 24 | while True: 25 | (fname, ftype, fid) = iprot.readFieldBegin() 26 | if ftype == TType.STOP: 27 | break 28 | if fid == 1: 29 | if ftype == TType.STRING: 30 | self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 31 | else: 32 | iprot.skip(ftype) 33 | elif fid == 2: 34 | if ftype == TType.I32: 35 | self.diff = iprot.readI32() 36 | else: 37 | iprot.skip(ftype) 38 | elif fid == 3: 39 | if ftype == TType.I64: 40 | self.revision = iprot.readI64() 41 | else: 42 | iprot.skip(ftype) 43 | else: 44 | iprot.skip(ftype) 45 | iprot.readFieldEnd() 46 | iprot.readStructEnd() 47 | 48 | def write(self, oprot): 49 | if oprot._fast_encode is not None and self.thrift_spec is not None: 50 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 51 | return 52 | oprot.writeStructBegin('SyncParamMid') 53 | if self.mid is not None: 54 | oprot.writeFieldBegin('mid', TType.STRING, 1) 55 | oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) 56 | oprot.writeFieldEnd() 57 | if self.diff is not None: 58 | oprot.writeFieldBegin('diff', TType.I32, 2) 59 | oprot.writeI32(self.diff) 60 | oprot.writeFieldEnd() 61 | if self.revision is not None: 62 | oprot.writeFieldBegin('revision', TType.I64, 3) 63 | oprot.writeI64(self.revision) 64 | oprot.writeFieldEnd() 65 | oprot.writeFieldStop() 66 | oprot.writeStructEnd() 67 | 68 | def validate(self): 69 | return 70 | 71 | def __repr__(self): 72 | L = ['%s=%r' % (key, value) 73 | for key, value in self.__dict__.items()] 74 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 75 | 76 | def __eq__(self, other): 77 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 78 | 79 | def __ne__(self, other): 80 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoSyncRelatations.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | from protoAkad.protoTtypes.protoSyncParamMid import SyncParamMid 4 | from protoAkad.protoTtypes.protoSyncParamContact import SyncParamContact 5 | 6 | class SyncRelations(object): 7 | """ 8 | Attributes: 9 | - syncAll 10 | - syncParamContact 11 | - syncParamMid 12 | """ 13 | 14 | 15 | def __init__(self, syncAll=None, syncParamContact=None, syncParamMid=None,): 16 | self.syncAll = syncAll 17 | self.syncParamContact = syncParamContact 18 | self.syncParamMid = syncParamMid 19 | 20 | def read(self, iprot): 21 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 22 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 23 | return 24 | iprot.readStructBegin() 25 | while True: 26 | (fname, ftype, fid) = iprot.readFieldBegin() 27 | if ftype == TType.STOP: 28 | break 29 | if fid == 1: 30 | if ftype == TType.BOOL: 31 | self.syncAll = iprot.readBool() 32 | else: 33 | iprot.skip(ftype) 34 | elif fid == 2: 35 | if ftype == TType.LIST: 36 | self.syncParamContact = [] 37 | (_etype489, _size486) = iprot.readListBegin() 38 | for _i490 in range(_size486): 39 | _elem491 = SyncParamContact() 40 | _elem491.read(iprot) 41 | self.syncParamContact.append(_elem491) 42 | iprot.readListEnd() 43 | else: 44 | iprot.skip(ftype) 45 | elif fid == 3: 46 | if ftype == TType.LIST: 47 | self.syncParamMid = [] 48 | (_etype495, _size492) = iprot.readListBegin() 49 | for _i496 in range(_size492): 50 | _elem497 = SyncParamMid() 51 | _elem497.read(iprot) 52 | self.syncParamMid.append(_elem497) 53 | iprot.readListEnd() 54 | else: 55 | iprot.skip(ftype) 56 | else: 57 | iprot.skip(ftype) 58 | iprot.readFieldEnd() 59 | iprot.readStructEnd() 60 | 61 | def write(self, oprot): 62 | if oprot._fast_encode is not None and self.thrift_spec is not None: 63 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 64 | return 65 | oprot.writeStructBegin('SyncRelations') 66 | if self.syncAll is not None: 67 | oprot.writeFieldBegin('syncAll', TType.BOOL, 1) 68 | oprot.writeBool(self.syncAll) 69 | oprot.writeFieldEnd() 70 | if self.syncParamContact is not None: 71 | oprot.writeFieldBegin('syncParamContact', TType.LIST, 2) 72 | oprot.writeListBegin(TType.STRUCT, len(self.syncParamContact)) 73 | for iter498 in self.syncParamContact: 74 | iter498.write(oprot) 75 | oprot.writeListEnd() 76 | oprot.writeFieldEnd() 77 | if self.syncParamMid is not None: 78 | oprot.writeFieldBegin('syncParamMid', TType.LIST, 3) 79 | oprot.writeListBegin(TType.STRUCT, len(self.syncParamMid)) 80 | for iter499 in self.syncParamMid: 81 | iter499.write(oprot) 82 | oprot.writeListEnd() 83 | oprot.writeFieldEnd() 84 | oprot.writeFieldStop() 85 | oprot.writeStructEnd() 86 | 87 | def validate(self): 88 | return 89 | 90 | def __repr__(self): 91 | L = ['%s=%r' % (key, value) 92 | for key, value in self.__dict__.items()] 93 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 94 | 95 | def __eq__(self, other): 96 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 97 | 98 | def __ne__(self, other): 99 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoSyncScope.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | from protoAkad.protoTtypes.protoSyncRelatations import SyncRelations 4 | 5 | class SyncScope(object): 6 | """ 7 | Attributes: 8 | - syncProfile 9 | - syncSettings 10 | - syncSticker 11 | - syncThemeShop 12 | - contact 13 | - group 14 | - room 15 | - chat 16 | """ 17 | 18 | 19 | def __init__(self, syncProfile=None, syncSettings=None, syncSticker=None, syncThemeShop=None, contact=None, group=None, room=None, chat=None,): 20 | self.syncProfile = syncProfile 21 | self.syncSettings = syncSettings 22 | self.syncSticker = syncSticker 23 | self.syncThemeShop = syncThemeShop 24 | self.contact = contact 25 | self.group = group 26 | self.room = room 27 | self.chat = chat 28 | 29 | def read(self, iprot): 30 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 31 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 32 | return 33 | iprot.readStructBegin() 34 | while True: 35 | (fname, ftype, fid) = iprot.readFieldBegin() 36 | if ftype == TType.STOP: 37 | break 38 | if fid == 1: 39 | if ftype == TType.BOOL: 40 | self.syncProfile = iprot.readBool() 41 | else: 42 | iprot.skip(ftype) 43 | elif fid == 2: 44 | if ftype == TType.BOOL: 45 | self.syncSettings = iprot.readBool() 46 | else: 47 | iprot.skip(ftype) 48 | elif fid == 3: 49 | if ftype == TType.BOOL: 50 | self.syncSticker = iprot.readBool() 51 | else: 52 | iprot.skip(ftype) 53 | elif fid == 4: 54 | if ftype == TType.BOOL: 55 | self.syncThemeShop = iprot.readBool() 56 | else: 57 | iprot.skip(ftype) 58 | elif fid == 10: 59 | if ftype == TType.STRUCT: 60 | self.contact = SyncRelations() 61 | self.contact.read(iprot) 62 | else: 63 | iprot.skip(ftype) 64 | elif fid == 11: 65 | if ftype == TType.STRUCT: 66 | self.group = SyncRelations() 67 | self.group.read(iprot) 68 | else: 69 | iprot.skip(ftype) 70 | elif fid == 12: 71 | if ftype == TType.STRUCT: 72 | self.room = SyncRelations() 73 | self.room.read(iprot) 74 | else: 75 | iprot.skip(ftype) 76 | elif fid == 13: 77 | if ftype == TType.STRUCT: 78 | self.chat = SyncRelations() 79 | self.chat.read(iprot) 80 | else: 81 | iprot.skip(ftype) 82 | else: 83 | iprot.skip(ftype) 84 | iprot.readFieldEnd() 85 | iprot.readStructEnd() 86 | 87 | def write(self, oprot): 88 | if oprot._fast_encode is not None and self.thrift_spec is not None: 89 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 90 | return 91 | oprot.writeStructBegin('SyncScope') 92 | if self.syncProfile is not None: 93 | oprot.writeFieldBegin('syncProfile', TType.BOOL, 1) 94 | oprot.writeBool(self.syncProfile) 95 | oprot.writeFieldEnd() 96 | if self.syncSettings is not None: 97 | oprot.writeFieldBegin('syncSettings', TType.BOOL, 2) 98 | oprot.writeBool(self.syncSettings) 99 | oprot.writeFieldEnd() 100 | if self.syncSticker is not None: 101 | oprot.writeFieldBegin('syncSticker', TType.BOOL, 3) 102 | oprot.writeBool(self.syncSticker) 103 | oprot.writeFieldEnd() 104 | if self.syncThemeShop is not None: 105 | oprot.writeFieldBegin('syncThemeShop', TType.BOOL, 4) 106 | oprot.writeBool(self.syncThemeShop) 107 | oprot.writeFieldEnd() 108 | if self.contact is not None: 109 | oprot.writeFieldBegin('contact', TType.STRUCT, 10) 110 | self.contact.write(oprot) 111 | oprot.writeFieldEnd() 112 | if self.group is not None: 113 | oprot.writeFieldBegin('group', TType.STRUCT, 11) 114 | self.group.write(oprot) 115 | oprot.writeFieldEnd() 116 | if self.room is not None: 117 | oprot.writeFieldBegin('room', TType.STRUCT, 12) 118 | self.room.write(oprot) 119 | oprot.writeFieldEnd() 120 | if self.chat is not None: 121 | oprot.writeFieldBegin('chat', TType.STRUCT, 13) 122 | self.chat.write(oprot) 123 | oprot.writeFieldEnd() 124 | oprot.writeFieldStop() 125 | oprot.writeStructEnd() -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoTalkException.py: -------------------------------------------------------------------------------- 1 | from thrift.Thrift import TException 2 | from thrift.transport import TTransport 3 | from thrift.Thrift import TType 4 | import sys 5 | 6 | class TalkException(TException): 7 | """ 8 | Attributes: 9 | - code 10 | - reason 11 | - parameterMap 12 | """ 13 | 14 | 15 | def __init__(self, code=None, reason=None, parameterMap=None,): 16 | self.code = code 17 | self.reason = reason 18 | self.parameterMap = parameterMap 19 | 20 | def read(self, iprot): 21 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 22 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 23 | return 24 | iprot.readStructBegin() 25 | while True: 26 | (fname, ftype, fid) = iprot.readFieldBegin() 27 | if ftype == TType.STOP: 28 | break 29 | if fid == 1: 30 | if ftype == TType.I32: 31 | self.code = iprot.readI32() 32 | else: 33 | iprot.skip(ftype) 34 | elif fid == 2: 35 | if ftype == TType.STRING: 36 | self.reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 37 | else: 38 | iprot.skip(ftype) 39 | elif fid == 3: 40 | if ftype == TType.MAP: 41 | self.parameterMap = {} 42 | (_ktype912, _vtype913, _size911) = iprot.readMapBegin() 43 | for _i915 in range(_size911): 44 | _key916 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 45 | _val917 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 46 | self.parameterMap[_key916] = _val917 47 | iprot.readMapEnd() 48 | else: 49 | iprot.skip(ftype) 50 | else: 51 | iprot.skip(ftype) 52 | iprot.readFieldEnd() 53 | iprot.readStructEnd() 54 | 55 | def write(self, oprot): 56 | if oprot._fast_encode is not None and self.thrift_spec is not None: 57 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 58 | return 59 | oprot.writeStructBegin('TalkException') 60 | if self.code is not None: 61 | oprot.writeFieldBegin('code', TType.I32, 1) 62 | oprot.writeI32(self.code) 63 | oprot.writeFieldEnd() 64 | if self.reason is not None: 65 | oprot.writeFieldBegin('reason', TType.STRING, 2) 66 | oprot.writeString(self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason) 67 | oprot.writeFieldEnd() 68 | if self.parameterMap is not None: 69 | oprot.writeFieldBegin('parameterMap', TType.MAP, 3) 70 | oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap)) 71 | for kiter918, viter919 in self.parameterMap.items(): 72 | oprot.writeString(kiter918.encode('utf-8') if sys.version_info[0] == 2 else kiter918) 73 | oprot.writeString(viter919.encode('utf-8') if sys.version_info[0] == 2 else viter919) 74 | oprot.writeMapEnd() 75 | oprot.writeFieldEnd() 76 | oprot.writeFieldStop() 77 | oprot.writeStructEnd() 78 | 79 | def validate(self): 80 | return 81 | 82 | def __str__(self): 83 | return repr(self) 84 | 85 | def __repr__(self): 86 | L = ['%s=%r' % (key, value) 87 | for key, value in self.__dict__.items()] 88 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 89 | 90 | def __eq__(self, other): 91 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 92 | 93 | def __ne__(self, other): 94 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoTicket.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | 4 | class Ticket(object): 5 | """ 6 | Attributes: 7 | - id 8 | - expirationTime 9 | - maxUseCount 10 | """ 11 | 12 | 13 | def __init__(self, id=None, expirationTime=None, maxUseCount=None,): 14 | self.id = id 15 | self.expirationTime = expirationTime 16 | self.maxUseCount = maxUseCount 17 | 18 | def read(self, iprot): 19 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 20 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 21 | return 22 | iprot.readStructBegin() 23 | while True: 24 | (fname, ftype, fid) = iprot.readFieldBegin() 25 | if ftype == TType.STOP: 26 | break 27 | if fid == 1: 28 | if ftype == TType.STRING: 29 | self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 30 | else: 31 | iprot.skip(ftype) 32 | elif fid == 10: 33 | if ftype == TType.I64: 34 | self.expirationTime = iprot.readI64() 35 | else: 36 | iprot.skip(ftype) 37 | elif fid == 21: 38 | if ftype == TType.I32: 39 | self.maxUseCount = iprot.readI32() 40 | else: 41 | iprot.skip(ftype) 42 | else: 43 | iprot.skip(ftype) 44 | iprot.readFieldEnd() 45 | iprot.readStructEnd() 46 | 47 | def write(self, oprot): 48 | if oprot._fast_encode is not None and self.thrift_spec is not None: 49 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 50 | return 51 | oprot.writeStructBegin('Ticket') 52 | if self.id is not None: 53 | oprot.writeFieldBegin('id', TType.STRING, 1) 54 | oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) 55 | oprot.writeFieldEnd() 56 | if self.expirationTime is not None: 57 | oprot.writeFieldBegin('expirationTime', TType.I64, 10) 58 | oprot.writeI64(self.expirationTime) 59 | oprot.writeFieldEnd() 60 | if self.maxUseCount is not None: 61 | oprot.writeFieldBegin('maxUseCount', TType.I32, 21) 62 | oprot.writeI32(self.maxUseCount) 63 | oprot.writeFieldEnd() 64 | oprot.writeFieldStop() 65 | oprot.writeStructEnd() 66 | 67 | def validate(self): 68 | return 69 | 70 | def __repr__(self): 71 | L = ['%s=%r' % (key, value) 72 | for key, value in self.__dict__.items()] 73 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 74 | 75 | def __eq__(self, other): 76 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 77 | 78 | def __ne__(self, other): 79 | return not (self == other) -------------------------------------------------------------------------------- /protoAkad/protoTtypes/protoVerificationSessionData.py: -------------------------------------------------------------------------------- 1 | from thrift.transport import TTransport 2 | from thrift.Thrift import TType 3 | import sys 4 | 5 | class VerificationSessionData(object): 6 | """ 7 | Attributes: 8 | - sessionId 9 | - method 10 | - callback 11 | - normalizedPhone 12 | - countryCode 13 | - nationalSignificantNumber 14 | - availableVerificationMethods 15 | """ 16 | 17 | 18 | def __init__(self, sessionId=None, method=None, callback=None, normalizedPhone=None, countryCode=None, nationalSignificantNumber=None, availableVerificationMethods=None,): 19 | self.sessionId = sessionId 20 | self.method = method 21 | self.callback = callback 22 | self.normalizedPhone = normalizedPhone 23 | self.countryCode = countryCode 24 | self.nationalSignificantNumber = nationalSignificantNumber 25 | self.availableVerificationMethods = availableVerificationMethods 26 | 27 | def read(self, iprot): 28 | if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: 29 | iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) 30 | return 31 | iprot.readStructBegin() 32 | while True: 33 | (fname, ftype, fid) = iprot.readFieldBegin() 34 | if ftype == TType.STOP: 35 | break 36 | if fid == 1: 37 | if ftype == TType.STRING: 38 | self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 39 | else: 40 | iprot.skip(ftype) 41 | elif fid == 2: 42 | if ftype == TType.I32: 43 | self.method = iprot.readI32() 44 | else: 45 | iprot.skip(ftype) 46 | elif fid == 3: 47 | if ftype == TType.STRING: 48 | self.callback = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 49 | else: 50 | iprot.skip(ftype) 51 | elif fid == 4: 52 | if ftype == TType.STRING: 53 | self.normalizedPhone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 54 | else: 55 | iprot.skip(ftype) 56 | elif fid == 5: 57 | if ftype == TType.STRING: 58 | self.countryCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 59 | else: 60 | iprot.skip(ftype) 61 | elif fid == 6: 62 | if ftype == TType.STRING: 63 | self.nationalSignificantNumber = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() 64 | else: 65 | iprot.skip(ftype) 66 | elif fid == 7: 67 | if ftype == TType.LIST: 68 | self.availableVerificationMethods = [] 69 | (_etype272, _size269) = iprot.readListBegin() 70 | for _i273 in range(_size269): 71 | _elem274 = iprot.readI32() 72 | self.availableVerificationMethods.append(_elem274) 73 | iprot.readListEnd() 74 | else: 75 | iprot.skip(ftype) 76 | else: 77 | iprot.skip(ftype) 78 | iprot.readFieldEnd() 79 | iprot.readStructEnd() 80 | 81 | def write(self, oprot): 82 | if oprot._fast_encode is not None and self.thrift_spec is not None: 83 | oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) 84 | return 85 | oprot.writeStructBegin('VerificationSessionData') 86 | if self.sessionId is not None: 87 | oprot.writeFieldBegin('sessionId', TType.STRING, 1) 88 | oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) 89 | oprot.writeFieldEnd() 90 | if self.method is not None: 91 | oprot.writeFieldBegin('method', TType.I32, 2) 92 | oprot.writeI32(self.method) 93 | oprot.writeFieldEnd() 94 | if self.callback is not None: 95 | oprot.writeFieldBegin('callback', TType.STRING, 3) 96 | oprot.writeString(self.callback.encode('utf-8') if sys.version_info[0] == 2 else self.callback) 97 | oprot.writeFieldEnd() 98 | if self.normalizedPhone is not None: 99 | oprot.writeFieldBegin('normalizedPhone', TType.STRING, 4) 100 | oprot.writeString(self.normalizedPhone.encode('utf-8') if sys.version_info[0] == 2 else self.normalizedPhone) 101 | oprot.writeFieldEnd() 102 | if self.countryCode is not None: 103 | oprot.writeFieldBegin('countryCode', TType.STRING, 5) 104 | oprot.writeString(self.countryCode.encode('utf-8') if sys.version_info[0] == 2 else self.countryCode) 105 | oprot.writeFieldEnd() 106 | if self.nationalSignificantNumber is not None: 107 | oprot.writeFieldBegin('nationalSignificantNumber', TType.STRING, 6) 108 | oprot.writeString(self.nationalSignificantNumber.encode('utf-8') if sys.version_info[0] == 2 else self.nationalSignificantNumber) 109 | oprot.writeFieldEnd() 110 | if self.availableVerificationMethods is not None: 111 | oprot.writeFieldBegin('availableVerificationMethods', TType.LIST, 7) 112 | oprot.writeListBegin(TType.I32, len(self.availableVerificationMethods)) 113 | for iter275 in self.availableVerificationMethods: 114 | oprot.writeI32(iter275) 115 | oprot.writeListEnd() 116 | oprot.writeFieldEnd() 117 | oprot.writeFieldStop() 118 | oprot.writeStructEnd() 119 | 120 | def validate(self): 121 | return 122 | 123 | def __repr__(self): 124 | L = ['%s=%r' % (key, value) 125 | for key, value in self.__dict__.items()] 126 | return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) 127 | 128 | def __eq__(self, other): 129 | return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ 130 | 131 | def __ne__(self, other): 132 | return not (self == other) --------------------------------------------------------------------------------