code
stringlengths
501
5.19M
package
stringlengths
2
81
path
stringlengths
9
304
filename
stringlengths
4
145
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='dtp.type.proto', package='dwjk.dtp', syntax='proto3', serialized_pb=_b('\n\x0e\x64tp.type.proto\x12\x08\x64wjk.dtp*\xff\x12\n\x08\x44tpApiId\x12\x14\n\x10\x41PP_ID_UNDEFINED\x10\x00\x12\x19\n\x12\x41PP_ID_PLACE_ORDER\x10\xd1\xbc\xe2\x04\x12\x1a\n\x13\x41PP_ID_CANCEL_ORDER\x10\xd2\xbc\xe2\x04\x12\x19\n\x12\x41PP_ID_PLACE_BATCH\x10\xd3\xbc\xe2\x04\x12\x1a\n\x13\x41PP_ID_CANCEL_BATCH\x10\xd4\xbc\xe2\x04\x12\x18\n\x11\x41PP_ID_PLACE_VOTE\x10\xd5\xbc\xe2\x04\x12\x1b\n\x14\x41PP_ID_PLACE_DECLARE\x10\xd6\xbc\xe2\x04\x12\x1d\n\x16\x41PP_ID_CANCEL_RESPONSE\x10\x92\xc1\x9f\x05\x12\"\n\x1b\x41PP_ID_PLACE_BATCH_RESPONSE\x10\x93\xc1\x9f\x05\x12#\n\x1c\x41PP_ID_CANCEL_BATCH_RESPONSE\x10\x94\xc1\x9f\x05\x12\x1b\n\x14\x41PP_ID_REPORT_PLACED\x10\xe9\xe1\xc4\t\x12\x19\n\x12\x41PP_ID_REPORT_FILL\x10\xea\xe1\xc4\t\x12!\n\x1a\x41PP_ID_REPORT_CANCELLATION\x10\xeb\xe1\xc4\t\x12\x19\n\x12\x41PP_ID_REPORT_VOTE\x10\xec\xe1\xc4\t\x12\x1c\n\x15\x41PP_ID_REPORT_DECLARE\x10\xed\xe1\xc4\t\x12\x1b\n\x14\x41PP_ID_REQUEST_LOGIN\x10\xe9\xb4\xe2\x04\x12\x1c\n\x15\x41PP_ID_REQUEST_LOGOUT\x10\xea\xb4\xe2\x04\x12\x1c\n\x15\x41PP_ID_RESPONSE_LOGIN\x10\xa9\xb9\x9f\x05\x12\x1d\n\x16\x41PP_ID_RESPONSE_LOGOUT\x10\xaa\xb9\x9f\x05\x12\x1b\n\x14\x41PP_ID_REQUEST_ORDER\x10\xb9\xc4\xe2\x04\x12\x1a\n\x13\x41PP_ID_REQUEST_FILL\x10\xba\xc4\xe2\x04\x12\x1d\n\x16\x41PP_ID_REQUEST_CAPITAL\x10\xbb\xc4\xe2\x04\x12\x1e\n\x17\x41PP_ID_REQUEST_POSITION\x10\xbc\xc4\xe2\x04\x12 \n\x19\x41PP_ID_REQUEST_CAPITAL_HK\x10\xbd\xc4\xe2\x04\x12\x1b\n\x14\x41PP_ID_REQUEST_QUOTA\x10\xbe\xc4\xe2\x04\x12\x1f\n\x18\x41PP_ID_REQUEST_VOTE_INFO\x10\xbf\xc4\xe2\x04\x12\"\n\x1b\x41PP_ID_REQUEST_DECLARE_INFO\x10\xc0\xc4\xe2\x04\x12\"\n\x1b\x41PP_ID_REQUEST_BANK_SERVICE\x10\xc1\xc4\xe2\x04\x12\x1c\n\x15\x41PP_ID_RESPONSE_ORDER\x10\xf9\xc8\x9f\x05\x12\x1b\n\x14\x41PP_ID_RESPONSE_FILL\x10\xfa\xc8\x9f\x05\x12\x1e\n\x17\x41PP_ID_RESPONSE_CAPITAL\x10\xfb\xc8\x9f\x05\x12\x1f\n\x18\x41PP_ID_RESPONSE_POSITION\x10\xfc\xc8\x9f\x05\x12!\n\x1a\x41PP_ID_RESPONSE_CAPITAL_HK\x10\xfd\xc8\x9f\x05\x12\x1c\n\x15\x41PP_ID_RESPONSE_QUOTA\x10\xfe\xc8\x9f\x05\x12 \n\x19\x41PP_ID_RESPONSE_VOTE_INFO\x10\xff\xc8\x9f\x05\x12#\n\x1c\x41PP_ID_RESPONSE_DECLARE_INFO\x10\x80\xc9\x9f\x05\x12#\n\x1c\x41PP_ID_RESPONSE_BANK_SERVICE\x10\x81\xc9\x9f\x05\x12\"\n\x1b\x41PP_ID_REQUEST_BOND_STORAGE\x10\xa1\xcc\xe2\x04\x12\"\n\x1b\x41PP_ID_REQUEST_PENDING_REPO\x10\xa2\xcc\xe2\x04\x12%\n\x1e\x41PP_ID_REQUEST_SETTLEMENT_INFO\x10\xa3\xcc\xe2\x04\x12#\n\x1c\x41PP_ID_RESPONSE_BOND_STORAGE\x10\xe1\xd0\x9f\x05\x12#\n\x1c\x41PP_ID_RESPONSE_PENDING_REPO\x10\xe2\xd0\x9f\x05\x12&\n\x1f\x41PP_ID_RESPONSE_SETTLEMENT_INFO\x10\xe3\xd0\x9f\x05\x12\x1c\n\x15\x41PP_ID_REQUEST_RATION\x10\x89\xd4\xe2\x04\x12\x1d\n\x16\x41PP_ID_RESPONSE_RATION\x10\xc9\xd8\x9f\x05\x12%\n\x1e\x41PP_ID_ALGORITHMIC_SEND_REPORT\x10\xa9\xa0\xc5\t\x12 \n\x19\x41PP_ID_MARGIN_PLACE_ORDER\x10\xc1\xeb\xe2\x04\x12!\n\x1a\x41PP_ID_MARGIN_CANCEL_ORDER\x10\xc2\xeb\xe2\x04\x12+\n$APP_ID_MARGIN_REPAYMENT_AMOUNT_ORDER\x10\xc3\xeb\xe2\x04\x12-\n&APP_ID_MARGIN_REPAYMENT_SECURITY_ORDER\x10\xc4\xeb\xe2\x04\x12$\n\x1d\x41PP_ID_MARGIN_CANCEL_RESPONSE\x10\x82\xf0\x9f\x05\x12\"\n\x1b\x41PP_ID_REPORT_MARGIN_PLACED\x10\xc1\x98\xc5\t\x12 \n\x19\x41PP_ID_REPORT_MARGIN_FILL\x10\xc2\x98\xc5\t\x12(\n!APP_ID_REPORT_MARGIN_CANCELLATION\x10\xc3\x98\xc5\t\x12,\n%APP_ID_REPORT_MARGIN_REPAY_AMT_PLACED\x10\xc4\x98\xc5\t\x12,\n%APP_ID_REPORT_MARGIN_REPAY_SEC_PLACED\x10\xc5\x98\xc5\t\x12\"\n\x1b\x41PP_ID_REQUEST_MARGIN_ORDER\x10\xc1\xc5\xa7\x0e\x12!\n\x1a\x41PP_ID_REQUEST_MARGIN_FILL\x10\xc2\xc5\xa7\x0e\x12$\n\x1d\x41PP_ID_REQUEST_MARGIN_CAPITAL\x10\xc3\xc5\xa7\x0e\x12%\n\x1e\x41PP_ID_REQUEST_MARGIN_POSITION\x10\xc4\xc5\xa7\x0e\x12\'\n APP_ID_REQUEST_MARGIN_SECURITIES\x10\xc5\xc5\xa7\x0e\x12$\n\x1d\x41PP_ID_REQUEST_MARGIN_COMPACT\x10\xc6\xc5\xa7\x0e\x12*\n#APP_ID_REQUEST_MARGIN_COMPACT_WATER\x10\xc7\xc5\xa7\x0e\x12#\n\x1c\x41PP_ID_RESPONSE_MARGIN_ORDER\x10\x81\xca\xe4\x0e\x12\"\n\x1b\x41PP_ID_RESPONSE_MARGIN_FILL\x10\x82\xca\xe4\x0e\x12%\n\x1e\x41PP_ID_RESPONSE_MARGIN_CAPITAL\x10\x83\xca\xe4\x0e\x12&\n\x1f\x41PP_ID_RESPONSE_MARGIN_POSITION\x10\x84\xca\xe4\x0e\x12(\n!APP_ID_RESPONSE_MARGIN_SECURITIES\x10\x85\xca\xe4\x0e\x12%\n\x1e\x41PP_ID_RESPONSE_MARGIN_COMPACT\x10\x86\xca\xe4\x0e\x12+\n$APP_ID_RESPONSE_MARGIN_COMPACT_WATER\x10\x87\xca\xe4\x0e*\xd1\x01\n\x12ResponseStatusCode\x12\"\n\x1eRESPONSE_STATUS_CODE_UNDEFINED\x10\x00\x12\x15\n\x10RESPONSE_CODE_OK\x10\xc8\x01\x12\x1e\n\x19RESPONSE_CODE_BAD_REQUEST\x10\x90\x03\x12\x1f\n\x1aRESPONSE_CODE_UNAUTHORIZED\x10\x91\x03\x12\x1c\n\x17RESPONSE_CODE_FORBIDDEN\x10\x93\x03\x12!\n\x1cRESPONSE_CODE_INTERNAL_ERROR\x10\xf4\x03*j\n\x08\x45xchange\x12\x16\n\x12\x45XCHANGE_UNDEFINED\x10\x00\x12\x11\n\rEXCHANGE_SH_A\x10\x01\x12\x11\n\rEXCHANGE_SZ_A\x10\x02\x12\x0f\n\x0b\x45XCHANGE_HK\x10\x03\x12\x0f\n\x0b\x45XCHANGE_SK\x10\x04*\xf3\x01\n\tOrderType\x12\x18\n\x14ORDER_TYPE_UNDEFINED\x10\x00\x12\x14\n\x10ORDER_TYPE_LIMIT\x10\x01\x12\x15\n\x11ORDER_TYPE_MARKET\x10\x02\x12\x1a\n\x16ORDER_TYPE_BEST_5_ONLY\x10\x03\x12\x1b\n\x17ORDER_TYPE_BEST_5_LIMIT\x10\x04\x12\x17\n\x13ORDER_TYPE_YOU_BEST\x10\x05\x12\x16\n\x12ORDER_TYPE_WE_BEST\x10\x06\x12\x1a\n\x16ORDER_TYPE_MARKET_ONCE\x10\x07\x12\x19\n\x15ORDER_TYPE_MARKET_ALL\x10\x08*\x81\x01\n\nOrderLimit\x12\x14\n\x10ORDER_LIMIT_NONE\x10\x00\x12\x13\n\x0fORDER_LIMIT_BID\x10\x01\x12\x17\n\x13ORDER_LIMIT_ENHANCE\x10\x02\x12\x18\n\x14ORDER_LIMIT_FRAGMENT\x10\x03\x12\x15\n\x11ORDER_LIMIT_FIXED\x10\x04*\xfc\x06\n\tOrderSide\x12\x18\n\x14ORDER_SIDE_UNDEFINED\x10\x00\x12\x12\n\x0eORDER_SIDE_BUY\x10\x01\x12\x13\n\x0fORDER_SIDE_SELL\x10\x02\x12\x12\n\x0eORDER_SIDE_IPO\x10\x03\x12\x17\n\x13ORDER_SIDE_CREATION\x10\x0b\x12\x18\n\x14ORDER_SIDE_REDEMPTON\x10\x0c\x12\x1b\n\x17ORDER_SIDE_REVERSE_REPO\x10\x15\x12\x13\n\x0fORDER_SIDE_REPO\x10\x16\x12\x1d\n\x19ORDER_SIDE_PLEDGE_BOND_IN\x10\x17\x12\x1e\n\x1aORDER_SIDE_PLEDGE_BOND_OUT\x10\x18\x12\x19\n\x15ORDER_SIDE_INTENT_BUY\x10\x1f\x12\x1a\n\x16ORDER_SIDE_INTENT_SELL\x10 \x12\x18\n\x14ORDER_SIDE_LIMIT_BUY\x10!\x12\x19\n\x15ORDER_SIDE_LIMIT_SELL\x10\"\x12\x1e\n\x1aORDER_SIDE_AFTER_LIMIT_BUY\x10#\x12\x1f\n\x1bORDER_SIDE_AFTER_LIMIT_SELL\x10$\x12\x17\n\x13ORDER_SIDE_FILL_BUY\x10%\x12\x18\n\x14ORDER_SIDE_FILL_SELL\x10&\x12\x1a\n\x16ORDER_SIDE_FINANCE_BUY\x10)\x12\x1a\n\x16ORDER_SIDE_COUPON_SELL\x10*\x12\x1f\n\x1bORDER_SIDE_SELL_BOUND_REPAY\x10+\x12(\n$ORDER_SIDE_SELL_BOUND_REPAY_INTEREST\x10,\x12\x1e\n\x1aORDER_SIDE_BUY_BOUND_REPAY\x10-\x12\x1c\n\x18ORDER_SIDE_FINANCE_COVER\x10.\x12\x1b\n\x17ORDER_SIDE_COUPON_COVER\x10/\x12\"\n\x1eORDER_SIDE_FINANCE_FORCE_COVER\x10\x30\x12 \n\x1cORDER_SIDE_COUPON_FORE_COVER\x10\x31\x12\x1a\n\x16ORDER_SIDE_PAY_CAPITAL\x10\x32\x12\x1b\n\x17ORDER_SIDE_PAY_SECURITY\x10\x33\x12\x1a\n\x16ORDER_SIDE_SECURITY_IN\x10\x34\x12\x1b\n\x17ORDER_SIDE_SECURITY_OUT\x10\x35*\xb1\x02\n\x0bOrderStatus\x12\x1a\n\x16ORDER_STATUS_UNDEFINED\x10\x00\x12\x18\n\x14ORDER_STATUS_PLACING\x10\x01\x12\x17\n\x13ORDER_STATUS_PLACED\x10\x02\x12\x1f\n\x1bORDER_STATUS_PARTIAL_FILLED\x10\x03\x12\x17\n\x13ORDER_STATUS_FILLED\x10\x04\x12\x1b\n\x17ORDER_STATUS_CANCELLING\x10\x05\x12\x1a\n\x16ORDER_STATUS_CANCELLED\x10\x06\x12#\n\x1fORDER_STATUS_PARTIAL_CANCELLING\x10\x07\x12\"\n\x1eORDER_STATUS_PARTIAL_CANCELLED\x10\x08\x12\x17\n\x13ORDER_STATUS_FAILED\x10\t*r\n\nFillStatus\x12\x19\n\x15\x46ILL_STATUS_UNDEFINED\x10\x00\x12\x16\n\x12\x46ILL_STATUS_FILLED\x10\x01\x12\x19\n\x15\x46ILL_STATUS_CANCELLED\x10\x02\x12\x16\n\x12\x46ILL_STATUS_FAILED\x10\x03*~\n\x12QueryOrderCriteria\x12\x14\n\x10QUERY_ONLY_ORDER\x10\x00\x12 \n\x1cQUERY_ORDER_CAN_BE_CANCELLED\x10\x01\x12\x1b\n\x17QUERY_ONLY_CANCEL_ORDER\x10\x02\x12\x13\n\x0fQUERY_ORDER_ALL\x10\x03*\xbb\x01\n\x0c\x42usinessType\x12\x1b\n\x17\x42USINESS_TYPE_UNDEFINED\x10\x00\x12\x1a\n\x16\x42USINESS_TYPE_DIVIDEND\x10\x01\x12\x1d\n\x19\x42USINESS_TYPE_ACQUISITION\x10\x02\x12\x1b\n\x17\x42USINESS_TYPE_PLACEMENT\x10\x03\x12\x1a\n\x16\x42USINESS_TYPE_OFFERING\x10\x04\x12\x1a\n\x16\x42USINESS_TYPE_DISCOUNT\x10\x05*d\n\x0b\x44\x65\x63lareType\x12\x1a\n\x16\x44\x45\x43LARE_TYPE_UNDEFINED\x10\x00\x12\x1c\n\x18\x44\x45\x43LARE_TYPE_DECLARATION\x10\x01\x12\x1b\n\x17\x44\x45\x43LARE_TYPE_REVOCATION\x10\x02*c\n\x0bQuotaStatus\x12\x1a\n\x16QUOTA_STATUS_UNDEFINED\x10\x00\x12\x1a\n\x16QUOTA_STATUS_AVAILABLE\x10\x01\x12\x1c\n\x18QUOTA_STATUS_UNAVAILABLE\x10\x02*\\\n\nMotionType\x12\x19\n\x15MOTION_TYPE_UNDEFINED\x10\x00\x12\x17\n\x13MOTION_TYPE_GENERAL\x10\x01\x12\x1a\n\x16MOTION_TYPE_ACCUMULATE\x10\x02*q\n\x0f\x42\x61nkServiceCode\x12\x1f\n\x1b\x42\x41NK_SERVICE_CODE_UNDEFINED\x10\x00\x12\x1e\n\x1a\x42\x41NK_SERVICE_CODE_BANK_OUT\x10\x01\x12\x1d\n\x19\x42\x41NK_SERVICE_CODE_BANK_IN\x10\x02*^\n\x0b\x43ompactType\x12\x1a\n\x16\x43OMPACT_TYPE_UNDEFINED\x10\x00\x12\x18\n\x14\x43OMPACT_TYPE_FINANCE\x10\x01\x12\x19\n\x15\x43OMPACT_TYPE_SECURITY\x10\x02*\xed\x01\n\rCompactStatus\x12\x1c\n\x18\x43OMPACT_STATUS_UNDEFINED\x10\x00\x12\x1c\n\x18\x43OMPACT_STATUS_NEVER_PAY\x10\x01\x12\x1e\n\x1a\x43OMPACT_STATUS_PARTIAL_PAY\x10\x02\x12\x1a\n\x16\x43OMPACT_STATUS_EXPIRED\x10\x03\x12\"\n\x1e\x43OMPACT_STATUS_CUSTOMER_SETTLE\x10\x04\x12 \n\x1c\x43OMPACT_STATUS_MANUAL_SETTLE\x10\x05\x12\x1e\n\x1a\x43OMPACT_STATUS_LIABILITIES\x10\x06*q\n\x13\x43ompactPositionType\x12\x1e\n\x1a\x43OMPACT_POSITION_UNDEFINED\x10\x00\x12\x1c\n\x18\x43OMPACT_POSITION_GENERAL\x10\x01\x12\x1c\n\x18\x43OMPACT_POSITION_SPECIAL\x10\x02*\x9c\x01\n\x12SecurityLoanStatus\x12\"\n\x1eSECURITY_LOAN_STATUS_UNDEFINED\x10\x00\x12\x1f\n\x1bSECURITY_LOAN_STATUS_NORMAL\x10\x01\x12 \n\x1cSECURITY_LOAN_STATUS_SUSPEND\x10\x02\x12\x1f\n\x1bSECURITY_LOAN_STATUS_FAILED\x10\x03\x62\x06proto3') ) _DTPAPIID = _descriptor.EnumDescriptor( name='DtpApiId', full_name='dwjk.dtp.DtpApiId', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='APP_ID_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_PLACE_ORDER', index=1, number=10002001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_CANCEL_ORDER', index=2, number=10002002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_PLACE_BATCH', index=3, number=10002003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_CANCEL_BATCH', index=4, number=10002004, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_PLACE_VOTE', index=5, number=10002005, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_PLACE_DECLARE', index=6, number=10002006, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_CANCEL_RESPONSE', index=7, number=11002002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_PLACE_BATCH_RESPONSE', index=8, number=11002003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_CANCEL_BATCH_RESPONSE', index=9, number=11002004, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_PLACED', index=10, number=20001001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_FILL', index=11, number=20001002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_CANCELLATION', index=12, number=20001003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_VOTE', index=13, number=20001004, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_DECLARE', index=14, number=20001005, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_LOGIN', index=15, number=10001001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_LOGOUT', index=16, number=10001002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_LOGIN', index=17, number=11001001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_LOGOUT', index=18, number=11001002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_ORDER', index=19, number=10003001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_FILL', index=20, number=10003002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_CAPITAL', index=21, number=10003003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_POSITION', index=22, number=10003004, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_CAPITAL_HK', index=23, number=10003005, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_QUOTA', index=24, number=10003006, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_VOTE_INFO', index=25, number=10003007, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_DECLARE_INFO', index=26, number=10003008, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_BANK_SERVICE', index=27, number=10003009, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_ORDER', index=28, number=11003001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_FILL', index=29, number=11003002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_CAPITAL', index=30, number=11003003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_POSITION', index=31, number=11003004, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_CAPITAL_HK', index=32, number=11003005, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_QUOTA', index=33, number=11003006, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_VOTE_INFO', index=34, number=11003007, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_DECLARE_INFO', index=35, number=11003008, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_BANK_SERVICE', index=36, number=11003009, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_BOND_STORAGE', index=37, number=10004001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_PENDING_REPO', index=38, number=10004002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_SETTLEMENT_INFO', index=39, number=10004003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_BOND_STORAGE', index=40, number=11004001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_PENDING_REPO', index=41, number=11004002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_SETTLEMENT_INFO', index=42, number=11004003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_RATION', index=43, number=10005001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_RATION', index=44, number=11005001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_ALGORITHMIC_SEND_REPORT', index=45, number=20009001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_MARGIN_PLACE_ORDER', index=46, number=10008001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_MARGIN_CANCEL_ORDER', index=47, number=10008002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_MARGIN_REPAYMENT_AMOUNT_ORDER', index=48, number=10008003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_MARGIN_REPAYMENT_SECURITY_ORDER', index=49, number=10008004, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_MARGIN_CANCEL_RESPONSE', index=50, number=11008002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_MARGIN_PLACED', index=51, number=20008001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_MARGIN_FILL', index=52, number=20008002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_MARGIN_CANCELLATION', index=53, number=20008003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_MARGIN_REPAY_AMT_PLACED', index=54, number=20008004, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REPORT_MARGIN_REPAY_SEC_PLACED', index=55, number=20008005, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_MARGIN_ORDER', index=56, number=30008001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_MARGIN_FILL', index=57, number=30008002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_MARGIN_CAPITAL', index=58, number=30008003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_MARGIN_POSITION', index=59, number=30008004, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_MARGIN_SECURITIES', index=60, number=30008005, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_MARGIN_COMPACT', index=61, number=30008006, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_REQUEST_MARGIN_COMPACT_WATER', index=62, number=30008007, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_MARGIN_ORDER', index=63, number=31008001, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_MARGIN_FILL', index=64, number=31008002, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_MARGIN_CAPITAL', index=65, number=31008003, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_MARGIN_POSITION', index=66, number=31008004, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_MARGIN_SECURITIES', index=67, number=31008005, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_MARGIN_COMPACT', index=68, number=31008006, options=None, type=None), _descriptor.EnumValueDescriptor( name='APP_ID_RESPONSE_MARGIN_COMPACT_WATER', index=69, number=31008007, options=None, type=None), ], containing_type=None, options=None, serialized_start=29, serialized_end=2460, ) _sym_db.RegisterEnumDescriptor(_DTPAPIID) DtpApiId = enum_type_wrapper.EnumTypeWrapper(_DTPAPIID) _RESPONSESTATUSCODE = _descriptor.EnumDescriptor( name='ResponseStatusCode', full_name='dwjk.dtp.ResponseStatusCode', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='RESPONSE_STATUS_CODE_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='RESPONSE_CODE_OK', index=1, number=200, options=None, type=None), _descriptor.EnumValueDescriptor( name='RESPONSE_CODE_BAD_REQUEST', index=2, number=400, options=None, type=None), _descriptor.EnumValueDescriptor( name='RESPONSE_CODE_UNAUTHORIZED', index=3, number=401, options=None, type=None), _descriptor.EnumValueDescriptor( name='RESPONSE_CODE_FORBIDDEN', index=4, number=403, options=None, type=None), _descriptor.EnumValueDescriptor( name='RESPONSE_CODE_INTERNAL_ERROR', index=5, number=500, options=None, type=None), ], containing_type=None, options=None, serialized_start=2463, serialized_end=2672, ) _sym_db.RegisterEnumDescriptor(_RESPONSESTATUSCODE) ResponseStatusCode = enum_type_wrapper.EnumTypeWrapper(_RESPONSESTATUSCODE) _EXCHANGE = _descriptor.EnumDescriptor( name='Exchange', full_name='dwjk.dtp.Exchange', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='EXCHANGE_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='EXCHANGE_SH_A', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='EXCHANGE_SZ_A', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='EXCHANGE_HK', index=3, number=3, options=None, type=None), _descriptor.EnumValueDescriptor( name='EXCHANGE_SK', index=4, number=4, options=None, type=None), ], containing_type=None, options=None, serialized_start=2674, serialized_end=2780, ) _sym_db.RegisterEnumDescriptor(_EXCHANGE) Exchange = enum_type_wrapper.EnumTypeWrapper(_EXCHANGE) _ORDERTYPE = _descriptor.EnumDescriptor( name='OrderType', full_name='dwjk.dtp.OrderType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ORDER_TYPE_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_TYPE_LIMIT', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_TYPE_MARKET', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_TYPE_BEST_5_ONLY', index=3, number=3, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_TYPE_BEST_5_LIMIT', index=4, number=4, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_TYPE_YOU_BEST', index=5, number=5, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_TYPE_WE_BEST', index=6, number=6, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_TYPE_MARKET_ONCE', index=7, number=7, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_TYPE_MARKET_ALL', index=8, number=8, options=None, type=None), ], containing_type=None, options=None, serialized_start=2783, serialized_end=3026, ) _sym_db.RegisterEnumDescriptor(_ORDERTYPE) OrderType = enum_type_wrapper.EnumTypeWrapper(_ORDERTYPE) _ORDERLIMIT = _descriptor.EnumDescriptor( name='OrderLimit', full_name='dwjk.dtp.OrderLimit', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ORDER_LIMIT_NONE', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_LIMIT_BID', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_LIMIT_ENHANCE', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_LIMIT_FRAGMENT', index=3, number=3, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_LIMIT_FIXED', index=4, number=4, options=None, type=None), ], containing_type=None, options=None, serialized_start=3029, serialized_end=3158, ) _sym_db.RegisterEnumDescriptor(_ORDERLIMIT) OrderLimit = enum_type_wrapper.EnumTypeWrapper(_ORDERLIMIT) _ORDERSIDE = _descriptor.EnumDescriptor( name='OrderSide', full_name='dwjk.dtp.OrderSide', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ORDER_SIDE_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_BUY', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_SELL', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_IPO', index=3, number=3, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_CREATION', index=4, number=11, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_REDEMPTON', index=5, number=12, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_REVERSE_REPO', index=6, number=21, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_REPO', index=7, number=22, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_PLEDGE_BOND_IN', index=8, number=23, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_PLEDGE_BOND_OUT', index=9, number=24, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_INTENT_BUY', index=10, number=31, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_INTENT_SELL', index=11, number=32, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_LIMIT_BUY', index=12, number=33, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_LIMIT_SELL', index=13, number=34, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_AFTER_LIMIT_BUY', index=14, number=35, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_AFTER_LIMIT_SELL', index=15, number=36, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_FILL_BUY', index=16, number=37, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_FILL_SELL', index=17, number=38, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_FINANCE_BUY', index=18, number=41, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_COUPON_SELL', index=19, number=42, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_SELL_BOUND_REPAY', index=20, number=43, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_SELL_BOUND_REPAY_INTEREST', index=21, number=44, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_BUY_BOUND_REPAY', index=22, number=45, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_FINANCE_COVER', index=23, number=46, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_COUPON_COVER', index=24, number=47, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_FINANCE_FORCE_COVER', index=25, number=48, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_COUPON_FORE_COVER', index=26, number=49, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_PAY_CAPITAL', index=27, number=50, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_PAY_SECURITY', index=28, number=51, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_SECURITY_IN', index=29, number=52, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_SIDE_SECURITY_OUT', index=30, number=53, options=None, type=None), ], containing_type=None, options=None, serialized_start=3161, serialized_end=4053, ) _sym_db.RegisterEnumDescriptor(_ORDERSIDE) OrderSide = enum_type_wrapper.EnumTypeWrapper(_ORDERSIDE) _ORDERSTATUS = _descriptor.EnumDescriptor( name='OrderStatus', full_name='dwjk.dtp.OrderStatus', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='ORDER_STATUS_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_STATUS_PLACING', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_STATUS_PLACED', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_STATUS_PARTIAL_FILLED', index=3, number=3, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_STATUS_FILLED', index=4, number=4, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_STATUS_CANCELLING', index=5, number=5, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_STATUS_CANCELLED', index=6, number=6, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_STATUS_PARTIAL_CANCELLING', index=7, number=7, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_STATUS_PARTIAL_CANCELLED', index=8, number=8, options=None, type=None), _descriptor.EnumValueDescriptor( name='ORDER_STATUS_FAILED', index=9, number=9, options=None, type=None), ], containing_type=None, options=None, serialized_start=4056, serialized_end=4361, ) _sym_db.RegisterEnumDescriptor(_ORDERSTATUS) OrderStatus = enum_type_wrapper.EnumTypeWrapper(_ORDERSTATUS) _FILLSTATUS = _descriptor.EnumDescriptor( name='FillStatus', full_name='dwjk.dtp.FillStatus', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='FILL_STATUS_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='FILL_STATUS_FILLED', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='FILL_STATUS_CANCELLED', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='FILL_STATUS_FAILED', index=3, number=3, options=None, type=None), ], containing_type=None, options=None, serialized_start=4363, serialized_end=4477, ) _sym_db.RegisterEnumDescriptor(_FILLSTATUS) FillStatus = enum_type_wrapper.EnumTypeWrapper(_FILLSTATUS) _QUERYORDERCRITERIA = _descriptor.EnumDescriptor( name='QueryOrderCriteria', full_name='dwjk.dtp.QueryOrderCriteria', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='QUERY_ONLY_ORDER', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='QUERY_ORDER_CAN_BE_CANCELLED', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='QUERY_ONLY_CANCEL_ORDER', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='QUERY_ORDER_ALL', index=3, number=3, options=None, type=None), ], containing_type=None, options=None, serialized_start=4479, serialized_end=4605, ) _sym_db.RegisterEnumDescriptor(_QUERYORDERCRITERIA) QueryOrderCriteria = enum_type_wrapper.EnumTypeWrapper(_QUERYORDERCRITERIA) _BUSINESSTYPE = _descriptor.EnumDescriptor( name='BusinessType', full_name='dwjk.dtp.BusinessType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='BUSINESS_TYPE_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='BUSINESS_TYPE_DIVIDEND', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='BUSINESS_TYPE_ACQUISITION', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='BUSINESS_TYPE_PLACEMENT', index=3, number=3, options=None, type=None), _descriptor.EnumValueDescriptor( name='BUSINESS_TYPE_OFFERING', index=4, number=4, options=None, type=None), _descriptor.EnumValueDescriptor( name='BUSINESS_TYPE_DISCOUNT', index=5, number=5, options=None, type=None), ], containing_type=None, options=None, serialized_start=4608, serialized_end=4795, ) _sym_db.RegisterEnumDescriptor(_BUSINESSTYPE) BusinessType = enum_type_wrapper.EnumTypeWrapper(_BUSINESSTYPE) _DECLARETYPE = _descriptor.EnumDescriptor( name='DeclareType', full_name='dwjk.dtp.DeclareType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='DECLARE_TYPE_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='DECLARE_TYPE_DECLARATION', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='DECLARE_TYPE_REVOCATION', index=2, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=4797, serialized_end=4897, ) _sym_db.RegisterEnumDescriptor(_DECLARETYPE) DeclareType = enum_type_wrapper.EnumTypeWrapper(_DECLARETYPE) _QUOTASTATUS = _descriptor.EnumDescriptor( name='QuotaStatus', full_name='dwjk.dtp.QuotaStatus', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='QUOTA_STATUS_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='QUOTA_STATUS_AVAILABLE', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='QUOTA_STATUS_UNAVAILABLE', index=2, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=4899, serialized_end=4998, ) _sym_db.RegisterEnumDescriptor(_QUOTASTATUS) QuotaStatus = enum_type_wrapper.EnumTypeWrapper(_QUOTASTATUS) _MOTIONTYPE = _descriptor.EnumDescriptor( name='MotionType', full_name='dwjk.dtp.MotionType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='MOTION_TYPE_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='MOTION_TYPE_GENERAL', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='MOTION_TYPE_ACCUMULATE', index=2, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=5000, serialized_end=5092, ) _sym_db.RegisterEnumDescriptor(_MOTIONTYPE) MotionType = enum_type_wrapper.EnumTypeWrapper(_MOTIONTYPE) _BANKSERVICECODE = _descriptor.EnumDescriptor( name='BankServiceCode', full_name='dwjk.dtp.BankServiceCode', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='BANK_SERVICE_CODE_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='BANK_SERVICE_CODE_BANK_OUT', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='BANK_SERVICE_CODE_BANK_IN', index=2, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=5094, serialized_end=5207, ) _sym_db.RegisterEnumDescriptor(_BANKSERVICECODE) BankServiceCode = enum_type_wrapper.EnumTypeWrapper(_BANKSERVICECODE) _COMPACTTYPE = _descriptor.EnumDescriptor( name='CompactType', full_name='dwjk.dtp.CompactType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='COMPACT_TYPE_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_TYPE_FINANCE', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_TYPE_SECURITY', index=2, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=5209, serialized_end=5303, ) _sym_db.RegisterEnumDescriptor(_COMPACTTYPE) CompactType = enum_type_wrapper.EnumTypeWrapper(_COMPACTTYPE) _COMPACTSTATUS = _descriptor.EnumDescriptor( name='CompactStatus', full_name='dwjk.dtp.CompactStatus', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='COMPACT_STATUS_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_STATUS_NEVER_PAY', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_STATUS_PARTIAL_PAY', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_STATUS_EXPIRED', index=3, number=3, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_STATUS_CUSTOMER_SETTLE', index=4, number=4, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_STATUS_MANUAL_SETTLE', index=5, number=5, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_STATUS_LIABILITIES', index=6, number=6, options=None, type=None), ], containing_type=None, options=None, serialized_start=5306, serialized_end=5543, ) _sym_db.RegisterEnumDescriptor(_COMPACTSTATUS) CompactStatus = enum_type_wrapper.EnumTypeWrapper(_COMPACTSTATUS) _COMPACTPOSITIONTYPE = _descriptor.EnumDescriptor( name='CompactPositionType', full_name='dwjk.dtp.CompactPositionType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='COMPACT_POSITION_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_POSITION_GENERAL', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='COMPACT_POSITION_SPECIAL', index=2, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=5545, serialized_end=5658, ) _sym_db.RegisterEnumDescriptor(_COMPACTPOSITIONTYPE) CompactPositionType = enum_type_wrapper.EnumTypeWrapper(_COMPACTPOSITIONTYPE) _SECURITYLOANSTATUS = _descriptor.EnumDescriptor( name='SecurityLoanStatus', full_name='dwjk.dtp.SecurityLoanStatus', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='SECURITY_LOAN_STATUS_UNDEFINED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='SECURITY_LOAN_STATUS_NORMAL', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='SECURITY_LOAN_STATUS_SUSPEND', index=2, number=2, options=None, type=None), _descriptor.EnumValueDescriptor( name='SECURITY_LOAN_STATUS_FAILED', index=3, number=3, options=None, type=None), ], containing_type=None, options=None, serialized_start=5661, serialized_end=5817, ) _sym_db.RegisterEnumDescriptor(_SECURITYLOANSTATUS) SecurityLoanStatus = enum_type_wrapper.EnumTypeWrapper(_SECURITYLOANSTATUS) APP_ID_UNDEFINED = 0 APP_ID_PLACE_ORDER = 10002001 APP_ID_CANCEL_ORDER = 10002002 APP_ID_PLACE_BATCH = 10002003 APP_ID_CANCEL_BATCH = 10002004 APP_ID_PLACE_VOTE = 10002005 APP_ID_PLACE_DECLARE = 10002006 APP_ID_CANCEL_RESPONSE = 11002002 APP_ID_PLACE_BATCH_RESPONSE = 11002003 APP_ID_CANCEL_BATCH_RESPONSE = 11002004 APP_ID_REPORT_PLACED = 20001001 APP_ID_REPORT_FILL = 20001002 APP_ID_REPORT_CANCELLATION = 20001003 APP_ID_REPORT_VOTE = 20001004 APP_ID_REPORT_DECLARE = 20001005 APP_ID_REQUEST_LOGIN = 10001001 APP_ID_REQUEST_LOGOUT = 10001002 APP_ID_RESPONSE_LOGIN = 11001001 APP_ID_RESPONSE_LOGOUT = 11001002 APP_ID_REQUEST_ORDER = 10003001 APP_ID_REQUEST_FILL = 10003002 APP_ID_REQUEST_CAPITAL = 10003003 APP_ID_REQUEST_POSITION = 10003004 APP_ID_REQUEST_CAPITAL_HK = 10003005 APP_ID_REQUEST_QUOTA = 10003006 APP_ID_REQUEST_VOTE_INFO = 10003007 APP_ID_REQUEST_DECLARE_INFO = 10003008 APP_ID_REQUEST_BANK_SERVICE = 10003009 APP_ID_RESPONSE_ORDER = 11003001 APP_ID_RESPONSE_FILL = 11003002 APP_ID_RESPONSE_CAPITAL = 11003003 APP_ID_RESPONSE_POSITION = 11003004 APP_ID_RESPONSE_CAPITAL_HK = 11003005 APP_ID_RESPONSE_QUOTA = 11003006 APP_ID_RESPONSE_VOTE_INFO = 11003007 APP_ID_RESPONSE_DECLARE_INFO = 11003008 APP_ID_RESPONSE_BANK_SERVICE = 11003009 APP_ID_REQUEST_BOND_STORAGE = 10004001 APP_ID_REQUEST_PENDING_REPO = 10004002 APP_ID_REQUEST_SETTLEMENT_INFO = 10004003 APP_ID_RESPONSE_BOND_STORAGE = 11004001 APP_ID_RESPONSE_PENDING_REPO = 11004002 APP_ID_RESPONSE_SETTLEMENT_INFO = 11004003 APP_ID_REQUEST_RATION = 10005001 APP_ID_RESPONSE_RATION = 11005001 APP_ID_ALGORITHMIC_SEND_REPORT = 20009001 APP_ID_MARGIN_PLACE_ORDER = 10008001 APP_ID_MARGIN_CANCEL_ORDER = 10008002 APP_ID_MARGIN_REPAYMENT_AMOUNT_ORDER = 10008003 APP_ID_MARGIN_REPAYMENT_SECURITY_ORDER = 10008004 APP_ID_MARGIN_CANCEL_RESPONSE = 11008002 APP_ID_REPORT_MARGIN_PLACED = 20008001 APP_ID_REPORT_MARGIN_FILL = 20008002 APP_ID_REPORT_MARGIN_CANCELLATION = 20008003 APP_ID_REPORT_MARGIN_REPAY_AMT_PLACED = 20008004 APP_ID_REPORT_MARGIN_REPAY_SEC_PLACED = 20008005 APP_ID_REQUEST_MARGIN_ORDER = 30008001 APP_ID_REQUEST_MARGIN_FILL = 30008002 APP_ID_REQUEST_MARGIN_CAPITAL = 30008003 APP_ID_REQUEST_MARGIN_POSITION = 30008004 APP_ID_REQUEST_MARGIN_SECURITIES = 30008005 APP_ID_REQUEST_MARGIN_COMPACT = 30008006 APP_ID_REQUEST_MARGIN_COMPACT_WATER = 30008007 APP_ID_RESPONSE_MARGIN_ORDER = 31008001 APP_ID_RESPONSE_MARGIN_FILL = 31008002 APP_ID_RESPONSE_MARGIN_CAPITAL = 31008003 APP_ID_RESPONSE_MARGIN_POSITION = 31008004 APP_ID_RESPONSE_MARGIN_SECURITIES = 31008005 APP_ID_RESPONSE_MARGIN_COMPACT = 31008006 APP_ID_RESPONSE_MARGIN_COMPACT_WATER = 31008007 RESPONSE_STATUS_CODE_UNDEFINED = 0 RESPONSE_CODE_OK = 200 RESPONSE_CODE_BAD_REQUEST = 400 RESPONSE_CODE_UNAUTHORIZED = 401 RESPONSE_CODE_FORBIDDEN = 403 RESPONSE_CODE_INTERNAL_ERROR = 500 EXCHANGE_UNDEFINED = 0 EXCHANGE_SH_A = 1 EXCHANGE_SZ_A = 2 EXCHANGE_HK = 3 EXCHANGE_SK = 4 ORDER_TYPE_UNDEFINED = 0 ORDER_TYPE_LIMIT = 1 ORDER_TYPE_MARKET = 2 ORDER_TYPE_BEST_5_ONLY = 3 ORDER_TYPE_BEST_5_LIMIT = 4 ORDER_TYPE_YOU_BEST = 5 ORDER_TYPE_WE_BEST = 6 ORDER_TYPE_MARKET_ONCE = 7 ORDER_TYPE_MARKET_ALL = 8 ORDER_LIMIT_NONE = 0 ORDER_LIMIT_BID = 1 ORDER_LIMIT_ENHANCE = 2 ORDER_LIMIT_FRAGMENT = 3 ORDER_LIMIT_FIXED = 4 ORDER_SIDE_UNDEFINED = 0 ORDER_SIDE_BUY = 1 ORDER_SIDE_SELL = 2 ORDER_SIDE_IPO = 3 ORDER_SIDE_CREATION = 11 ORDER_SIDE_REDEMPTON = 12 ORDER_SIDE_REVERSE_REPO = 21 ORDER_SIDE_REPO = 22 ORDER_SIDE_PLEDGE_BOND_IN = 23 ORDER_SIDE_PLEDGE_BOND_OUT = 24 ORDER_SIDE_INTENT_BUY = 31 ORDER_SIDE_INTENT_SELL = 32 ORDER_SIDE_LIMIT_BUY = 33 ORDER_SIDE_LIMIT_SELL = 34 ORDER_SIDE_AFTER_LIMIT_BUY = 35 ORDER_SIDE_AFTER_LIMIT_SELL = 36 ORDER_SIDE_FILL_BUY = 37 ORDER_SIDE_FILL_SELL = 38 ORDER_SIDE_FINANCE_BUY = 41 ORDER_SIDE_COUPON_SELL = 42 ORDER_SIDE_SELL_BOUND_REPAY = 43 ORDER_SIDE_SELL_BOUND_REPAY_INTEREST = 44 ORDER_SIDE_BUY_BOUND_REPAY = 45 ORDER_SIDE_FINANCE_COVER = 46 ORDER_SIDE_COUPON_COVER = 47 ORDER_SIDE_FINANCE_FORCE_COVER = 48 ORDER_SIDE_COUPON_FORE_COVER = 49 ORDER_SIDE_PAY_CAPITAL = 50 ORDER_SIDE_PAY_SECURITY = 51 ORDER_SIDE_SECURITY_IN = 52 ORDER_SIDE_SECURITY_OUT = 53 ORDER_STATUS_UNDEFINED = 0 ORDER_STATUS_PLACING = 1 ORDER_STATUS_PLACED = 2 ORDER_STATUS_PARTIAL_FILLED = 3 ORDER_STATUS_FILLED = 4 ORDER_STATUS_CANCELLING = 5 ORDER_STATUS_CANCELLED = 6 ORDER_STATUS_PARTIAL_CANCELLING = 7 ORDER_STATUS_PARTIAL_CANCELLED = 8 ORDER_STATUS_FAILED = 9 FILL_STATUS_UNDEFINED = 0 FILL_STATUS_FILLED = 1 FILL_STATUS_CANCELLED = 2 FILL_STATUS_FAILED = 3 QUERY_ONLY_ORDER = 0 QUERY_ORDER_CAN_BE_CANCELLED = 1 QUERY_ONLY_CANCEL_ORDER = 2 QUERY_ORDER_ALL = 3 BUSINESS_TYPE_UNDEFINED = 0 BUSINESS_TYPE_DIVIDEND = 1 BUSINESS_TYPE_ACQUISITION = 2 BUSINESS_TYPE_PLACEMENT = 3 BUSINESS_TYPE_OFFERING = 4 BUSINESS_TYPE_DISCOUNT = 5 DECLARE_TYPE_UNDEFINED = 0 DECLARE_TYPE_DECLARATION = 1 DECLARE_TYPE_REVOCATION = 2 QUOTA_STATUS_UNDEFINED = 0 QUOTA_STATUS_AVAILABLE = 1 QUOTA_STATUS_UNAVAILABLE = 2 MOTION_TYPE_UNDEFINED = 0 MOTION_TYPE_GENERAL = 1 MOTION_TYPE_ACCUMULATE = 2 BANK_SERVICE_CODE_UNDEFINED = 0 BANK_SERVICE_CODE_BANK_OUT = 1 BANK_SERVICE_CODE_BANK_IN = 2 COMPACT_TYPE_UNDEFINED = 0 COMPACT_TYPE_FINANCE = 1 COMPACT_TYPE_SECURITY = 2 COMPACT_STATUS_UNDEFINED = 0 COMPACT_STATUS_NEVER_PAY = 1 COMPACT_STATUS_PARTIAL_PAY = 2 COMPACT_STATUS_EXPIRED = 3 COMPACT_STATUS_CUSTOMER_SETTLE = 4 COMPACT_STATUS_MANUAL_SETTLE = 5 COMPACT_STATUS_LIABILITIES = 6 COMPACT_POSITION_UNDEFINED = 0 COMPACT_POSITION_GENERAL = 1 COMPACT_POSITION_SPECIAL = 2 SECURITY_LOAN_STATUS_UNDEFINED = 0 SECURITY_LOAN_STATUS_NORMAL = 1 SECURITY_LOAN_STATUS_SUSPEND = 2 SECURITY_LOAN_STATUS_FAILED = 3 DESCRIPTOR.enum_types_by_name['DtpApiId'] = _DTPAPIID DESCRIPTOR.enum_types_by_name['ResponseStatusCode'] = _RESPONSESTATUSCODE DESCRIPTOR.enum_types_by_name['Exchange'] = _EXCHANGE DESCRIPTOR.enum_types_by_name['OrderType'] = _ORDERTYPE DESCRIPTOR.enum_types_by_name['OrderLimit'] = _ORDERLIMIT DESCRIPTOR.enum_types_by_name['OrderSide'] = _ORDERSIDE DESCRIPTOR.enum_types_by_name['OrderStatus'] = _ORDERSTATUS DESCRIPTOR.enum_types_by_name['FillStatus'] = _FILLSTATUS DESCRIPTOR.enum_types_by_name['QueryOrderCriteria'] = _QUERYORDERCRITERIA DESCRIPTOR.enum_types_by_name['BusinessType'] = _BUSINESSTYPE DESCRIPTOR.enum_types_by_name['DeclareType'] = _DECLARETYPE DESCRIPTOR.enum_types_by_name['QuotaStatus'] = _QUOTASTATUS DESCRIPTOR.enum_types_by_name['MotionType'] = _MOTIONTYPE DESCRIPTOR.enum_types_by_name['BankServiceCode'] = _BANKSERVICECODE DESCRIPTOR.enum_types_by_name['CompactType'] = _COMPACTTYPE DESCRIPTOR.enum_types_by_name['CompactStatus'] = _COMPACTSTATUS DESCRIPTOR.enum_types_by_name['CompactPositionType'] = _COMPACTPOSITIONTYPE DESCRIPTOR.enum_types_by_name['SecurityLoanStatus'] = _SECURITYLOANSTATUS _sym_db.RegisterFileDescriptor(DESCRIPTOR) # @@protoc_insertion_point(module_scope)
yunchi
/pb/type_pb2.py
type_pb2.py
## 前言 本来是想找一个python 识别二维码的。可是网上网上找到的教程都是教人怎么自己写一个用例去请求打码请求,或是自己找第三方库实现。 显然这都不是我想要的。我想要的就是拿来即用。 上诉两种方案其一需要自己写,代码复用率不高,或是直接从平台复制用例对代码侵入比较大。其二的识别率不高。 ## 解决痛点 1. `pip` 直接安装无需关注实现细节 2. 保持更新。稳定可用 3. 识别率搞 4. 识别结果记录log 识别失败可退款 ## todo 1. 接入其他打码平台 ## 斐斐云打码 > 使用 斐斐打码 对验证码进行打码。一次封装简单使用 ## 测试账号 PD账号:119208 PD秘钥:gfPmvlxPWdGEplGZtr3aIuaWP1/fyZW3 [打码平台地址](http://www.fateadm.com/) ## 如何使用 [官方文档地址](http://docs.fateadm.com/web/#/1?page_id=1) 测试用例 `test/test.py` ### 引入 ``` pip install yundama ``` ### 实例化 ``` from yundama.Yundama import Yundama yundama = Yundama(app_id="你的pd_id", app_key="你的pd_key") ``` ### 查询余额 ``` yundama.get_balance() ``` ### 提交需要验证的图片 [类型说明](http://docs.fateadm.com/web/#/1?page_id=36) ``` img = open('../data/image.png', 'rb') yundama.get_code_result(img.read(), '验证码类型') ``` ### 退款 ``` yundama.refund('订单id') ``` ### 充值 ``` yundama.recharge('充值卡号', '充值卡密') ```
yundama
/yundama-0.1.5.tar.gz/yundama-0.1.5/README.md
README.md
from bs4 import BeautifulSoup import urllib2 import re import pickle import sys import os import datetime #----------------------------------------- global """ common libarary """ class com: def __init__(self): pass def help(self): """ # #Description: for crawling #version: v1.3 #history: 20150318 first version """ print "" def load_pickle(self, mypicklefile): """ After loding the pickle file, return the data """ mylist = [] with open(mypicklefile, "rb") as fp: mylist = pickle.load(fp) return mylist #----------------------------- def mydir(self, dir1, *srch): """ disoplay the dir() result """ result=[] if len(srch) == 0 : result = [d for d in dir1] else: for s1 in srch: for d1 in dir1: myname = d1 #mydesc = eval( d1 + ".__doc__") mytarget = myname #if mydesc : # mytarget += mydesc if s1 in mytarget: result.append(d1) s1 = set(result) result = list(s1) print "find %d results" % len(result) for d1 in result: print"====================================\n" print d1 try: print eval( d1 + ".__doc__") except Exception as ex1: print ex1 def strip_text(self, in_str): """ strip the special characte exception korean unicode character and numeric ascii """ try: new_str = re.sub(u"([\u318d\u00B7\u2024\uFF65\u2027\u2219\u30FB]|[^0-9가-힣a-zA-Z]|middot)","", in_str) return new_str except Exception as exStripText: return in_str def strip_list(self, list1, idx = 0): """--- list1 idx strip ex) list[0][3] list[1][3] """ for ipos in range(0, len(list1)): list1[ipos][idx] = self.strip_text(list1[ipos][idx]) return list1 def get_soup_from_url(self, url): """ return utf-8 HTML""" try: page = urllib2.urlopen(url) soup_result = BeautifulSoup(page, from_encoding="utf-8") page.close() return soup_result except Exception as ex128: if page: page.close() return "ERR:%s"%(ex128)
yunlib
/yunlib-1.0.2.tar.gz/yunlib-1.0.2/yunlib.py
yunlib.py
# `yuno` (originally: `saki`) An account and database management framework, completing Nasse ***Manipulate your databases as if you never leaved Python*** [![PyPI version](https://badge.fury.io/py/yuno.svg)](https://pypi.org/project/yuno/) [![Downloads](https://static.pepy.tech/personalized-badge/yuno?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Total%20Downloads)](https://pepy.tech/project/yuno) [![PyPI - Downloads](https://img.shields.io/pypi/dm/yuno)](https://pypistats.org/packages/yuno) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/yuno)](https://pypi.org/project/yuno/) [![PyPI - Status](https://img.shields.io/pypi/status/yuno)](https://pypi.org/project/yuno/) [![GitHub - License](https://img.shields.io/github/license/Animenosekai/yuno)](https://github.com/Animenosekai/yuno/blob/master/LICENSE) [![GitHub top language](https://img.shields.io/github/languages/top/Animenosekai/yuno)](https://github.com/Animenosekai/yuno) [![CodeQL Checks Badge](https://github.com/Animenosekai/yuno/workflows/CodeQL%20Python%20Analysis/badge.svg)](https://github.com/Animenosekai/yuno/actions?query=workflow%3ACodeQL) [![Pytest](https://github.com/Animenosekai/yuno/actions/workflows/pytest.yml/badge.svg)](https://github.com/Animenosekai/yuno/actions/workflows/pytest.yml) ![Code Size](https://img.shields.io/github/languages/code-size/Animenosekai/yuno) ![Repo Size](https://img.shields.io/github/repo-size/Animenosekai/yuno) ![Issues](https://img.shields.io/github/issues/Animenosekai/yuno) ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. ### Prerequisites #### Python You will need Python 3 to use this module ```bash # vermin output Minimum required versions: 3.8 Incompatible versions: 2 ``` According to Vermin (`--backport typing`), Python 3.8 is needed for `typing.Literal` #### MongoDB I haven't checked the minimum requirements for the MongoDB features used in this library yet but you should always use the latest versions for maximum security. Also this framework has been tested on MongoDB `v4.4.5` (locally), MongoDB `v4.4.12` (on Atlas) and the latest version of MongoDB on the [CI tests](https://github.com/Animenosekai/yuno/actions/workflows/pytest.yml). Always check if your Python version works with `yuno` before using it in production. ## Installing ### Option 1: From PyPI ```bash pip install --upgrade yuno ``` ### Option 2: From Git ```bash pip install --upgrade git+https://github.com/Animenosekai/yuno ``` You can check if you successfully installed it by printing out its version: ```bash $ python -c "import yuno; print(yuno.__version__)" # output: yuno v1.0 ``` ## Purpose This framework aims to bring effortless database management and database schemas in Python, in order to make everything predictable and easy to debug. You will never need to learn and search for obscure MongoDB features again because everything is made to behave like normal Python objects. ## Usage ### Running a MongoDB (`mongod`) process from Python If you have a MongoDB database already running (for example: using MongoDB Atlas, or on a separate server), you can skip this part. #### Starting a process To start a process you will need to create a new `MongoDB` object with the configurations (refer to [Configuration](#Configuration)) and start it from there. > Example ```python from yuno import MongoDB server = MongoDB() server.start() # this will launch MongoDB and wait for it to run ... server.kill() # this will kill the MongoDB process ``` The `start` method can get extra parameters that will modify the way MongoDB is launched: - `executable`: The path to the MongoDB executable. - `wait`: When you have set `fork` to `False`, this is the number of seconds to wait for the process to start. (I was planning to use the output from the process to determine when it is listening for connections but `mongod` doesn't seem to "flush" its output so it was just hanging waiting for new output to come until the process was killed) - `keep_alive`: Whether to keep the process alive or not (fork will be enabled) after Python quits (it will not register `self.kill` at cleanup). #### Configuration MongoDB configuration is made easy with Yuno! You can just pass configuration values into `MongoDB` to configure it! You can configure a lot of important values natively for now and you can add more obscure ones when launching the process. ##### List of supported configuration values - `host`: The host of the MongoDB server (net.bindIp) - `port`: The port of the MongoDB server (net.port) - `db_path`: The path of the MongoDB database (storage.dbPath) - `fork`: Whether to fork the MongoDB process or not (processManagement.fork) - `log_config`: The MongoDB logging configuration (systemLog) - `max_connections`: The maximum number of connections allowed (net.maxIncomingConnections) - `json_validation`: Whether to enable the JSON validation or not (net.wireObjectCheck) - `ipv6`: Whether to enable IPv6 or not (net.ipv6) - `monitoring`: Whether to enable the free MongoDB monitoring or not (cloud.monitoring.free.state) ##### About LogConfig The content of the `log_config` parameter should be a `LogConfig` object (or a dictionary containing data to instantiate a `LogConfig` class). This parameter is a class on its own because of its complexity. > Parameters - `verbosity`: The verbosity level of the MongoDB logging system - `path`: The path of the MongoDB log file. It can also be TERMINAL or SYSLOG (the systemLog.destination value will be set automatically according to this value) - `append`: Whether to append to the log file or not - `timezone`: The timezone of the timestamps format - `debug`: Whether to enable the debug mode or not (this will enable max verbosity and `--traceExceptions`) > Example ```python from yuno import MongoDB, LogConfig from yuno.launcher import Timezone server = MongoDB(db_path="./db/test", fork=True, monitoring=False, log_config=LogConfig(verbosity=2, path="./logs/db/test.log", timezone=Timezone.UTC)) server.start() ``` #### Loading and Dumping the configuration You can also load the config from a file or dump it into a file using the built in methods (available on `LogConfig` and `MongoDB`): - `to_cli_args` will dump the configuration to a list of CLI arguments to give to the `MongoDB` (`mongod`) process - `loads` will load the configuration from a YAML string or a dictionary of values - `load` will load the configuration from a YAML file - `dumps` will dump the configuration to a YAML string - `dump` will dump the configuration to a YAML file - `to_dict` (or `dict(configuration_object)`) will dump the configuration to a dictionary (you have a `camelCase` parameter to make the keys camelCased) This is especially useful when you already have a configuration file or want to share the configuration to another user not using Yuno. > Example ```python from yuno import MongoDB server = MongoDB() # will load all of the default configurations server.load("./db/mongo.conf") # will reinitialize the object with the config file, keeping the default values for values that aren't specified server.dump("./db/mongo_new.conf") # will dump the configurations to a new file (to share or use later) # will show the configuration print("MongoDB configuration") print("-" * 10) for key, val in server.to_dict(camelCase=True): print(key, "=", val) ``` ### Connecting to a MongoDB process Wether you use the built-in `MongoDB` object to launch a MongoDB process or just host it on the cloud/on another server, you will need to connect to it using `YunoClient`. Here are the parameters used to connect to a server: - `host`: The host or list of hostnames to connect to. You can use `host` to pass in a URI string or a MongoDB object (in which case you won't need to use `port`). - `port`: The port to connect to. - `tz_aware`: Whether to use timezone aware datetimes or not. - `connect`: Whether to connect before making any operation to the server or not. - `kwargs`: Options to pass to the PyMongo client. (you don't need to set `kwargs` manually, just pass the parameters as normal parameters) > Example ```python # Using the "MongoDB" object from yuno import MongoDB from yuno import YunoClient server = MongoDB() server.start() client = YunoClient(server) # you are connecting to the server here ``` ### Using the client To access databases from the client, all you need to do is access its name as an attribute or an item: ```python client.database_name # or client["database_name"] ``` In both case, this will return the same YunoDatabase object. The `client["database_name"]` syntax is especially useful if you use a database with the name of a method overwritten by YunoClient (for example `watch`, `server_info`, `address`, `close`, etc.). You can find a list of overwritten attributes under the `__overwritten__` attribute. YunoClient can be used to establish the database schema. This basically means that you can already type hint databases by creating your own clients. ```python from yuno import YunoClient from yuno import YunoDatabase class MyClient(YunoClient): production: YunoDatabase # you can here use your custom databases (refer to the "Using databases" section) scores: YunoDatabase client = MyClient("mongodb+srv://anise:[email protected]/production") client.production # will return the `production` database # YunoDatabase('production') ``` This helps with establishing a schema and helps your code editor guide you when writing code, resulting in less time searching for types, available databases and looking back at your code. It has serveral other methods, which are picked and adapted from the original PyMongo `MongoClient`. > Examples - `close` is used to close the connection to the server - `database_names` is used to retrieve the list of databases created. - `server_info` will return some info about the current MongoDB server in a special object called `BuildInfo` (`yuno.client.BuildInfo`). - `watch` returns a cursor to watch the cluster for changes and events. - `on` will register a callback function which will be called when the specified operation/event is performed on the server. You can also use pythonic syntax to make some operations: - Dropping a database ```python del client.test # or del client["test"] # will drop (delete) the "test" database ``` ### Using databases A "database" is what holds collections in MongoDB. To access collections from the client, all you need to do is access its name as an attribute or an item: ```python database.collection_name # or database["collection_name"] ``` In both case, this will return the same YunoCollection object. The `database["collection_name"]` syntax is especially useful if you use a database with the name of a method overwritten by YunoDatabase (for example `watch`, `on`, `command`, `aggregate`, etc.). You can find a list of overwritten attributes under the `__overwritten__` attribute. `YunoCollection` is the class returned by `YunoDatabase` when querying for one. ```python # using the client variable defined before accounts = production_database.accounts # this is YunoCollection object ``` You can define your own databases to type hint them (for the same reasons as before) ```python from yuno import YunoClient, YunoDatabase, YunoCollection class MyDatabase(YunoDatabase): accounts: YunoCollection # you will also be able to create your own collections class MyClient(YunoClient): production: MyDatabase client = MyClient("mongodb+srv://anise:[email protected]/production") production_database = client.production # will return the custom MyDatabase object and code editors will help you write code # MyDatabase('production') production_database.accounts # this is a YunoCollection object ``` It has serveral other methods, which are picked and adapted from the original PyMongo `MongoClient`. > Examples - `aggregate` is used to perform an aggregation on the database - `create_collection` is used to create a new collection - `list_collection_names` returns a list of collections available - `watch` returns a cursor to watch the database for changes and events. - `on` will register a callback function which will be called when the specified operation/event is performed on the database. You can also use pythonic syntax to make some operations: - Dropping a collection ```python del database.account # or del database["account"] # will drop (delete) the "account" collection ``` ### Using collections A "collection" is what holds documents in MongoDB. To access documents from the collection, all you need to do is access its name as an attribute or an item: ```python collection.document_id # or collection["document_id"] ``` In both case, this will return the same YunoCollection object. The `collection["document_id"]` syntax is especially useful if you use a document with the _id of a method overwritten by YunoCollection (for example `watch`, `on`, `find`, `aggregate`, etc.). You can find a list of overwritten attributes under the `__overwritten__` attribute. `YunoCollection` is the class returned by `YunoDatabase` when querying for one. ```python # using the client variable defined before accounts = production_database.accounts # this is YunoCollection object ``` You can define your own collections to type hint them (for the same reasons as before) ```python from bson import ObjectId from yuno import YunoClient, YunoDatabase, YunoCollection, YunoDict class MyCollection(YunoCollection): special_document: YunoDict # you will also be able to create your own documents class MyDatabase(YunoDatabase): accounts: MyCollection class MyClient(YunoClient): production: MyDatabase client = MyClient("mongodb+srv://anise:[email protected]/production") production_database = client.production accounts = production_database.accounts accounts.special_document # this is a YunoDict object ``` There is a special `__type__` attribute which is used to define the default type of the documents in the collection. This is especially useful if all of the documents in the collection share the same schema. You can use type hints to define the schema of special documents (a document which gives global information about the collection for example). It has serveral other methods, which are picked and adapted from the original PyMongo `MongoClient`. > Examples - `count` is used to count the number of documents matching the given filter - `find` is used to find documents matching the given filter - `index` creates a new index on the collection - `aggregate` returns an aggregation of documents following the given pipeline - `watch` returns a cursor to watch the database for changes and events. - `on` will register a callback function which will be called when the specified operation/event is performed on the database. You can also use pythonic syntax to make some operations: - Deleting a document ```python del collection.special_document # or del collection["special_document"] # will delete the "special_document" document ``` - Set a document (create or replace) ```python collection.special_document = {"_id": "special_document", "name": "Special document"} # or collection["special_document"] = {"_id": "special_document", "name": "Special document"} # will replace the "special_document" document with the one defined above ``` - Verify if the given document exists ```python "special_document" in collection # will return True if the document (with _id == "special_document") exists ``` ### Using objects An "object" is what represents any object in a document, or even the document itself. To access objects from another object (the highest hierarchy parent object being the document), all you need to do is access its name as an attribute or an item: ```python document.object_name # or document["object_name"] ``` In both case, this will return the same YunoObject object. The `document["object_name"]` syntax is especially useful if you use an object with its name being of a method overwritten by YunoObject (for example `watch`, `on`, `reload`, `delete`, etc.). You can find a list of overwritten attributes under the `__overwritten__` attribute. `YunoObject` is the class returned by `YunoCollection` when querying for one. ```python # using the client variable defined before document = accounts.special_document # this is YunoObject object ``` You can define your own objects to type hint them (for the same reasons as before) ```python from yuno import YunoClient, YunoDatabase, YunoCollection, YunoDict class CustomObject(YunoDict): hello: str = "world" do_not_exist: str = "this does not exist" # its default value if not found in db class CustomDocument(YunoDict): __lazy__ = ["hello"] # lazy loaded attribute hello: str world: str = "heyhey" a: CustomObject # nested object ^^ class SpecialDocument(YunoDict): __lazy__ = ["specialAttributes"] specialAttributes: list[str] version: str class CustomCollection(YunoCollection): __type__ = CustomDocument # the default type of document in the collection special: SpecialDocument # a special document type class CustomDatabase(YunoDatabase): __yuno_test__: CustomCollection class CustomClient(YunoClient): test_database: CustomDatabase client = CustomClient("mongodb+srv://anise:[email protected]/production") test_database = client.test_database test_collection = test_database.__yuno_test__ special_doc = test_collection.special special_doc # this is a SpecialDocument object document = test_collection.any_document document # this is a CustomDocument object document.hello # this is a str object, but lazy loaded (not loaded until needed) document.a # this is CustomObject object document.a.hello # this is a str document.a.do_not_exist # this is a str (and if it's not found in the db, it will be the value given by default "this does not exist") ``` There is a special `__lazy__` attribute which is used to define attributes which won't be loaded until needed. This is especially useful for attributes which are expensive to load or not needed in normal circumstances. You can use type hints to define the schema of some attributes. Objects acts as regular python objects. For example, a YunoDict object can be used as a regular python dict: ```python object # this is a YunoDict object object.get("key") # this is a str object.pop("key") # remove the key from the object object.items() # this is a list of tuples object.keys() # this is a list of str ... for key, value in object.items(): print(key, value) del object["key"] ``` and a YunoList object can be used as a regular python list: ```python object # this is a YunoList object object.append("value") # add a value to the list object.pop() # remove the last value from the list object.extend(["value1", "value2"]) # add multiple values to the list object.index("value") # return the index of the value in the list object.insert(0, "value") # insert a value at the beginning of the list object.remove("value") # remove the first value from the list object.reverse() # reverse the list object.sort() # sort the list ... for value in object: print(value) ``` Some methods don't come from regular Python data types, but are specific to YunoObjects: > Examples - `delete` deletes the current object from the database - `reload` reloads the current object from the database (replaces the current object with the one from the database) - `watch` returns a cursor to watch the database for changes and events. - `on` will register a callback function which will be called when the specified operation/event is performed on the object. Instead of the `reload` method, you also have a `__realtime__` attribute which you can set to `True` if you want the object to follow the updates on the database (you will have an object which is always up to date). ```python document # this is a YunoObject (YunoDict, YunoList, etc.) object document.__realtime__ = True # this will make the object follow the updates on the database class CustomObject(YunoDict): __realtime__ = True hello: str = "world" class CustomCollection(YunoCollection): __type__ = CustomObject # any object coming from the CustomCollection collection will be a CustomObject object and will be a "realtime" object, following the updates on the database ``` You can also use pythonic syntax to make some operations: - Deleting a document ```python del object.key # or del object["key"] # will delete the "key" attribute from the object ``` - Set an attribute (create or replace) ```python object.key = {"hello": "world"} # or object["key"] = {"hello": "world"} # will replace the "key" attribute with the one defined above ``` - Verify if the given document exists ```python "key" in object # will return True if the attribute exists ``` ## Security package Yuno being a framework, it also provides a set of tools to help you secure your data and logins for your users. They are all located under `yuno.security`. ### Encrypt Encrypt is a module to encrypt your data using AES. The key can be managed by the database and the token is made recognizable by the given prefix. #### Usage ##### Encrypting ```python >>> from yuno.security.encrypt import AES >>> encryption = AES(<your key>) >>> encryption.encrypt("hello world") 'yuno+312e302e30,1f1d5944d37904e6fe0d129efc11207c,cbb99af1cfb54e08b31d4e,f4876580de57a521791bc0cc527c85cc' ``` You can also use your database to automatically create and store the key. ```python >>> client = YunoClient(...) >>> encryption = AES(key=client) # the key will be randomly generated and stored in the database to be retrieved automatically when needed >>> encryption.encrypt("hello world") 'yuno+312e302e30,1f1d5944d37904e6fe0d129efc11207c,cbb99af1cfb54e08b31d4e,f4876580de57a521791bc0cc527c85cc' ``` ##### Decrypting ```python >>> encryption.decrypt("yuno+312e302e30,1f1d5944d37904e6fe0d129efc11207c,cbb99af1cfb54e08b31d4e,f4876580de57a521791bc0cc527c85cc") 'hello world' ``` #### Encryption Schema ![Yuno AES Encryption Schema](./docs/yuno_aes_encryption_schema.png) ### Hash You can also hash data and passwords using Yuno This is all located inside `yuno.security.hash`. #### Data The data hasher will use SHA-256 to hash your data. Create a `Hasher` instance. Four methods are available: - `hash`: Which will automatically detect which method to use. - `hash_string`: To hash a string - `hash_bytes`: To hash a bytes object - `hash_buffer`: To hash an IO buffer (file for example). #### Password Yuno uses Argon2id, one of the strongest password hashing algorithms, to hash passwords. You can use it by creating an instance of `PasswordHasher`. When initializing the PasswordHasher, you will need to pass a `pepper`, a kind of system key, to alter the given passwords and make them unique to the server. The `pepper` parameter can also be a database object, in which case a random key will be generated and stored inside the database. #### Usage ##### Hashing ```python >>> from yuno.security.hash import PasswordHasher >>> hasher = PasswordHasher(pepper="my_pepper") >>> hasher.hash("my_password") '$argon2id$v=19$m=102400,t=2,p=8$YKj47J7lty47hXrsgIwq0A$XWtTO+CtuSvEWrVph9ZrNQ' ``` The hashed password follows the following schema: ``` PEPPER + PASSWORD + SALT(*) ``` > (*) If provided when hashing, it's a per-password bias to make the password unique to an account for example. ```python hasher.hash("my_password", salt="my_salt") ``` > the SALT can be for example an account ID ##### Verifying Two methods are provided to check if the given password is correct: ```python >>> hasher.verify(password="my_password", hashed="$argon2id$v=19$m=102400,t=2,p=8$YKj47J7lty47hXrsgIwq0A$XWtTO+CtuSvEWrVph9ZrNQ", salt="my_salt") '$argon2id$v=19$m=102400,t=2,p=8$YKj47J7lty47hXrsgIwq0A$XWtTO+CtuSvEWrVph9ZrNQ' ``` This function checks if the given password matches the given hashed password and returns the hashed password if it matches. This returned password can also be slightly different from the original hash because it will sometimes rehash it so make sure to update the hash password with the new one in the database. ```python >>> hasher.is_equal(password="my_password", hashed="$argon2id$v=19$m=102400,t=2,p=8$YKj47J7lty47hXrsgIwq0A$XWtTO+CtuSvEWrVph9ZrNQ", salt="my_salt") True ``` Does basically the same thing as before but will do no verification, rehashing, whatsoever and will return `True` or `False` instead of raising an exception if the password don't match. ### Tokens Finally, Yuno can also manage JWT Tokens. A JWT is basically a JSON object encoded which is base64 encoded and signed with a secret key. This way, anyone can read its content but nobody can modify it without the key. This is why Yuno also gives you the option to pass a `yuno.security.encrypt.AES` instance to encrypt the tokens with AES and make them unreadable to anyone without the key. #### Usage When initializing the `TokenManager`, you will need to pass a `key` which is the secret key used to sign the tokens. This can also be a database object, in which case the key will be generated and stored inside the database. You can also provide a `sign` parameter, which will further sign the token from within the its content by adding to each token a random signature. ##### Generating ```python >>> from yuno.security.token import TokenManager >>> token_manager = TokenManager(key="my_secret_key") >>> token_manager.generate(user="id-123", username="username-123", roles=["admin", "user"]) # and any extra data 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NDYwNDEwNDcsImV4cCI6MTY0NjEyNzQ0NywidXNlciI6ImlkLTEyMyIsInVzZXJuYW1lIjoidXNlcm5hbWUtMTIzIiwicm9sZXMiOlsiYWRtaW4iLCJ1c2VyIl19.2ddAuZU7ozW9_F2dz9JKZbxdsNZlFbkjm5WYiuJVuUo' ``` > with encryption ```python >>> from yuno.security.encrypt import AES >>> aes = AES() >>> token_manager.generate(user="id-123", encryption=aes) 'yuno+312e302e30,667dfc91d461177e673582969809d4a8,fdf3e9a34532ca63389a15bcae8d7c0373221d12e617b56a9136b1d9288f1f2da3020390c5657451357ab73607fc2040a87f4194b1abd84e8b6e9767e2ffc04ae5f70e2869c60138f8a0922f2e2f9b31f6e0913bb6b2b3e7e7b6679e55c865a4a9598016fc713e6eb48353cc61bc9954c897794ff4f29f50e0d2282a930e26b7ee7bb547428bbedef74e88a4f827eeab5564c883b7,82beee1f51fc1c1de408cc4a49c15f13' ``` ##### Decoding ```python >>> token_manager.decode("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NDYwNDEwNDcsImV4cCI6MTY0NjEyNzQ0NywidXNlciI6ImlkLTEyMyIsInVzZXJuYW1lIjoidXNlcm5hbWUtMTIzIiwicm9sZXMiOlsiYWRtaW4iLCJ1c2VyIl19.2ddAuZU7ozW9_F2dz9JKZbxdsNZlFbkjm5WYiuJVuUo") {'iat': 1646037825, 'exp': 1646124194, 'user': 'id-123', 'username': 'username-123', 'roles': ['admin', 'user']} ``` > with encryption ```python >>> token_manager.decode("yuno+312e302e30,667dfc91d461177e673582969809d4a8,fdf3e9a34532ca63389a15bcae8d7c0373221d12e617b56a9136b1d9288f1f2da3020390c5657451357ab73607fc2040a87f4194b1abd84e8b6e9767e2ffc04ae5f70e2869c60138f8a0922f2e2f9b31f6e0913bb6b2b3e7e7b6679e55c865a4a9598016fc713e6eb48353cc61bc9954c897794ff4f29f50e0d2282a930e26b7ee7bb547428bbedef74e88a4f827eeab5564c883b7,82beee1f51fc1c1de408cc4a49c15f13") {'iat': 1646041175, 'exp': 1646127575, 'user': 'id-123'} ``` > When using the `sign` parameter, an extra signature will be added to the token. ```python >>> token_manager = TokenManager("my_key", sign="my_sign") >>> token_manager.generate(sub="id-123", username="username-123", roles=["admin", "user"]) 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NDYwNDMwOTgsImV4cCI6MTY0NjEyOTQ5OCwidXNlciI6ImlkLTEyMyIsInJhbmQiOiI1N2IyZmVhODNlNjE1M2ZjIiwic2lnbiI6Ijg5MjQyZTdlOWNhMzAwMGU4M2NiZWUxMTQxZWQ4MTFhNGQ3M2NkNTliYTdkODE5ZjVkOTg2YzEzYzg5OGNjMzIiLCJ1c2VybmFtZSI6InVzZXJuYW1lLTEyMyIsInJvbGVzIjpbImFkbWluIiwidXNlciJdfQ.t0bL6_cqpZOeY2oJoBURSMhvagjRT3b_KlCBTFjFduI' >>> token_manager.decode('eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NDYwNDMwOTgsImV4cCI6MTY0NjEyOTQ5OCwidXNlciI6ImlkLTEyMyIsInJhbmQiOiI1N2IyZmVhODNlNjE1M2ZjIiwic2lnbiI6Ijg5MjQyZTdlOWNhMzAwMGU4M2NiZWUxMTQxZWQ4MTFhNGQ3M2NkNTliYTdkODE5ZjVkOTg2YzEzYzg5OGNjMzIiLCJ1c2VybmFtZSI6InVzZXJuYW1lLTEyMyIsInJvbGVzIjpbImFkbWluIiwidXNlciJdfQ.t0bL6_cqpZOeY2oJoBURSMhvagjRT3b_KlCBTFjFduI') {'iat': 1646043098, 'exp': 1646129498, 'sub': 'id-123', 'rand': '57b2fea83e6153fc', 'sign': '89242e7e9ca3000e83cbee1141ed811a4d73cd59ba7d819f5d986c13c898cc32', 'username': 'username-123', 'roles': ['admin', 'user']} ``` Notice that a `rand` and `sign` fields are added to the token. The `rand` field is random data as hex generated to be used in the `sign` field. The `sign` field is the signature of the token. It is a SHA-256 hashed concatenation of the `rand` field and the `sign` provided to the token manager. ### Considerations The goal here is to increase the number of keys and biases to make cracking the tokens and hashes way harder to any attacker. ![Yuno Security Layers](./docs/yuno_security_layers.png) As you can see, the JWT has the most layers because it is exposed to the public. You should protect your databases and APIs and try to use some key rotation mechanism for maximum security. ## How it works Yuno works on top of PyMongo to make all of the operations to MongoDB. It also uses PyJWT for the JWT encoding and decoding, Argon2 for the hashing and encryption of the passwords, and PyCryptodome for the AES encryption. ## Deployment This module is currently in development and might contain bugs. Feel free to use it in production if you feel like it is suitable for your production even if you may encounter issues. ## Contributing Pull requests are welcome. For major changes, please open a discussion first to discuss what you would like to change. Please make sure to update the tests as appropriate. ## Built With - [PyMongo](https://docs.mongodb.com/drivers/pymongo/) - To connect to MongoDB databases and make operations - [psutil](https://github.com/giampaolo/psutil) - For cross-platform process management - [PyYAML](https://github.com/yaml/pyyaml) - To parse YAML files (MongoDB configuration files) - [argon2-cffi](https://github.com/hynek/argon2-cffi) - To hash and encrypt passwords with Argon2id - [PyJWT](https://github.com/jpadilla/pyjwt) - To encode and decode JWT tokens - [PyCryptodome](https://github.com/Legrandin/pycryptodome/) - To AES encrypt and decrypt data ## Authors - **Anime no Sekai** - *Initial work* - [Animenosekai](https://github.com/Animenosekai) ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
yuno
/yuno-1.1.tar.gz/yuno-1.1/README.md
README.md
YUNOMI: Y U NO MEASURE IT ========================= .. image:: https://badge.fury.io/py/yunomi.png :target: http://badge.fury.io/py/yunomi .. image:: https://secure.travis-ci.org/dreid/yunomi.png?branch=master :target: http://travis-ci.org/dreid/yunomi As in: It has performance implications, Y U NO MEASURE IT!? Yunomi provides insights to the internal behavior of an application, providing useful statistics and metrics on selected portions of your code. It’s a Python port of the core portion of a `Java Metrics library by Coda Hale <http://metrics.codahale.com/>`_. Stop guessing, start measuring: .. code-block:: bash $ pip install yunomi Core Features ------------- Counter +++++++ Simple interface to increment and decrement a value. For example, this can be used to measure the total number of jobs sent to the queue, as well as the pending (not yet complete) number of jobs in the queue. Simply increment the counter when an operation starts and decrement it when it completes. Meter +++++ Measures the rate of events over time. Useful to track how often a certain portion of your application gets requests so you can set resources accordingly. Tracks the mean rate (the overall rate since the meter was reset) and the rate statistically significant regarding only events that have happened in the last 1, 5, and 15 minutes (Exponentially weighted moving average). Histogram +++++++++ Measures the statistical distribution of values in a data stream. Keeps track of minimum, maximum, mean, standard deviation, etc. It also measures median, 75th, 90th, 95th, 98th, 99th, and 99.9th percentiles. An example use case would be for looking at the number of daily logins for 99 percent of your days, ignoring outliers. Timer +++++ A useful combination of the Meter and the Histogram letting you measure the rate that a portion of code is called and a distribution of the duration of an operation. You can see, for example, how often your code hits the database and how long those operations tend to take. Examples -------- Decorators ++++++++++ The simplest and easiest way to use the yunomi library. Counter ^^^^^^^ You can use the `count_calls` decorator to count the number of times a function is called. .. code-block:: pycon >>> from yunomi import counter, count_calls >>> @count_calls ... def test(): ... pass ... >>> for i in xrange(10): ... test() ... >>> print counter("test_calls").get_count() 10 Timer ^^^^^ You can use the `time_calls` decorator to time the execution of a function and get distributtion data from it. .. code-block:: pycon >>> import time >>> from yunomi import timer, time_calls >>> @time_calls ... def test(): ... time.sleep(0.1) ... >>> for i in xrange(10): ... test() ... >>> print timer("test_calls").get_mean() 0.100820207596 Requirements ------------ Yunomi has no external dependencies and runs on PyPy and Python 2.6, 2.7, and 3.3.
yunomi
/yunomi-0.3.0.tar.gz/yunomi-0.3.0/README.rst
README.rst
from json import dumps from logging import Formatter, getLogger, StreamHandler, DEBUG, INFO, WARNING from os import getenv from dotenv import load_dotenv load_dotenv() _LOG_LEVEL = getenv('LOG_LEVEL', 'info') _DEFAULT_FOMATTER = {"timestamp": "asctime", "level": "levelname", "filename": "filename", "module": "module", "line": "lineno", "message": "message"} class JsonFormatter(Formatter): """ Formatter that outputs JSON strings after parsing the LogRecord. @param dict fmt_dict: Key: logging format attribute pairs. Defaults to {"message": "message"}. @param str time_format: time.strftime() format string. Default: "%Y-%m-%dT%H:%M:%S" @param str msec_format: Microsecond formatting. Appended at the end. Default: "%s.%03dZ" """ def __init__(self, fmt_dict: dict = None, time_format: str = "%Y-%m-%dT%H:%M:%S", msec_format: str = "%s.%03dZ"): self.fmt_dict = fmt_dict if fmt_dict is not None else { "message": "message"} self.default_time_format = time_format self.default_msec_format = msec_format self.datefmt = None def usesTime(self) -> bool: """ Overwritten to look for the attribute in the format dict values instead of the fmt string. """ return "asctime" in self.fmt_dict.values() def formatMessage(self, record) -> dict: """ Overwritten to return a dictionary of the relevant LogRecord attributes instead of a string. KeyError is raised if an unknown attribute is provided in the fmt_dict. """ return {fmt_key: record.__dict__[fmt_val] for fmt_key, fmt_val in self.fmt_dict.items()} def format(self, record) -> str: """ Mostly the same as the parent's class method, the difference being that a dict is manipulated and dumped as JSON instead of a string. """ record.message = record.getMessage() if self.usesTime(): record.asctime = self.formatTime(record, self.datefmt) message_dict = self.formatMessage(record) if record.exc_info: # Cache the traceback text to avoid converting it multiple times # (it's constant anyway) if not record.exc_text: record.exc_text = self.formatException(record.exc_info) if record.exc_text: message_dict["traceback"] = record.exc_text if record.stack_info: message_dict["stack"] = self.formatStack(record.stack_info) return dumps(message_dict, default=str) def init(module, formatter: dict = _DEFAULT_FOMATTER): logger = getLogger(module) if _LOG_LEVEL == "debug": logger.setLevel(DEBUG) elif _LOG_LEVEL == "info": logger.setLevel(INFO) else: logger.setLevel(WARNING) # create formatter json_formatter = JsonFormatter(formatter) stream_handler = StreamHandler() stream_handler.setFormatter(json_formatter) logger.addHandler(stream_handler) return logger
yunopyutils
/yunopyutils-1.0.0a0.tar.gz/yunopyutils-1.0.0a0/src/yunolibs/logger/create_log.py
create_log.py
yunpian-python-sdk ================== `云片 <https://www.yunpian.com/>`__ SDK 快速开始 -------- - 安装SDK .. code:: python pip install yunpian-python-sdk **注**: master是最新稳定版,发布版本见\ `PyPI <https://pypi.python.org/pypi>`__ - 使用YunpianClient .. code:: python from yunpian_python_sdk.model import constant as YC from yunpian_python_sdk.ypclient import YunpianClient # 初始化client,apikey作为所有请求的默认值 clnt = YunpianClient('apikey') param = {YC.MOBILE:'18616020***',YC.TEXT:'【云片网】您的验证码是1234'} r = clnt.sms().single_send(param) # 获取返回结果, 返回码:r.code(),返回码描述:r.msg(),API结果:r.data(),其他说明:r.detail(),调用异常:r.exception() # 短信:clnt.sms() 账户:clnt.user() 签名:clnt.sign() 模版:clnt.tpl() 语音:clnt.voice() 流量:clnt.flow() **注**: v1.0.0不兼容之前版本\ `0.0.8 <https://github.com/yunpian/yunpian-python-sdk/releases/tag/0.0.8>`__ 配置说明 (默认配置就行) ----------------------- - 构造器配置 - ``YunpianClient('apikey')`` - ``YunpianClient('apikey',conf)``, conf字典key详见model.constant.YP\_\* - apikey的优先级:接口的param[APIKEY] > 构造器的apikey > 构造器的conf[YP\_APIKEY] 源码说明 -------- - 接口参数的apikey可以不传,因为所有接口默认传入`YunpianClient`构造时的apikey - 接口默认使用v2版本,可以在调用时指定版本,如\ ``clnt.sms().version('v1').single_send(param)`` - API单元测试目录tests,支持tox - 分支说明: master是最新发布版本,develop是待发布的分支(开源贡献可以pull request到develop分支) 联系我们 -------- `云片支持 QQ <https://static.meiqia.com/dist/standalone.html?eid=30951&groupid=0d20ab23ab4702939552b3f81978012f&metadata=%7B%22name%22:%22github%22%7D>`__ SDK开源QQ群: 106469530 .. image:: docs/sdk_qq.jpeg :height: 60px :width: 60px :scale: 15% 文档链接 -------- - `API文档 <https://www.yunpian.com/api2.0/guide.html>`__ 其他SDK ------- - https://github.com/yunpian/sms/tree/master/yunpian/python/ypclient 支持py2/3
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/README.rst
README.rst
yunpian-python-sdk ================================ [云片](https://www.yunpian.com/) SDK ## 快速开始 - 安装SDK ```python pip install yunpian-python-sdk ``` **注**: master是最新稳定版,发布版本见[PyPI](https://pypi.python.org/pypi) - 使用YunpianClient ```python from yunpian_python_sdk.model import constant as YC from yunpian_python_sdk.ypclient import YunpianClient #初始化client,apikey作为所有请求的默认值 clnt = YunpianClient('apikey') param = {YC.MOBILE:'18616020***',YC.TEXT:'【云片网】您的验证码是1234'} r = clnt.sms().single_send(param) #获取返回结果, 返回码:r.code(), 返回码描述:r.msg(),API结果:r.data(),其他说明:r.detail(),调用异常:r.exception() #短信:clnt.sms() 账户:clnt.user() 签名:clnt.sign() 模版:clnt.tpl() 语音:clnt.voice() 流量:clnt.flow() ``` **注**: v1.0.0不兼容之前版本[0.0.8](https://github.com/yunpian/yunpian-python-sdk/releases/tag/0.0.8) ## 配置说明 (默认配置就行) - 构造器配置 - `YunpianClient('apikey')` - `YunpianClient('apikey',conf)`, conf字典key详见model.constant.YP_* - apikey的优先级:接口的param[APIKEY] > 构造器的apikey > 构造器的conf[YP_APIKEY] ## 源码说明 - 接口方法参数的apikey默认传入`YunpianClient`构造时的apikey - 接口默认使用v2版本,可以在调用时指定版本,如`clnt.sms().version('v1').single_send(param)` - API单元测试目录tests,支持tox.ini - 分支说明: master是最新发布版本,develop是待发布的分支(开源贡献可以pull request到develop分支) ## 联系我们 [云片支持 QQ](https://static.meiqia.com/dist/standalone.html?eid=30951&groupid=0d20ab23ab4702939552b3f81978012f&metadata={"name":"github"}) SDK开源QQ群: 106469530 <img src="docs/sdk_qq.jpeg" width="15%" alt="SDK开源QQ群"/> ## 文档链接 - [API文档](https://www.yunpian.com/api2.0/guide.html) ## 其他SDK - https://github.com/yunpian/sms/tree/master/yunpian/python/ypclient 支持py2/3
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/docs/README.md
README.md
import json import requests from .api import flow, sign, sms, tpl, user, voice from .model.constant import (CHARSET_UTF8, YP_APIKEY, HTTP_CONN_TIMEOUT, HTTP_SO_TIMEOUT) class _YunpianConf(object): '''SDK Configuration''' # yunpian default config YP_CONF = { 'http.conn.timeout':'10', 'http.so.timeout':'30', 'http.charset':'utf-8', 'yp.version':'v2', 'yp.user.host':'https://sms.yunpian.com', 'yp.sign.host':'https://sms.yunpian.com', 'yp.tpl.host':'https://sms.yunpian.com', 'yp.sms.host':'https://sms.yunpian.com', 'yp.voice.host':'https://voice.yunpian.com', 'yp.flow.host':'https://flow.yunpian.com', 'yp.call.host':'https://call.yunpian.com' } def __init__(self): # load yunpian.ini # import configparser # from os import path # config = configparser.ConfigParser() # config.read(path.join(path.abspath(path.dirname(__file__)), 'yunpian.ini'), CHARSET_UTF8) # self.__conf = {} # for section in config.sections(): # for (key, val) in config.items(section): # self.__conf[key] = val self.__conf = {} def custom_apikey(self, apikey): '''custom apikey''' if apikey: self.__conf[YP_APIKEY] = apikey return self def custom_conf(self, conf): '''custom apikey and http parameters''' if conf: for (key, val) in conf.items(): self.__conf[key] = val return self def apikey(self): ''' Returns: apikey: apikey ''' return self.__conf[YP_APIKEY] def conf(self, key): '''get config''' return self.__conf[key] if key in self.__conf else _YunpianConf.YP_CONF.get(key) class _ApiFactory(object): '''Yunpian APIs Factory''' def __init__(self, clnt): assert clnt, "YunpianClient is None" self._clnt = clnt def api(self, name): '''return special API by package's name''' assert name, 'name is none' if flow.__name__ == name: api = flow.FlowApi() elif sign.__name__ == name: api = sign.SignApi() elif sms.__name__ == name: api = sms.SmsApi() elif tpl.__name__ == name: api = tpl.TplApi() elif user.__name__ == name: api = user.UserApi() elif voice.__name__ == name: api = voice.VoiceApi() assert api, "not found api-" + name api._init(self._clnt) return api class YunpianClient(object): ''' Support Yunpian rest APIs, both v1|v2 interfaces. https://www.yunpian.com/api2.0/api-domestic.html TODO(dzh) Attributes: _ypconf: YunpianClient's configuration _api: An ApiFactory instance ''' def __init__(self, apikey=None, conf={}): ''' Args: apikey: apikey conf: custom config to initialize ypconf,keys like yp.* ''' if apikey is None and YP_APIKEY in conf: apikey = conf[YP_APIKEY] assert apikey, "apikey is nil" self._ypconf = _YunpianConf().custom_conf(conf).custom_apikey(apikey) self._api = _ApiFactory(self) def flow(self): '''flow api Returns: api.flow.FlowApi ''' return self._api.api(flow.__name__) def sign(self): '''sign api Returns: api.sign.SignApi ''' return self._api.api(sign.__name__) def sms(self): '''sms api Returns: api.sms.SmsApi ''' return self._api.api(sms.__name__) def tpl(self): '''tpl api Returns: api.tpl.TplApi ''' return self._api.api(tpl.__name__) def user(self): '''user api Returns: api.user.UserApi ''' return self._api.api(user.__name__) def voice(self): '''voice api Returns: api.voice.VoiceApi ''' return self._api.api(voice.__name__) def conf(self, key=None, defval=None): '''return YunpianConf if key=None, else return value in YunpianConf''' if key is None: return self._ypconf val = self._ypconf.conf(key) return defval if val is None else val def apikey(self): return self._ypconf.apikey() def post(self, url, data, charset=CHARSET_UTF8, headers={}): '''response json text''' if 'Api-Lang' not in headers: headers['Api-Lang'] = 'python' if 'Content-Type' not in headers: headers['Content-Type'] = "application/x-www-form-urlencoded;charset=" + charset rsp = requests.post(url, data, headers=headers, timeout=(int(self.conf(HTTP_CONN_TIMEOUT, '10')), int(self.conf(HTTP_SO_TIMEOUT, '30')))) return json.loads(rsp.text) def urlEncodeAndJoin(self, seq, sepr=','): '''sepr.join(urlencode(seq)) Args: seq: string list to be urlencoded sepr: join seq with sepr Returns: str ''' try: from urllib.parse import quote_plus as encode return sepr.join([encode(x, encoding=CHARSET_UTF8) for x in seq]) except ImportError: from urllib import quote as encode return sepr.join([i for i in map(lambda x: encode(x), seq)])
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/yunpian_python_sdk/ypclient.py
ypclient.py
from ..model.constant import (APIKEY, YP_FLOW_HOST, VERSION_V1, FLOW_PACKAGE, VERSION_V2, MOBILE, RESULT, FLOW_STATUS, SN) from .ypapi import YunpianApi, CommonResultHandler class FlowApi(YunpianApi): '''流量接口 https://www.yunpian.com/api2.0/api-flow.html''' def _init(self, clnt): super(FlowApi, self)._init(clnt) self.host(clnt.conf(YP_FLOW_HOST, 'https://flow.yunpian.com')) def get_package(self, param=None, must=[APIKEY]): '''查询流量包 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 carrier String 否 运营商ID 传入该参数则获取指定运营商的流量包, 否则获取所有运营商的流量包 移动:10086 联通:10010 电信:10000 Args: param: Results: Result ''' param = {} if param is None else param r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[FLOW_PACKAGE] if FLOW_PACKAGE in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('get_package.json').post(param, h, r) def recharge(self, param, must=[APIKEY, MOBILE, SN]): '''充值流量 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号(仅支持大陆号码) 15205201314 sn String 是 流量包的唯一ID 点击查看 1008601 callback_url String 否 本条流量充值的状态报告推送地址 http://your_receive_url_address encrypt String 否 加密方式 使用加密 tea (不再使用) _sign String 否 签名字段 参考使用加密 393d079e0a00912335adfe46f4a2e10f (不再使用) Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[RESULT] if RESULT in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('recharge.json').post(param, h, r) def pull_status(self, param=None, must=[APIKEY]): '''获取状态报告 参数名 是否必须 描述 示例 apikey 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 page_size 否 每页个数,最大100个,默认20个 20 Args: param: Results: Result ''' param = {} if param is None else param r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[FLOW_STATUS] if FLOW_STATUS in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('pull_status.json').post(param, h, r)
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/yunpian_python_sdk/api/flow.py
flow.py
from ..model.constant import (YP_TPL_HOST, APIKEY, VERSION_V2, VERSION_V1, TEMPLATE, TPL_CONTENT, TPL_ID) from .ypapi import YunpianApi, CommonResultHandler class TplApi(YunpianApi): '''模版接口 https://www.yunpian.com/api2.0/tpl.html''' def _init(self, clnt): super(TplApi, self)._init(clnt) self.host(clnt.conf(YP_TPL_HOST, 'https://sms.yunpian.com')) def get_default(self, param=None, must=[APIKEY]): '''取默认模板 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 tpl_id Long 否 模板id,64位长整形。指定id时返回id对应的默认 模板。未指定时返回所有默认模板 1 Args: param: Results: Result ''' param = {} if param is None else param r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[TEMPLATE] if TEMPLATE in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('get_default.json').post(param, h, r) def get(self, param=None, must=[APIKEY]): '''取模板 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 tpl_id Long 否 模板id,64位长整形。指定id时返回id对应的 模板。未指定时返回所有模板 1 Args: param: Results: Result ''' param = {} if param is None else param r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[TEMPLATE] if TEMPLATE in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('get.json').post(param, h, r) def add(self, param, must=[APIKEY, TPL_CONTENT]): '''添加模板 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 tpl_content String 是 模板内容,必须以带符号【】的签名开头 【云片网】您的验证码是#code# notify_type Integer 否 审核结果短信通知的方式: 0表示需要通知,默认; 1表示仅审核不通过时通知; 2表示仅审核通过时通知; 3表示不需要通知 1 lang String 否 国际短信模板所需参数,模板语言:简体中文zh_cn; 英文en; 繁体中文 zh_tw; 韩文ko,日文 ja zh_cn Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp.get(TEMPLATE), VERSION_V2:rsp}[self.version()]) return self.path('add.json').post(param, h, r) def del_tpl(self, param, must=[APIKEY, TPL_ID]): '''删除模板 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 tpl_id Long 是 模板id,64位长整形 9527 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp}[self.version()]) return self.path('del.json').post(param, h, r) def update(self, param, must=[APIKEY, TPL_ID, TPL_CONTENT]): '''修改模板 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 tpl_id Long 是 模板id,64位长整形,指定id时返回id对应的模板。未指定时返回所有模板 9527 tpl_content String 是 模板id,64位长整形。指定id时返回id对应的模板。未指定时返回所有模板模板内容,必须以带符号【】的签名开头 【云片网】您的验证码是#code# notify_type Integer 否 审核结果短信通知的方式: 0表示需要通知,默认; 1表示仅审核不通过时通知; 2表示仅审核通过时通知; 3表示不需要通知 1 lang String 否 国际短信模板所需参数,模板语言:简体 中文zh_cn; 英文en; 繁体中文 zh_tw; 韩文ko,日文 ja zh_cn Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp.get(TEMPLATE), VERSION_V2:rsp[TEMPLATE] if TEMPLATE in rsp else rsp}[self.version()]) return self.path('update.json').post(param, h, r) def add_voice_notify(self, param, must=[APIKEY, TPL_CONTENT]): '''添加语音通知模版 访问方式:POST 参数: 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 tpl_content String 是 模板内容,没有签名 您的验证码是#code# notify_type Integer 否 审核结果短信通知的方式:0表示需要通知,默认;1表示仅审核不通过时通知;2表示仅审核通过时通知;3表示不需要通知 1 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp}[self.version()]) return self.path('add_voice_notify.json').post(param, h, r) def update_voice_notify(self, param, must=[APIKEY, TPL_ID, TPL_CONTENT]): '''修改语音通知模版 注意:模板成功修改之后需要重新审核才能使用!同时提醒您如果修改了变量,务必重新测试,以免替换出错! 参数: 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 tpl_id Long 是 模板id,64位长整形。指定id时返回id对应的模板。未指定时返回所有模板 9527 tpl_content String 是 模板id,64位长整形。指定id时返回id对应的模板。未指定时返回所有模板模板内容 您的验证码是#code# Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp}[self.version()]) return self.path('update_voice_notify.json').post(param, h, r)
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/yunpian_python_sdk/api/tpl.py
tpl.py
from ..model.constant import ( YP_VOICE_HOST, APIKEY, MOBILE, CODE, VERSION_V1, RESULT, VERSION_V2, VOICE_STATUS, TPL_ID, TPL_VALUE) from .ypapi import YunpianApi, CommonResultHandler class VoiceApi(YunpianApi): '''语音验证码、通知接口 https://www.yunpian.com/api2.0/voice.html''' def _init(self, clnt): super(VoiceApi, self)._init(clnt) self.host(clnt.conf(YP_VOICE_HOST, 'https://voice.yunpian.com')) def send(self, param, must=[APIKEY, MOBILE, CODE]): '''发语音验证码 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号、固话(需加区号) 15205201314 01088880000 code String 是 验证码,支持4~6位阿拉伯数字 1234 encrypt String 否 加密方式 使用加密 tea (不再使用) _sign String 否 签名字段 参考使用加密 393d079e0a00912335adfe46f4a2e10f (不再使用) callback_url String 否 本条语音验证码状态报告推送地址 http://your_receive_url_address display_num String 否 透传号码,为保证全国范围的呼通率,云片会自动选择最佳的线路,透传的主叫号码也会相应变化。 如需透传固定号码则需要单独注册报备,为了确保号码真实有效,客服将要求您使用报备的号码拨打一次客服电话 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp.get(RESULT), VERSION_V2:rsp}[self.version()]) return self.path('send.json').post(param, h, r) def pull_status(self, param=None, must=[APIKEY]): '''获取状态报告 参数名 是否必须 描述 示例 apikey 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 page_size 否 每页个数,最大100个,默认20个 20 type Integer 否 拉取类型,1-语音验证码 2-语音通知,默认type=1 1 Args: param: Results: Result ''' param = {} if param is None else param r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[VOICE_STATUS] if VOICE_STATUS in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('pull_status.json').post(param, h, r) def tpl_notify(self, param, must=[APIKEY, MOBILE, TPL_ID, TPL_VALUE]): '''发送语音通知 功能说明:通过电话直呼到用户手机(固话)播放指定模版内容的文本,默认播放1次。 特别说明:模版需要先审核通过 访问方式:POST 参数: 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号、固话(需加区号) 15205201314 01088880000 tpl_id Long 是 审核通过的模版ID 1136 tpl_value String 是 变量名和变量值对。请先对您的变量名和变量值分别进行urlencode再传递。 模板: 课程#name#在#time#开始。 最终发送结果: 课程深度学习在14:00开始。 tplvalue=urlencode("name=深度学习&time=14:00","utf-8"); callback_url String 否 本条语音验证码状态报告推送地址 http://your_receive_url_address Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp}[self.version()]) return self.path('tpl_notify.json').post(param, h, r)
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/yunpian_python_sdk/api/voice.py
voice.py
from ..model.constant import ( YP_SMS_HOST, APIKEY, MOBILE, TEXT, VERSION_V1, RESULT, VERSION_V2, SMS_STATUS, SMS_REPLY, START_TIME, END_TIME, PAGE_NUM, PAGE_SIZE, SMS, TOTAL, TPL_ID, TPL_VALUE) from .ypapi import YunpianApi, CommonResultHandler class SmsApi(YunpianApi): '''短信接口 https://www.yunpian.com/api2.0/sms.html''' def _init(self, clnt): super(SmsApi, self)._init(clnt) self.host(clnt.conf(YP_SMS_HOST, 'https://sms.yunpian.com')) def send(self, param, must=[APIKEY, MOBILE, TEXT]): '''智能匹配模板发送 only v1 deprecated 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号;发送多个手机号请以逗号分隔,一次不要超过1000个 国际短信仅支持单号码发送,国际号码需包含国际地区前缀号码,格式必须是"+"号开头("+"号需要urlencode处理,否则会出现格式错误),国际号码不以"+"开头将被认为是中国地区的号码 (针对国际短信,mobile参数会自动格式化到E.164格式,可能会造成传入mobile参数跟后续的状态报告中的号码不一致。E.164格式说明,参见: https://en.wikipedia.org/wiki/E.164) 单号码:15205201314 多号码:15205201314,15205201315 国际短信:+93701234567 text String 是 短信内容 【云片网】您的验证码是1234 extend String 否 扩展号。默认不开放,如有需要请联系客服申请 001 uid String 否 该条短信在您业务系统内的ID,比如订单号或者短信发送记录的流水号。填写后发送状态返回值内将包含这个ID 默认不开放,如有需要请联系客服申请 10001 callback_url String 否 本条短信状态报告推送地址。短信发送后将向这个地址推送短信发送报告。"后台-系统设置-数据推送与获取”可以做批量设置。如果后台已经设置地址的情况下,单次请求内也包含此参数,将以请求内的推送地址为准。 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp.get(RESULT)}[self.version()]) return self.path('send.json').post(param, h, r) def single_send(self, param, must=[APIKEY, MOBILE, TEXT]): '''单条发送 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号;仅支持单号码发送;国际号码需包含国际地区前缀号码,格式必须是"+"号开头("+"号需要urlencode处理,否则会出现格式错误),国际号码不以"+"开头将被认为是中国地区的号码 (针对国际短信,mobile参数会自动格式化到E.164格式,可能会造成传入mobile参数跟后续的状态报告中的号码不一致。E.164格式说明,参见: https://en.wikipedia.org/wiki/E.164) 国内号码:15205201314 国际号码:urlencode("+93701234567"); text String 是 短信内容 【云片网】您的验证码是1234 extend String 否 扩展号。默认不开放,如有需要请联系客服申请 001 uid String 否 该条短信在您业务系统内的ID,比如订单号或者短信发送记录的流水号。填写后发送状态返回值内将包含这个ID 默认不开放,如有需要请联系客服申请 10001 callback_url String 否 本条短信状态报告推送地址。短信发送后将向这个地址推送短信发送报告。"后台-系统设置-数据推送与获取”可以做批量设置。如果后台已经设置地址的情况下,单次请求内也包含此参数,将以请求内的推送地址为准。 http://your_receive_url_address Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp}[self.version()]) return self.path('single_send.json').post(param, h, r) def batch_send(self, param, must=[APIKEY, MOBILE, TEXT]): '''批量发送 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号;发送多个手机号请以逗号分隔,一次不要超过1000个。 单号码:15205201314 多号码:15205201314,15205201315 text String 是 短信内容 【云片网】您的验证码是1234 extend String 否 扩展号。默认不开放,如有需要请联系客服申请 001 uid String 否 该条短信在您业务系统内的ID,比如订单号或者短信发送记录的流水号。填写后发送状态返回值内将包含这个ID 默认不开放,如有需要请联系客服申请 10001 callback_url String 否 本条短信状态报告推送地址。短信发送后将向这个地址推送短信发送报告。"后台-系统设置-数据推送与获取”可以做批量设置。如果后台已经设置地址的情况下,单次请求内也包含此参数,将以请求内的推送地址为准。 http://your_receive_url_address Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp}[self.version()]) return self.path('batch_send.json').post(param, h, r) def multi_send(self, param, must=[APIKEY, MOBILE, TEXT]): '''个性化发送 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号;多个手机号请以逗号分隔,一次不要超过1000个且手机号个数必须与短信内容条数相等;不支持国际号码发送; 多号码:15205201314,15205201315 text String 是 短信内容,多个短信内容请使用UTF-8做urlencode后,使用逗号分隔,一次不要超过1000条且短信内容条数必须与手机号个数相等 内容示意:UrlEncode("【云片网】您的验证码是1234", "UTF-8") + "," + UrlEncode("【云片网】您的验证码是5678", "UTF-8") extend String 否 扩展号。默认不开放,如有需要请联系客服申请 001 uid String 否 该条短信在您业务系统内的ID,比如订单号或者短信发送记录的流水号。填写后发送状态返回值内将包含这个ID 默认不开放,如有需要请联系客服申请 10001 callback_url String 否 本条短信状态报告推送地址。短信发送后将向这个地址推送短信发送报告。"后台-系统设置-数据推送与获取”可以做批量设置。如果后台已经设置地址的情况下,单次请求内也包含此参数,将以请求内的推送地址为准。 http://your_receive_url_address Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp, VERSION_V2:rsp}[self.version()]) return self.path('multi_send.json').post(param, h, r) def pull_status(self, param=None, must=[APIKEY]): '''获取状态报告 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 page_size Integer 否 每页个数,最大100个,默认20个 20 Args: param: Results: Result ''' param = {} if param is None else param r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[SMS_STATUS] if SMS_STATUS in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('pull_status.json').post(param, h, r) def pull_reply(self, param=None, must=[APIKEY]): '''获取回复短信 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 page_size Integer 否 每页个数,最大100个,默认20个 20 Args: param: Results: Result ''' param = {} if param is None else param r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[SMS_REPLY] if SMS_REPLY in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('pull_reply.json').post(param, h, r) def get_reply(self, param, must=[APIKEY, START_TIME, END_TIME, PAGE_NUM, PAGE_SIZE]): '''查回复的短信 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 start_time String 是 短信回复开始时间 2013-08-11 00:00:00 end_time String 是 短信回复结束时间 2013-08-12 00:00:00 page_num Integer 是 页码,默认值为1 1 page_size Integer 是 每页个数,最大100个 20 mobile String 否 填写时只查该手机号的回复,不填时查所有的回复 15205201314 return_fields 否 返回字段(暂未开放 sort_fields 否 排序字段(暂未开放) 默认按提交时间降序 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[SMS_REPLY] if SMS_REPLY in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('get_reply.json').post(param, h, r) def get_black_word(self, param, must=[APIKEY, TEXT]): '''查屏蔽词 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 text String 是 要检查的短信模板或者内容 这是一条测试短信 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[RESULT] if RESULT in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('get_black_word.json').post(param, h, r) def get_record(self, param, must=[APIKEY, START_TIME, END_TIME]): '''查短信发送记录 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 否 需要查询的手机号 15205201314 start_time String 是 短信发送开始时间 2013-08-11 00:00:00 end_time String 是 短信发送结束时间 2013-08-12 00:00:00 page_num Integer 否 页码,默认值为1 1 page_size Integer 否 每页个数,最大100个 20 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[SMS] if SMS in rsp else None, VERSION_V2:rsp}[self.version()]) return self.path('get_record.json').post(param, h, r) def count(self, param, must=[APIKEY, START_TIME, END_TIME]): '''统计短信条数 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 start_time String 是 短信发送开始时间 2013-08-11 00:00:00 end_time String 是 短信发送结束时间 2013-08-12 00:00:00 mobile String 否 需要查询的手机号 15205201314 page_num Integer 否 页码,默认值为1 1 page_size Integer 否 每页个数,最大100个 20 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: int(rsp[TOTAL]) if TOTAL in rsp else 0) return self.path('count.json').post(param, h, r) def tpl_send(self, param, must=[APIKEY, MOBILE, TPL_ID, TPL_VALUE]): '''指定模板发送 only v1 deprecated 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号 15205201314 tpl_id Long 是 模板id 1 tpl_value String 是 变量名和变量值对。请先对您的变量名和变量值分别进行urlencode再传递。使用参考:代码示例。 注:变量名和变量值都不能为空 模板: 【#company#】您的验证码是#code#。 最终发送结果: 【云片网】您的验证码是1234。 tplvalue=urlencode("#code#") + "=" + urlencode("1234") + "&amp;" + urlencode("#company#") + "=" + urlencode("云片网"); 若您直接发送报文请求则使用下面这种形式 tplvalue=urlencode(urlencode("#code#") + "=" + urlencode("1234") + "&amp;" + urlencode("#company#") + "=" + urlencode("云片网")); extend String 否 扩展号。默认不开放,如有需要请联系客服申请 001 uid String 否 用户自定义唯一id。最大长度不超过256的字符串。 默认不开放,如有需要请联系客服申请 10001 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp.get(RESULT)}[self.version()]) return self.path('tpl_send.json').post(param, h, r) def tpl_single_send(self, param, must=[APIKEY, MOBILE, TPL_ID, TPL_VALUE]): '''指定模板单发 only v2 deprecated 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号(针对国际短信,mobile参数会自动格式化到E.164格式,可能会造成传入mobile参数跟后续的状态报告中的号码不一致。E.164格式说明,参见: https://en.wikipedia.org/wiki/E.164) 15205201314 tpl_id Long 是 模板id 1 tpl_value String 是 变量名和变量值对。请先对您的变量名和变量值分别进行urlencode再传递。使用参考:代码示例。 注:变量名和变量值都不能为空 模板: 【#company#】您的验证码是#code#。 最终发送结果: 【云片网】您的验证码是1234。 tplvalue=urlencode("#code#") + "=" + urlencode("1234") + "&amp;" + urlencode("#company#") + "=" + urlencode("云片网"); 若您直接发送报文请求则使用下面这种形式 tplvalue=urlencode(urlencode("#code#") + "=" + urlencode("1234") + "&amp;" + urlencode("#company#") + "=" + urlencode("云片网")); extend String 否 扩展号。默认不开放,如有需要请联系客服申请 001 uid String 否 用户自定义唯一id。最大长度不超过256的字符串。 默认不开放,如有需要请联系客服申请 10001 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp}[self.version()]) return self.path('tpl_single_send.json').post(param, h, r) def tpl_batch_send(self, param, must=[APIKEY, MOBILE, TPL_ID, TPL_VALUE]): '''指定模板群发 only v2 deprecated 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 mobile String 是 接收的手机号(针对国际短信,mobile参数会自动格式化到E.164格式,可能会造成传入mobile参数跟后续的状态报告中的号码不一致。E.164格式说明,参见: https://en.wikipedia.org/wiki/E.164) 15205201314 tpl_id Long 是 模板id 1 tpl_value String 是 变量名和变量值对。请先对您的变量名和变量值分别进行urlencode再传递。使用参考:代码示例。 注:变量名和变量值都不能为空 模板: 【#company#】您的验证码是#code#。 最终发送结果: 【云片网】您的验证码是1234。 tplvalue=urlencode("#code#") + "=" + urlencode("1234") + "&amp;" + urlencode("#company#") + "=" + urlencode("云片网"); 若您直接发送报文请求则使用下面这种形式 tplvalue=urlencode(urlencode("#code#") + "=" + urlencode("1234") + "&amp;" + urlencode("#company#") + "=" + urlencode("云片网")); extend String 否 扩展号。默认不开放,如有需要请联系客服申请 001 uid String 否 用户自定义唯一id。最大长度不超过256的字符串。 默认不开放,如有需要请联系客服申请 10001 Args: param: Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp}[self.version()]) return self.path('tpl_batch_send.json').post(param, h, r)
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/yunpian_python_sdk/api/sms.py
sms.py
from ..model.constant import (YP_SIGN_HOST, APIKEY, SIGN, VERSION_V2, OLD_SIGN) from .ypapi import YunpianApi, CommonResultHandler class SignApi(YunpianApi): '''签名接口 https://www.yunpian.com/api2.0/sign.html''' def _init(self, clnt): super(SignApi, self)._init(clnt) self.host(clnt.conf(YP_SIGN_HOST, 'https://sms.yunpian.com')) def add(self, param, must=[APIKEY, SIGN]): '''添加签名API 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 sign String 是 签名内容 云片网 notify Boolean 否 是否短信通知结果,默认true true apply_vip Boolean 否 是否申请专用通道,默认false false is_only_global Boolean 否 是否仅发国际短信,默认false false industry_type String 否 所属行业,默认“其它” 物联网 其他值例如:1. 游戏 2. 移动应用 3. 视频 4. 教育 5. IT/通信/电子服务 6. 电子商务 7. 金融 8. 网站 9. 商业服务 10. 房地产/建筑 11. 零售/租赁/贸易 12. 生产/加工/制造 13. 交通/物流 14. 文化传媒 15. 能源/电气 16. 政府企业 17. 农业 18. 物联网 19. 其它 Args: param: sign notify apply_vip is_only_global industry_type Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp[SIGN]}[self.version()]) return self.path('add.json').post(param, h, r) def update(self, param, must=[APIKEY, OLD_SIGN]): '''修改签名API 仅“审核中”或者“审核失败”的签名可以进行修改,修改后会重新提交给客服审核。 参数notify,apply_vip,is_only_global如果没有将会修改为默认值 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 old_sign String 是 完整签名内容,用于指定修改哪个签名,可以加【】也可不加 云片网 sign String 否 修改后的签名内容(如果要改签名内容) 云片网 notify Boolean 否 是否短信通知结果,无此参数默认true true apply_vip Boolean 否 是否申请专用通道,无此参数默认false false is_only_global Boolean 否 是否仅发国际短信,无此参数默认false false industry_type String 否 所属行业,默认“其它” 物联网 其他值例如:1. 游戏 2. 移动应用 3. 视频 4. 教育 5. IT/通信/电子服务 6. 电子商务 7. 金融 8. 网站 9. 商业服务 10. 房地产/建筑 11. 零售/租赁/贸易 12. 生产/加工/制造 13. 交通/物流 14. 文化传媒 15. 能源/电气 16. 政府企业 17. 农业 18. 物联网 19. 其它 Args: param: old_sign sign notify apply_vip is_only_global industry_typ Results: Result ''' r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp[SIGN]}[self.version()]) return self.path('update.json').post(param, h, r) def get(self, param=None, must=[APIKEY]): '''获取签名API 参数名 类型 是否必须 描述 示例 apikey String 是 用户唯一标识 9b11127a9701975c734b8aee81ee3526 id Long 否 签名id,暂未开放,如果传入此参数将会指定获取某个签名 9527 sign String 否 签名内容 云片网 page_num Integer 否 页码,1开始,不带或者格式错误返回全部 1 page_size Integer 否 返回条数,必须大于0,不带或者格式错误返回全部 20 Args: param: sign notify page_num page_size Results: Result ''' param = {} if param is None else param r = self.verify_param(param, must) if not r.is_succ(): return r h = CommonResultHandler(lambda rsp: {VERSION_V2:rsp[SIGN]}[self.version()]) return self.path('get.json').post(param, h, r)
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/yunpian_python_sdk/api/sign.py
sign.py
from ..model.constant import (VERSION_V2, YP_VERSION, CHARSET_UTF8, VERSION_V1, CODE, APIKEY, MSG, DETAIL, HTTP_CHARSET) from ..model.result import Result, Code class ResultHandler(object): '''interface to parse the response''' def succ(self, code, rsp, r): '''return success Result Args: code: = 0 rsp: a dict representing api's response r: Result Returns: r ''' raise NotImplementedError("implemented this") def fail(self, code, rsp, r): '''return failure Result Args: code: != 0 rsp: a dict representing api's response r: Result Returns: r ''' raise NotImplementedError("implemented this") def catch_exception(self, e, r): '''return exception Result Args: e: Error rsp: a dict representing api's response r: Result Returns: r ''' raise NotImplementedError("implemented this") class CommonResultHandler(ResultHandler): def __init__(self, func): '''return exception Result Args: version: api's version func: Result receive data by calling func(version,rsp) ''' self._func = func def succ(self, code, rsp, r): return r.code(code, True).msg(rsp[MSG] if MSG in rsp else None, True).data(self._func(rsp), True) def fail(self, code, rsp, r): return r.code(code, True).msg(rsp[MSG] if MSG in rsp else None, True).detail(rsp[DETAIL] if DETAIL in rsp else None, True) def catch_exception(self, e, r): return r.code(Code.UNKNOWN_EXCEPTION, True).exception(e, True) class YunpianApiResult(object): '''interface to retrieve the Result from the response''' def result(self, rsp, h, r): ''' Args: rsp: a dict representing api's response h: ResultHandler r: Result Returns: r Result ''' raise NotImplementedError("implemented this") def code(self, rsp, version=VERSION_V2): ''' Args: rsp: a dict object representing api's response version: api's version Returns: api's int code ''' raise NotImplementedError("implemented this") class YunpianApi(YunpianApiResult): '''basic API object''' def _init(self, clnt): '''initialize api by YunpianClient''' assert clnt, "clnt is None" self._clnt = clnt self._apikey = clnt.apikey() self._version = clnt.conf(YP_VERSION, defval=VERSION_V2) self._charset = clnt.conf(HTTP_CHARSET, defval=CHARSET_UTF8) self._name = self.__class__.__module__.split('.')[-1] def client(self, clnt=None): if clnt: self._clnt = clnt return self return self._clnt def host(self, host=None): if host: self._host = host return self return self._host def version(self, version=None): if version: self._version = version return self return self._version def path(self, path=None): if path: self._path = path return self return self._path def apikey(self, apikey=None): if apikey: self._apikey = apikey return self return self._apikey def charset(self, charset=None): if charset: self._charset = charset return self return self._charset def name(self, name=None): '''api name, default is module.__name__''' if name: self._name = name return self return self._name def uri(self): return '{}/{}/{}/{}'.format(self.host(), self.version(), self.name(), self.path()) def post(self, param, h, r): ''' Args: param: request parameters h: ResultHandler r: YunpianApiResult ''' try: rsp = self.client().post(self.uri(), param) # print(rsp) return self.result(rsp, h, r) except ValueError as err: return h.catch_exception(err, r) def result(self, rsp, h, r): code = self.code(rsp, self.version()) return h.succ(code, rsp, r) if code == Code.SUCC else h.fail(code, rsp, r) def code(self, rsp, version=VERSION_V2): if rsp is None: return Code.SUCC code = Code.UNKNOWN_EXCEPTION if version == VERSION_V1: code = int(rsp[CODE]) if CODE in rsp else Code.UNKNOWN_EXCEPTION elif version == VERSION_V2: code = int(rsp[CODE]) if CODE in rsp else Code.SUCC return code def verify_param(self, param, must=[], r=None): '''return Code.ARGUMENT_MISSING if every key in must not found in param''' if APIKEY not in param: param[APIKEY] = self.apikey() r = Result() if r is None else r for p in must: if p not in param: r.code(Code.ARGUMENT_MISSING).detail('missing-' + p) break return r
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/yunpian_python_sdk/api/ypapi.py
ypapi.py
# ************************** http ************************************ HTTP_CONN_TIMEOUT = 'http.conn.timeout' HTTP_SO_TIMEOUT = 'http.so.timeout' HTTP_CHARSET = 'http.charset' HTTP_CONN_MAXPREROUTE = 'http.conn.maxpreroute' HTTP_CONN_MAXTOTAL = 'http.conn.maxtotal' HTTP_SSL_KEYSTORE = 'http.ssl.keystore' HTTP_SSL_PASSWD = 'http.ssl.passwd' # ************************** yunapian.ini ************************************ YP_FILE = 'yp.file' YP_APIKEY = 'yp.apikey' YP_VERSION = 'yp.version' YP_USER_HOST = 'yp.user.host' YP_SIGN_HOST = 'yp.sign.host' YP_TPL_HOST = 'yp.tpl.host' YP_SMS_HOST = 'yp.sms.host' YP_VOICE_HOST = 'yp.voice.host' YP_FLOW_HOST = 'yp.flow.host' YP_CALL_HOST = 'yp.call.host' # ************************** api ************************************ VERSION_V1 = 'v1' VERSION_V2 = 'v2' APIKEY = 'apikey' CHARSET_UTF8 = 'utf-8' # 返回值字段 CODE = 'code' MSG = 'msg' DETAIL = 'detail' DATA = 'data' # user USER = 'user' BALANCE = 'balance' # 紧急联系人电话 EMERGENCY_MOBILE = 'emergency_mobile' EMERGENCY_CONTACT = 'emergency_contact' # 余额告警阈值 ALARM_BALANCE = 'alarm_balance' IP_WHITELIST = 'ip_whitelist' EMAIL = 'email' MOBILE = 'mobile' GMT_CREATED = 'gmt_created' API_VERSION = 'api_version' # sign SIGN = 'sign' NOTIFY = 'notify' APPLYVIP = 'apply_vip' ISONLYGLOBAL = 'is_only_global' INDUSTRYTYPE = 'industry_type' OLD_SIGN = 'old_sign' # tpl # 模板id TPL_ID = 'tpl_id' # 模板值 TPL_VALUE = 'tpl_value' # 模板内容 TPL_CONTENT = 'tpl_content' CHECK_STATUS = 'check_status' REASON = 'reason' TEMPLATE = 'template' # 模板语言 LANG = 'lang' COUNTRY_CODE = 'country_code' NOTIFY_TYPE = 'notify_type' # call FROM = 'from' TO = 'to' DURATION = 'duration' AREA_CODE = 'area_code' MESSAGE_ID = 'message_id' ANONYMOUS_NUMBER = 'anonymous_number' PAGE_SIZE = 'page_size' # flow CARRIER = 'carrier' FLOW_PACKAGE = 'flow_package' _SIGN = '_sign' CALLBACK_URL = 'callback_url' RESULT = 'result' FLOW_STATUS = 'flow_status' # voice DISPLAY_NUM = 'display_num' VOICE_STATUS = 'voice_status' # sms EXTEND = 'extend' SMS_STATUS = 'sms_status' SMS_REPLY = 'sms_reply' SMS = 'sms' TOTAL = 'total' NICK = 'nick' UID = 'uid' TEXT = 'text' START_TIME = 'start_time' END_TIME = 'end_time' PAGE_NUM = 'page_num' # 流量充值参数 SN = 'sn' COUNT = 'count' FEE = 'fee' UNIT = 'unit' SID = 'sid' # batch_send 接口 增添的返回值名 TOTAL_COUNT = 'total_count' TOTAL_FEE = 'total_fee' SEPERATOR_COMMA = ',' RECORD_ID = 'record_id'
yunpian-python-sdk
/yunpian-python-sdk-1.0.0.tar.gz/yunpian-python-sdk-1.0.0/yunpian_python_sdk/model/constant.py
constant.py
__author__ = 'bingone' import urllib from yunpian.Config import yunpian_config from yunpian.model.Result import Result from yunpian.HttpUtil import request_post class SmsOperator(object): def __init__(self, apikey=None, api_secret=None): if apikey == None: raise Exception("please set apikey") else: self.apikey = apikey if api_secret != None: self.api_secret = api_secret def single_send(self, data=None): if not data: data = {} if 'mobile' not in data: return Result(None, 'mobile 为空') if 'text' not in data: return Result(None, 'text 为空') data['apikey'] = self.apikey return request_post(self,yunpian_config['URI_SEND_SINGLE_SMS'], data) def batch_send(self, data=None): if not data: data = {} if 'mobile' not in data: return Result(None, 'mobile 为空') if 'text' not in data: return Result(None, 'text 为空') data['apikey'] = self.apikey return request_post(self,yunpian_config['URI_SEND_BATCH_SMS'], data) def multi_send(self, data=None): if not data: data = {} if 'mobile' not in data: return Result(None, 'mobile 为空') if 'text' not in data: return Result(None, 'text 为空') data['apikey'] = self.apikey mobile = data['mobile'] text = data['text'] if len(str(mobile).split(',')) != len(str(text).split(',')): return Result(None, 'mobile 与 text 个数不匹配') data['text'] = '' for s in str(text).split(','): data['text'] += urllib.quote(s) + ',' data['text'] = data['text'][0:-1] return request_post(self,yunpian_config['URI_SEND_MULTI_SMS'], data) def tpl_single_send(self, data=None): if not data: data = {} if 'mobile' not in data: return Result(None, 'mobile 为空') if 'tpl_id' not in data: return Result(None, 'tpl_id 为空') if 'tpl_value' not in data: return Result(None, 'tpl_value 为空') data['apikey'] = self.apikey return request_post(self,yunpian_config['URI_SEND_TPL_SINGLE_SMS'], data) def tpl_batch_send(self, data=None): if not data: data = {} if 'mobile' not in data: return Result(None, 'mobile 为空') if 'tpl_id' not in data: return Result(None, 'tpl_id 为空') if 'tpl_value' not in data: return Result(None, 'tpl_value 为空') data['apikey'] = self.apikey return request_post(self,yunpian_config['URI_SEND_TPL_BATCH_SMS'], data)
yunpian-sdk-python
/yunpian-sdk-python-0.0.8.tar.gz/yunpian-sdk-python-0.0.8/yunpian/SmsOperator.py
SmsOperator.py
from ctypes import * import base64 import struct __author__ = 'bingone' class Tea(object): encrypt_name='tea' @staticmethod def encrypt_yunpian(s,key): pass key=key+key+key+key # 0 get []key key = Tea.str_to_ints(key) # 1 str to bytes encrypt_bytes = list(s) #bytearray(s) # 2 add bytes to align,get encrypt_bytes n=8 - len(encrypt_bytes)%8 for i in range(0,n): encrypt_bytes.insert(0,chr(0)) encrypt_bytes[0]=chr(n) ret_bytes = '' for i in range(0,len(encrypt_bytes),8): pass c=''.join(encrypt_bytes) # print len (c) # print ''.join(encrypt_bytes).decode('utf8') # print ''.join(encrypt_bytes)[i:i+7].decode('utf8') tmp_int = struct.unpack('>II',''.join(encrypt_bytes)[i:i+8]) x=Tea.encipher(tmp_int,key) # print x ret_bytes +=x # return base64.encodestring(ret_bytes)[0:-1] @staticmethod def byte_to_int(content,offset): pass @staticmethod def str_to_ints(k): kk=[] kk.append(int(str(k)[0:7],16)) kk.append(int(str(k)[8:15],16)) kk.append(int(str(k)[16:23],16)) kk.append(int(str(k)[24:31],16)) return kk @staticmethod def encipher(v, k,n = 32): y = c_int32(v[0]); z = c_int32(v[1]); sum = c_int32(0); # y=v[0] # z=v[1] # sum=0 delta = 0x9E3779B9; if(delta > 0): delta = delta - 4294967296; w = [0, 0] while (n > 0): sum.value += delta # y += ((z <<4) + k[0]) ^ (z + sum) ^ ((z >>5) + k[1]) # z += ((y <<4) + k[2]) ^ (y + sum) ^ ((y >>5) + k[3]) y.value += (z.value << 4) + k[0] ^ z.value + sum.value ^ (z.value >> 5) + k[1] z.value += (y.value << 4) + k[2] ^ y.value + sum.value ^ (y.value >> 5) + k[3] n -= 1 w[0] = y.value w[1] = z.value # return w return struct.pack('>ii',w[0],w[1]) @staticmethod def decipher(v, k): y = c_uint32(v[0]) z = c_uint32(v[1]) sum = c_uint32(0xC6EF3720) delta = 0x9E3779B9 n = 32 w = [0, 0] while (n > 0): z.value -= (y.value << 4) + k[2] ^ y.value + sum.value ^ (y.value >> 5) + k[3] y.value -= (z.value << 4) + k[0] ^ z.value + sum.value ^ (z.value >> 5) + k[1] sum.value -= delta n -= 1 w[0] = y.value w[1] = z.value return w if __name__ == '__main__': pass tea = Tea() x=tea.encrypt_yunpian('','002d88e24fdaf41801d1d18ef8109996')[:-1] print (tea.encrypt_yunpian('','002d88e24fdaf41801d1d18ef8109996')) from pyDes import * import pyDes des = pyDes.des('12345678', pyDes.ECB, padmode=pyDes.PAD_PKCS5) print base64.encodestring(des.encrypt('12345678'))
yunpian-sdk-python
/yunpian-sdk-python-0.0.8.tar.gz/yunpian-sdk-python-0.0.8/yunpian/Tea.py
Tea.py
__author__ = 'bingone' yunpian_config={} # You can get the APIKEY and APISECRET from http://www.yunpian.com/ when log on. yunpian_config['APIKEY'] = "" yunpian_config['API_SECRET'] = "" #System yunpian_config['SMS_HOST'] = 'https://sms.yunpian.com' yunpian_config['VOICE_HOST'] = 'https://voice.yunpian.com' yunpian_config['FLOW_HOST'] = 'https://flow.yunpian.com' yunpian_config['VERSION'] = '/v2' # test System # yunpian_config['SMS_HOST'] = 'http://127.0.0.1:8081' # yunpian_config['VOICE_HOST'] = 'http://127.0.0.1:8081' # yunpian_config['FLOW_HOST'] = 'http://127.0.0.1:8081' # yunpian_config['VERSION'] = '/v2' # yunpian_config['APIKEY'] = "xxx" # yunpian_config['API_SECRET'] = "12345678" # 短信 yunpian_config['URI_SEND_SINGLE_SMS'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/sms/single_send.json" yunpian_config['URI_SEND_BATCH_SMS'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/sms/batch_send.json" yunpian_config['URI_SEND_MULTI_SMS'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/sms/multi_send.json" yunpian_config['URI_SEND_TPL_SINGLE_SMS'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + '/sms/tpl_signle_send.json' yunpian_config['URI_SEND_TPL_BATCH_SMS'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + '/sms/tpl_batch_send.json' yunpian_config['URI_PULL_SMS_STATUS'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/sms/pull_status.json" # 获取回复短信 yunpian_config['URI_PULL_SMS_REPLY'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/sms/pull_reply.json" # 查询回复短信 yunpian_config['URI_GET_SMS_REPLY'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/sms/get_reply.json" # 查短信发送记录 yunpian_config['URI_GET_SMS_RECORD'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/sms/get_record.json" # 语音 yunpian_config['URI_SEND_VOICE_SMS'] = yunpian_config['VOICE_HOST'] + yunpian_config['VERSION'] + "/voice/send.json" yunpian_config['URI_PULL_VOICE_STATUS'] = yunpian_config['VOICE_HOST'] + yunpian_config['VERSION'] + "/voice/pull_status.json" # 流量 yunpian_config['URI_GET_FLOW_PACKAGE'] = yunpian_config['FLOW_HOST'] + yunpian_config['VERSION'] + "/flow/get_package.json" yunpian_config['URI_PULL_FLOW_STATUS'] = yunpian_config['FLOW_HOST'] + yunpian_config['VERSION'] + "/flow/pull_status.json" yunpian_config['URI_RECHARGE_FLOW'] = yunpian_config['FLOW_HOST'] + yunpian_config['VERSION'] + "/flow/recharge.json" # 用户操作 yunpian_config['URI_GET_USER_INFO'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/user/get.json" yunpian_config['URI_SET_USER_INFO'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/user/set.json" # 模板操作 yunpian_config['URI_GET_DEFAULT_TEMPLATE'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/tpl/get_default.json" yunpian_config['URI_GET_TEMPLATE'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/tpl/get.json" yunpian_config['URI_ADD_TEMPLATE'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/tpl/add.json" yunpian_config['URI_UPD_TEMPLATE'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/tpl/update.json" yunpian_config['URI_DEL_TEMPLATE'] = yunpian_config['SMS_HOST'] + yunpian_config['VERSION'] + "/tpl/del.json" # print yunpian_config
yunpian-sdk-python
/yunpian-sdk-python-0.0.8.tar.gz/yunpian-sdk-python-0.0.8/yunpian/Config.py
Config.py
from yunpian.DES import DES from yunpian.Config import yunpian_config from yunpian.Sign import Sign from yunpian.Tea import Tea __author__ = 'bingone' import platform import requests from yunpian.model.Result import Result _sys_info = '{0}; {1}'.format(platform.system(), platform.machine()) _python_ver = platform.python_version() _session = None _headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"} def _init(): pass def request_post(obj, url, data=None): pass if not data: return Result(data, None, '参数为空') if data.has_key('encrypt'): if (hasattr(obj, 'api_secret')): if 'mobile' in data: if data['encrypt'] == Tea.encrypt_name: data['mobile'] = Tea.encrypt_yunpian(data['mobile'], obj.api_secret) elif data['encrypt'] == DES.encrypt_name: pass # data['mobile'] = DES.encrypt_yunpian(data['mobile'], obj.api_secret) else: raise Exception('unknow encrypt method') if 'text' in data: if data['encrypt'] == Tea.encrypt_name: data['text'] = Tea.encrypt_yunpian(data['text'], obj.api_secret) elif data['encrypt'] == DES.encrypt_name: pass # data['text'] = DES.encrypt_yunpian(data['text'], obj.api_secret) else: raise Exception('unknow encrypt method') data[Sign.singName] = Sign.getSign(data, obj.api_secret) else: raise Exception('please set api_secret') return real_post(url, data) def real_post(url, data=None, retry=3): if _session is None: _init() try: r = requests.post( url, data=data, headers=_headers, timeout=5) except Exception as e: if retry > 0: return real_post(url, data, retry - 1) else: return Result(data, None, e) return Result(data, r) if __name__ == '__main__': pass filetxt = open('/Users/bingone/develop/tools/reissue.txt', 'r') for txt in filetxt.readlines(): pass text = txt.split('\t')[1] mobile = txt.split('\t')[0] # print 'mobile=',mobile,'txt=',text # result = real_post('https://sms.yunpian.com/v1/sms/send.json', # data={'apikey': '592662792b81f6a87f62d7a2059005b5', 'mobile': mobile, 'text': text}) # import sys,json # reload(sys) # sys.setdefaultencoding('utf-8') # print json.dumps(result.content, ensure_ascii=False)
yunpian-sdk-python
/yunpian-sdk-python-0.0.8.tar.gz/yunpian-sdk-python-0.0.8/yunpian/HttpUtil.py
HttpUtil.py
__author__ = 'bingone' from yunpian.SmsOperator import SmsOperator from yunpian.VoiceOperator import VoiceOperator from yunpian.TplOperator import TplOperator from yunpian.UserOperator import UserOperator from yunpian.FlowOperator import FlowOperator from yunpian.Tea import Tea import sys import json reload(sys) sys.setdefaultencoding('utf-8') # 返回格式可参考官网: www.yunpian.com # You can get the APIKEY and APISECRET from http://www.yunpian.com/ when log on. # 单条短信发送 APIKEY='xxxxxx' API_SECRET='12345678' smsOperator = SmsOperator(APIKEY) result = smsOperator.single_send({'mobile': '13004000020', 'text': '【yunpian】您的验证码是4444'}) print json.dumps(result.content, ensure_ascii=False) # # TEA加密短信发送 # 要生成带api_secret 的对象 smsOperator = SmsOperator(APIKEY,API_SECRET) result = smsOperator.single_send( {'mobile': '13000400001', 'text': '13400000001', 'encrypt': Tea.encrypt_name}) print json.dumps(result.content, ensure_ascii=False) # DES加密短信发送 # result = smsOperator.single_send( # {'mobile': '13000000002', 'text': '13000000002', 'encrypt': DES.encrypt_name}) # print json.dumps(result.content, ensure_ascii=False) # # 批量短信发送 print json.dumps(smsOperator.batch_send({'mobile': '13000000001,13000000002', 'text': '【yunpian】您的验证码是0000'}).content, ensure_ascii=False) # 个性化短信发送 print json.dumps(smsOperator.multi_send( {'mobile': '13000000003,13000000004', 'text': '【yunpian】您的验证码是4442,【yunpian】您的验证码是4441'}).content, ensure_ascii=False) # 获取账号信息 userOperator = UserOperator(APIKEY) result = userOperator.get() print json.dumps(result.content,ensure_ascii=False) # 短信模板 tplOperator = TplOperator(APIKEY) result = tplOperator.get() print json.dumps(result.content,ensure_ascii=False) print json.dumps(tplOperator.get_default({'tpl_id': '2'}).content, ensure_ascii=False) # 流量 flowOperator = FlowOperator(APIKEY) print json.dumps(flowOperator.recharge({'mobile': '18720085991', 'sn': '1008601'}).content, ensure_ascii=False) # 语音 voiceOperator = VoiceOperator(APIKEY) print json.dumps(voiceOperator.send({'mobile': '18720085991', 'code': '0012'}).content, ensure_ascii=False)
yunpian-sdk-python
/yunpian-sdk-python-0.0.8.tar.gz/yunpian-sdk-python-0.0.8/yunpian/test/YunpianRestTest.py
YunpianRestTest.py
=============================== yunpian =============================== .. image:: https://img.shields.io/pypi/v/yunpian.svg :target: https://pypi.python.org/pypi/yunpian .. image:: https://img.shields.io/travis/mozillazg/yunpian.svg :target: https://travis-ci.org/mozillazg/yunpian .. image:: https://img.shields.io/coveralls/mozillazg/yunpian/master.svg :target: https://coveralls.io/r/mozillazg/yunpian .. image:: https://readthedocs.org/projects/yunpian/badge/?version=latest :target: https://readthedocs.org/projects/yunpian/?badge=latest :alt: Documentation Status .. image:: https://img.shields.io/pypi/dm/yunpian.svg :target: https://pypi.python.org/pypi/yunpian .. image:: https://badges.gitter.im/mozillazg/yunpian.svg :alt: Join the chat at https://gitter.im/mozillazg/yunpian :target: https://gitter.im/mozillazg/yunpian An async yunpian API library for Python * Free software: MIT license * Documentation: https://yunpian.readthedocs.org * GitHub: https://github.com/mozillazg/yunpian * PyPI: https://pypi.python.org/pypi/yunpian * Python version: 3.5, 3.6 Features -------- * TODO Installation -------------- At the command line:: $ pip install yunpian Usage -------- :: import aiohttp from yunpian import SMSClient from yunpian.contrib.aiohttp import Aiohttp async with aiohttp.ClientSession() as session: c = SMSClient(Aiohttp(session), 'api_key') response = await c.single_send('134xxx', '【测试网】您的验证码是 12432') print(response) print(response.json()) Credits --------- This package was created with Cookiecutter_ and the `mozillazg/cookiecutter-pypackage`_ project template. .. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _`mozillazg/cookiecutter-pypackage`: https://github.com/mozillazg/cookiecutter-pypackage
yunpian
/yunpian-0.1.1.tar.gz/yunpian-0.1.1/README.rst
README.rst
.. highlight:: shell ============ Contributing ============ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. You can contribute in many ways: Types of Contributions ---------------------- Report Bugs ~~~~~~~~~~~ Report bugs at https://github.com/mozillazg/yunpian/issues. If you are reporting a bug, please include: * Your operating system name and version. * Any details about your local setup that might be helpful in troubleshooting. * Detailed steps to reproduce the bug. Fix Bugs ~~~~~~~~ Look through the GitHub issues for bugs. Anything tagged with "bug" is open to whoever wants to implement it. Implement Features ~~~~~~~~~~~~~~~~~~ Look through the GitHub issues for features. Anything tagged with "feature" is open to whoever wants to implement it. Write Documentation ~~~~~~~~~~~~~~~~~~~ yunpian could always use more documentation, whether as part of the official yunpian docs, in docstrings, or even on the web in blog posts, articles, and such. Submit Feedback ~~~~~~~~~~~~~~~ The best way to send feedback is to file an issue at https://github.com/mozillazg/yunpian/issues. If you are proposing a feature: * Explain in detail how it would work. * Keep the scope as narrow as possible, to make it easier to implement. * Remember that this is a volunteer-driven project, and that contributions are welcome :) Get Started! ------------ Ready to contribute? Here's how to set up `yunpian` for local development. 1. Fork the `yunpian` repo on GitHub. 2. Clone your fork locally:: $ git clone [email protected]:your_name_here/yunpian.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: $ mkvirtualenv yunpian $ cd yunpian/ $ python setup.py develop 4. Create a branch for local development:: $ git checkout -b name-of-your-bugfix-or-feature Now you can make your changes locally. 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: $ flake8 yunpian tests $ python setup.py test $ tox To get flake8 and tox, just pip install them into your virtualenv. 6. Commit your changes and push your branch to GitHub:: $ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature 7. Submit a pull request through the GitHub website. Pull Request Guidelines ----------------------- Before you submit a pull request, check that it meets these guidelines: 1. The pull request should include tests. 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. 3. The pull request should work for Python 2.7, 3.3, 3.4 and 3.5 and 3.6, and for PyPy. Check https://travis-ci.org/mozillazg/yunpian/pull_requests and make sure that the tests pass for all supported Python versions. Tips ---- To run a subset of tests:: $ py.test tests/test_yunpian.py
yunpian
/yunpian-0.1.1.tar.gz/yunpian-0.1.1/CONTRIBUTING.rst
CONTRIBUTING.rst
import json from io import BytesIO, StringIO from http import HTTPStatus import xml.etree.ElementTree as ETree import aiohttp from .attrdict import AttrDict from .auth import build_auth from .error import raise_if_error, HttpError async def invoke(base_url, auth_type, account_sid, auth_token, func, func_des, params=None, headers=None, data=None, timeout=15): """进行一次 REST 调用 :param str base_url: 所有被引用的地址都有如下 Base URL: * 沙盒地址,用于应用上线前进行业务测试: `https://sandboxapp.cloopen.com:8883/2013-12-26` * 生产地址,用于应用上线后进行正式业务: `https://app.cloopen.com:8883/2013-12-26` .. attention:: 为了确保数据隐私,云通讯平台的REST API是通过HTTPS方式请求。 :param str auth_type: 验证级别, **必选** 有: * `Accounts` : 主帐号鉴权,云通讯平台会对请求中的主帐号和主帐号Token进行验证 * `SubAccounts` : 子帐号鉴权,云通讯平台会对请求中的子帐号和子帐号Token进行验证 :param str account_sid: 主账户或者子账户Id。由32个英文字母和阿拉伯数字组成的主账户唯一标识符 **必选** :param str auth_token: 账户 `TOKEN` **必选** :param str func: 描述业务功能,**必选** 。对于 `IVR API` 这参数必须是 `ivr` :param str func_des: 描述业务功能的具体操作 **必选** :param dict params: URL 参数 :param dict headers: HTTP 请求头域键值对 :param data: POST 请求数据,它的数据类型可以是: * :data:`None`: 将是一个 `GET` 请求 * :class:`dict`: 采用 `JSON` 格式的调用 * :class:`xml.etree.ElementTree.ElementTree`: 采用 `XML` 格式的调用 :param int timeout: HTTP 超时(秒) :rtype: AttrDict :return: RestAPI 返回结果。XML结果中的标签被转化为了属性名,文本被转化为了属性值 """ params = params or {} headers = headers or {} if auth_type not in ('Accounts', 'SubAccounts'): raise ValueError('未知的验证级别 "%s"' % auth_type) auth, sig, ts = build_auth(account_sid, auth_token) url = '{baseURL}/{authType}/{account}/{func}/{funcdes}'.format( baseURL=base_url, authType=auth_type, account=account_sid, func=func, funcdes=func_des, ) params['sig'] = sig headers['Authorization'] = auth if data is None: headers['Accept'] = 'application/json' elif isinstance(data, ETree.ElementTree): headers['Accept'] = 'application/xml' headers['Content-Type'] = 'application/xml;charset=utf-8' fs = BytesIO() try: data.write(fs, encoding='utf-8', xml_declaration=True) data = fs.getvalue() finally: fs.close() elif isinstance(data, dict): headers['Accept'] = 'application/json' resp_txt = '' with aiohttp.ClientSession() as session: with aiohttp.Timeout(timeout): method = session.get if data is None else session.post async with method(url, headers=headers, params=params, data=data) as resp: if not resp.status == HTTPStatus.OK: try: reason = HTTPStatus(resp.status).phrase except ValueError: reason = '' raise HttpError(status=resp.status, reason=reason) resp_txt = await resp.text() if headers['Accept'] == 'application/json': res = json.loads(resp_txt) raise_if_error(res) elif headers['Accept'] == 'application/xml': fs = StringIO(resp_txt) try: tree = ETree.parse(fs) finally: fs.close() raise_if_error(tree) res = recursive_resp_xml_node(tree.getroot())[1] else: raise RuntimeError('Accept Header error') return AttrDict(res) def recursive_resp_xml_node(node): tag = node.tag text = node.text.strip() if text: return tag, text else: d = {} for child in node: k, v = recursive_resp_xml_node(child) v0 = d.get(child.tag) if v0: if isinstance(v0, list): v0.append(v) else: d[child.tag] = [v0, v] else: d[k] = v return tag, d
yuntongxun-restapi-asyncio
/yuntongxun-restapi-asyncio-0.1.zip/yuntongxun-restapi-asyncio-0.1/src/yuntongxun_aiorest/rest.py
rest.py
# YunXiao API An API tool for YunXiao Education Institution Management System. # Copyright Statement YunXiao software is owned by XiaoGuanJia. This project is for learning purposes only. If there is any infringement, please contact me to delete. # Contact [email protected] # API Endpoint ## V3 - ### arranges_query ` ` | Parameter | Description | |-----------|-------------| - ### campus_query ` 查询全部校区 ` | Parameter | Description | |-----------|-------------| - ### campus_query_performance ` 分校区列出指定日期的费用数据。 ` | Parameter | Description | |-----------|-------------| - ### charges_query_record ` ` | Parameter | Description | |-----------|-------------| - ### class_query_info ` 查询指定班级信息 ` | Parameter | Description | |-----------|-------------| | classid | 班级id | - ### class_query_student ` 查询班级学生 ` | Parameter | Description | |-----------|-------------| | inout | **[1]** 当前在班学员 **[2]** 历史学员 | | classid | 班级ID | - ### classes_query ` ` | Parameter | Description | |-----------|-------------| - ### comefroms_query ` ` | Parameter | Description | |-----------|-------------| - ### company_query_performance ` 查询机构指定日期范围业绩。 ` | Parameter | Description | |-----------|-------------| | startdate | 起始日期 | | enddate | 截止日期 | - ### curriculums_query ` ` | Parameter | Description | |-----------|-------------| - ### intentions_query ` ` | Parameter | Description | |-----------|-------------| - ### intentions_query_students ` ` | Parameter | Description | |-----------|-------------| - ### loop_pages ` :param KEY: 实际数据所在的字段名 ` | Parameter | Description | |-----------|-------------| - ### orders_query_items ` ` | Parameter | Description | |-----------|-------------| - ### payments_query ` ` | Parameter | Description | |-----------|-------------| - ### payments_query_achievements_datarange ` ` | Parameter | Description | |-----------|-------------| - ### payments_query_receipt ` 取得收据信息。 ` | Parameter | Description | |-----------|-------------| | orderinfo_id | 订单 ID | | payment_groupid | 支付 ID | - ### payments_query_record ` ` | Parameter | Description | |-----------|-------------| - ### payments_query_refund ` ` | Parameter | Description | |-----------|-------------| - ### renew_cookie ` 刷新 cookie.tmp 配置中存储的 cookie ` | Parameter | Description | |-----------|-------------| - ### renew_token ` 刷新 token.tmp 配置中存储的 token ` | Parameter | Description | |-----------|-------------| - ### request ` ` | Parameter | Description | |-----------|-------------| - ### student_operation_become_history ` 设置学生为曾就读。 ` | Parameter | Description | |-----------|-------------| | studentlist | 学生ID | - ### student_operation_become_study ` 设置学生为曾就读。 ` | Parameter | Description | |-----------|-------------| | studentlist | 学生ID | - ### student_query_cards ` 查看学员的课程卡包 ` | Parameter | Description | |-----------|-------------| | studentid | 学生ID | - ### student_query_course ` 查看学员的课程卡包 ` | Parameter | Description | |-----------|-------------| | studentid | 学生ID | - ### student_query_info ` 查询学生基本信息 ` | Parameter | Description | |-----------|-------------| | student_id | 学员ID | - ### students_query ` ` | Parameter | Description | |-----------|-------------| - ### students_query_cards ` ` | Parameter | Description | |-----------|-------------| - ### students_query_course_amount ` ` | Parameter | Description | |-----------|-------------| - ### students_query_course_fee ` ` | Parameter | Description | |-----------|-------------| - ### teachers_query ` ` | Parameter | Description | |-----------|-------------|
yunxiao
/yunxiao-0.4.2.tar.gz/yunxiao-0.4.2/README.md
README.md
__author__ = 'Naphtha Nepanthez' __version__ = '0.3.0' __license__ = 'MIT' # SEE LICENSE FILE __all__ = [ 'Interface', 'MultiblockHandler', 'Shelve', 'InstanceLockedShelve' ] import os, struct, xxhash, pickle, hashlib, io, math, threading, functools import zlib, time, random, tempfile, itertools from filelock import FileLock from collections.abc import MutableMapping class Exceptions(object): class BlockNotFound(Exception): pass class WriteAboveBlockSize(Exception): pass class NodeExists(Exception): pass class NodeDoesNotExist(Exception): pass class TargetExists(Exception): pass class InvalidFormat(Exception): pass class RRCCache(object): def __init__(self, size = 8192): self.size = size self.foward_mapping = {} self.backward_mapping = {} def set(self, key, value): self.foward_mapping[key] = value self.backward_mapping[value] = key def has(self, key): return (key in self.foward_mapping) def keys(self): return self.foward_mapping.keys() def get(self, key): return self.foward_mapping[key] def get_key(self, value): return self.backward_mapping[value] def remove(self, key): del self.backward_mapping[self.foward_mapping[key]] del self.foward_mapping[key] def random_key(self): return random.choice(self.backward_mapping) def check_full(self): if len(self.foward_mapping) > self.size: self.push_out() def push_out(self): self.remove(self.random_key()) def length(self): return len(self.foward_mapping) class ArbRemovalCache(RRCCache): def push_out(self): # Only works on very latest versions of Python self.foward_mapping.popitem() self.backward_mapping.popitem() class OrderedRemovalCache(RRCCache): def push_out(self): self.remove(list(self.keys())[0]) class CacheDict(MutableMapping): def __init__(self, cache, *args, **kwargs): self.mapping = cache(*args, **kwargs) def __getitem__(self, key): return self.mapping.get(key) def __delitem__(self, key): self.mapping.remove(key) def __setitem__(self, key, value): self.mapping.set(key, value) def __iter__(self): return iter(self.mapping.keys()) def __len__(self): return self.mapping.length() class AtomicCachingFileLock(FileLock): def reset_cache(self): self.cache = {} self.cache['cells'] = {} self.cache['keypos'] = RRCCache() self.cache['blocks'] = CacheDict(RRCCache) self.cache['indexcell_translation'] = {} self.cache['safe_indexes'] = set() def _cap32(self, i): return i & ((2 ** 32) - 1) def _session(self): # It would be nice if this was permanent, but thanks to the thread ID, # it can't be. return struct.pack('<III', self._cap32(threading.get_ident()), self._cap32(os.getpid()), self._cap32(round(time.time() / 3600)) ) + self.id def _check_avail(self) -> bool: if not self._av: if os.path.getsize(self._original_path) != 0: self._av = True return True else: return False else: return True def _write_session(self): if self._check_avail(): self.handle.seek(0) self.handle.write(self._session()) def _same_session(self) -> bool: if self._check_avail(): self.handle.seek(0) cses = self._session() if self.handle.read(len(cses)) == cses: return True else: return False else: return False def _templk(self, i): return os.path.join( tempfile.gettempdir(), xxhash.xxh64(i).hexdigest().upper() + '.YLF' ) def __init__(self, *args, **kwargs): self._av = False args = list(args) self.id = os.urandom(4) self._original_path = args[0] self.lockfile = self._templk(self._original_path + '.lock') args[0] = self.lockfile super().__init__(*args, **kwargs) self.reset_cache() self.handle = None def acquire(self, *args, **kwargs): super().acquire(*args, **kwargs) def _acquire(self, *args, **kwargs): super()._acquire(*args, **kwargs) self.handle = open(self._original_path, 'rb+') if not self._same_session(): self.reset_cache() self._write_session() def _release(self, *args, **kwargs): super()._release(*args, **kwargs) self.handle.close() class Interface(object): _index_header_pattern = '<?xxxIHH' # 12 bytes _index_cell_pattern = '<?xQIHQ' # 24 bytes _yunyun_header = b'YUNYUN01' # 8 bytes _identity_header = _yunyun_header.rjust(len(_yunyun_header)+16, b'#') _cache_size = 4096 def __init__(self, path, index_size = 4096, block_size = 4096): if block_size < 16: raise Exceptions.InvalidFormat( 'Block size is far too low.' ) elif index_size < 64: raise Exceptions.InvalidFormat( 'Index size is far too low.' ) self._index_size = index_size self._block_size = block_size self._index_headersize = len(self.constructIndex()) self._index_cellsize = len(self.constructIndexCell()) self.recalculateIndexes() self.reconfigured = False self.path = path new = False if (not os.path.isfile(self.path) or os.path.getsize(self.path) == 0): open(self.path, 'ab+').close() new = True else: hdr = open(self.path, 'rb').read(len(self._identity_header)) cutlen = len(_yunyun_header) if hdr[:-cutlen] != self._identity_header[:-cutlen]: raise Exceptions.InvalidFormat( 'Not a YunYun file!' ) self.lock = AtomicCachingFileLock(self.path) if new: self.requestFreeIndexCell() else: # Update block and index sizes self.getIndexes() def recalculateIndexes(self): self._indexes = math.floor( ( self._index_size - self._index_headersize ) / self._index_cellsize ) # No caching here in case block/index size changes def constructIndex(self, continuation = 0) -> bytes: return self._identity_header + struct.pack( self._index_header_pattern, bool(continuation), continuation, self._index_size, self._block_size ) @functools.lru_cache(maxsize=_cache_size) def constructIndexCell( self, occupied: bool = False, key: bytes = b'', seek: int = 0, size: int = 0, data: int = 0 ) -> bytes: return struct.pack( self._index_cell_pattern, occupied, xxhash.xxh64(key).intdigest(), seek, size, data ) def readIndexHeader(self, index: bytes): return struct.unpack( self._index_header_pattern, index[len(self._identity_header):] ) def readIndexCell(self, cell: bytes): return struct.unpack( self._index_cell_pattern, cell ) def getIndexes(self): with self.lock: if 'indexes' not in self.lock.cache: self.lock.cache['indexes'] = [] f = self.lock.handle f.seek(0, 2) length = f.tell() position = 0 while position < length: f.seek(position) read = self.readIndexHeader( f.read(self._index_headersize) ) # Set these here! if not self.reconfigured: self._index_size = read[2] self._block_size = read[3] self.recalculateIndexes() self.reconfigured = True self.lock.cache['indexes'].append((position, read)) continuation = read[1] if read[0]: position = continuation else: break return self.lock.cache['indexes'] @functools.lru_cache(maxsize=_cache_size) def generateIndexPositions(self, pos): return [ pos + (self._index_cellsize * y) for y in range( self._indexes ) ] def getIndexesCells(self): # TODO: This function is absolutely awful. I did my best to optimize # it, but it's still an extremely intensive function to run. It's just # super difficult. with self.lock: indexes = self.getIndexes() f = self.lock.handle for x in indexes: if x[0] in self.lock.cache['safe_indexes']: continue index_pointer = x[0] + self._index_headersize f.seek(index_pointer) positions = self.generateIndexPositions(index_pointer) cells = map(lambda z: ( z, self.readIndexCell(f.read(self._index_cellsize)) ), positions) self.lock.cache['cells'].update(cells) self.lock.cache['indexcell_translation'][x[0]] = set(positions) self.lock.cache['safe_indexes'].add(x[0]) return self.lock.cache['cells'] def markCellModified(self, pos): with self.lock: try: self.lock.cache['keypos'].remove( self.lock.cache['keypos'].get_key(pos) ) except KeyError: pass try: del self.lock.cache['cells'][pos] except KeyError: pass try: for k, v in self.lock.cache['indexcell_translation'].items(): if pos in v: self.lock.cache['safe_indexes'].remove(k) break except KeyError: pass def createIndex(self): with self.lock: indexes = self.getIndexes() f = self.lock.handle f.seek(0, 2) length = f.tell() if len(indexes) > 0: f.seek(indexes[-1][0]) f.write(self.constructIndex(length)) actual_header = self.constructIndex() temp = io.BytesIO(bytes(self._index_size)) temp.write(actual_header) temp.write(self.constructIndexCell() * self._indexes) temp.seek(0) f.seek(0, 2) f.write(temp.read()) # Originally deleted the whole index cache, but there is no # point for that at all - we can just add another blank header self.lock.cache['indexes'].append((length, self.readIndexHeader( actual_header ))) def keyExists(self, key: bytes): with self.lock: if self.lock.cache['keypos'].has(key): return self.lock.cache['keypos'].get(key) hkey = xxhash.xxh64(key).intdigest() vlt = 0 # Pypy support try: cells = reversed(self.getIndexesCells().items()) except TypeError: cells = self.getIndexesCells().items() for k, v in cells: if (v[1] == hkey and v[0] == True): vlt = k break self.lock.cache['keypos'].set(key, vlt) return vlt def requestFreeIndexCell(self): with self.lock: while True: for k, v in self.getIndexesCells().items(): if (v[0] == False): return k self.createIndex() def writeBlock(self, key: bytes, value: bytes, hard: bool = False): if len(value) > self._block_size: raise Exceptions.WriteAboveBlockSize( 'Write length was {0}, block size is {1}'.format( len(value), self._block_size ) ) with self.lock: f = self.lock.handle key_exists = self.keyExists(key) if not key_exists: key_exists = self.requestFreeIndexCell() try: self.lock.cache['keypos'].remove(key) except KeyError: pass f.seek(key_exists) cell = self.readIndexCell(f.read(self._index_cellsize)) blank = b'\x00' * self._block_size if cell[2] == 0: f.seek(0, 2) location = f.tell() if hard: f.write(blank) else: f.truncate(location + len(blank)) else: location = cell[2] f.seek(key_exists) f.write(self.constructIndexCell( True, key, location, cell[3], cell[4] )) self.markCellModified(key_exists) self.setBlockCacheNewValue(key, blank) valhash = xxhash.xxh64(value).intdigest() f.seek(key_exists) cell = self.readIndexCell(f.read(self._index_cellsize)) if cell[4] == valhash: return f.seek(key_exists) f.write(self.constructIndexCell( cell[0], key, cell[2], len(value), valhash )) self.markCellModified(key_exists) self.setBlockCacheNewValue(key, value) f.seek(cell[2]) f.write(value) def discardBlock(self, key: bytes): with self.lock: f = self.lock.handle key_exists = self.keyExists(key) if key_exists: f.seek(key_exists) cell = self.readIndexCell(f.read(self._index_cellsize)) f.seek(key_exists) f.write(self.constructIndexCell( False, b'', cell[2], cell[3], cell[4] )) self.markCellModified(key_exists) self.invalidateBlockCacheKey(key) else: raise Exceptions.BlockNotFound('!DELT Key: {0}'.format( key.hex() )) def changeBlockKey(self, key: bytes, new_key: bytes): with self.lock: f = self.lock.handle key_exists = self.keyExists(new_key) if key_exists: raise Exceptions.TargetExists('!RENM Key: {0}'.format( new_key.hex() )) key_exists = self.keyExists(key) if key_exists: f.seek(key_exists) cell = self.readIndexCell(f.read(self._index_cellsize)) f.seek(key_exists) f.write(self.constructIndexCell( cell[0], new_key, cell[2], cell[3], cell[4] )) self.markCellModified(key_exists) self.invalidateBlockCacheKey(key) else: raise Exceptions.BlockNotFound('!RENM Key: {0}'.format( key.hex() )) def invalidateBlockCacheKey(self, key): with self.lock: try: del self.lock.cache['blocks'][key] except KeyError: pass def setBlockCacheNewValue(self, key, value): self.lock.cache['blocks'][key] = value def readBlock(self, key: bytes): with self.lock: if key in self.lock.cache['blocks']: return self.lock.cache['blocks'][key] f = self.lock.handle key_exists = self.keyExists(key) if key_exists: f.seek(key_exists) cell = self.readIndexCell(f.read(self._index_cellsize)) f.seek(cell[2]) self.setBlockCacheNewValue(key, f.read(cell[3])) return self.lock.cache['blocks'][key] else: raise Exceptions.BlockNotFound('!READ Key: {0}'.format( key.hex() )) class MultiblockHandler(Interface): def constructNodeBlockKey(self, key: bytes, block: int): return b'INODEBLK' + hashlib.sha256( key + struct.pack('<I', block) ).digest() def makeNode(self, key: bytes): with self.lock: if not self.nodeExists(key): self._setNodeProperties(key, { 'key': key, 'blocks': 0, 'size': 0 } ) else: raise Exceptions.NodeExists('!MKNOD Key: {0}'.format( key.hex() )) def removeNode(self, key: bytes): with self.lock: if not self.nodeExists(key): raise Exceptions.NodeDoesNotExist('!RMNOD Key: {0}'.format( key.hex() )) details = self._getNodeProperties(key) self.discardBlock(key) for block in range(details['blocks']): self.discardBlock(self.constructNodeBlockKey(key, block)) def renameNode(self, key: bytes, new_key: bytes): with self.lock: if not self.nodeExists(key): raise Exceptions.NodeDoesNotExist('!MVNOD Key: {0}'.format( key.hex() )) elif self.nodeExists(new_key): raise Exceptions.TargetExists('!MVNOD Key: {0}'.format( new_key.hex() )) details = self._getNodeProperties(key) self.changeBlockKey(key, new_key) for block in range(details['blocks']): self.changeBlockKey( self.constructNodeBlockKey(key, block), self.constructNodeBlockKey(new_key, block) ) def nodeExists(self, key: bytes) -> bool: with self.lock: return bool(self.keyExists(key)) def getHandle(self, key: bytes): with self.lock: if self.nodeExists(key): return self.MultiblockFileHandle(self, key) else: raise Exceptions.NodeDoesNotExist('!GTHDL Key: {0}'.format( key.hex() )) def _getNodeProperties(self, key: bytes) -> dict: op = self.readBlock(key) blocks, size = struct.unpack('<II', op[:8]) return { 'key': op[8:], 'blocks': blocks, 'size': size } def _setNodeProperties(self, key: bytes, properties: dict): self.writeBlock(key, struct.pack('<II', properties['blocks'], properties['size'] ) + properties['key']) class MultiblockFileHandle(object): def __init__(self, interface, key: bytes): self.interface = interface self.key = key self.position = 0 def close(self): pass def tell(self) -> int: with self.interface.lock: return self.position def seek(self, offset: int, whence: int = 0) -> int: with self.interface.lock: if whence == 0: self.position = offset elif whence == 1: self.position += offset elif whence == 2: if offset != 0: raise io.UnsupportedOperation( 'can\'t do nonzero end-relative seeks' ) self.position = self.length() return self.position def length(self): with self.interface.lock: return self.interface._getNodeProperties( self.key )['size'] def truncate(self, size: int = None) -> int: with self.interface.lock: current_size = self.length() if size == None: size = current_size final_blocks = math.ceil( size / self.interface._block_size ) current_blocks = math.ceil( current_size / self.interface._block_size ) if final_blocks > current_blocks: for block in range(final_blocks): key = self.interface.constructNodeBlockKey( self.key, block ) if not self.interface.keyExists(key): self.interface.writeBlock( key, b'\x00' * self.interface._block_size ) elif final_blocks < current_blocks: for block in range(final_blocks, current_blocks): key = self.interface.constructNodeBlockKey( self.key, block ) self.interface.discardBlock(key) props = self.interface._getNodeProperties( self.key ) props['size'] = size props['blocks'] = final_blocks self.interface._setNodeProperties( self.key, props ) def read(self, size: int = None) -> bytes: with self.interface.lock: if size == None: size = self.length() - self.position final = self._readrange(self.position, self.position + size) self.position += size return final def _readrange( self, start: int, end: int, nopad: bool = True, edge: bool = False ) -> bytes: with self.interface.lock: start_block = math.floor(start / self.interface._block_size) end_block = math.ceil(end / self.interface._block_size) if edge: collect_range = [start_block, end_block - 1] else: collect_range = range(start_block, end_block) blocks = [] for block in collect_range: key = self.interface.constructNodeBlockKey( self.key, block ) blocks.append(self.interface.readBlock(key)) final = b''.join(blocks) if nopad: clean_start = start - ( start_block * self.interface._block_size ) clean_end = clean_start + (end - start) return final[(clean_start):(clean_end)] else: return final def write(self, b: bytes): with self.interface.lock: if self.length() < self.position + len(b): self.truncate(self.position + len(b)) start_block = math.floor( self.position / self.interface._block_size ) end_block = math.ceil( (self.position + len(b)) / self.interface._block_size ) chunk_buffer = bytearray(self._readrange( self.position, self.position + len(b), nopad = False, edge = True )) clean_start = self.position - ( start_block * self.interface._block_size ) chunk_buffer[(clean_start):(clean_start + len(b))] = b ipos = 0 for block in range(start_block, end_block): key = self.interface.constructNodeBlockKey( self.key, block ) self.interface.writeBlock( key, bytes( chunk_buffer[ipos:ipos+self.interface._block_size] ) ) ipos += self.interface._block_size self.position += len(b) return len(b) class Shelve(MutableMapping): _locks = {} def __init__(self, *args, **kwargs): if args[0] not in self._locks: self._locks[args[0]] = threading.Lock() self._lock = self._locks[args[0]] self.trackkeys = True with self._lock: self.mapping = MultiblockHandler(*args, **kwargs) if self.mapping._block_size < 96: raise Exceptions.InvalidFormat( 'Shelve mapping block size must be at least 96 bytes.' ) self._key_node_name = self._hash_key(b'__KEYS__') with self.mapping.lock: first = False if not self.mapping.nodeExists(self._key_node_name): self.mapping.makeNode(self._key_node_name) first = True self._ikeys = self.mapping.getHandle(self._key_node_name) if first: self._write_keys(set()) def __getitem__(self, key): with self._lock: with self.mapping.lock: key = self._hash_key(pickle.dumps(key)) if not self.mapping.nodeExists(key): raise KeyError(key) return pickle.loads(self.mapping.getHandle(key).read()) def _get_keys(self): with self.mapping.lock: if 'skeys' not in self.mapping.lock.cache: self._ikeys.seek(0) read = self._ikeys.read() if len(read) == 0: self.mapping.lock.cache['skeys'] = set() else: self.mapping.lock.cache['skeys'] = pickle.loads( zlib.decompress(read) ) return self.mapping.lock.cache['skeys'].copy() def _write_keys(self, kr): with self.mapping.lock: if kr != self._get_keys(): fin = zlib.compress(pickle.dumps(kr)) self._ikeys.seek(0) self._ikeys.truncate(len(fin)) self._ikeys.write(fin) self.mapping.lock.cache['skeys'] = kr def __delitem__(self, key): with self._lock: with self.mapping.lock: if self.trackkeys: kr = self._get_keys() if key not in kr: raise Exceptions.NodeDoesNotExist( '!RMNOD Key: {0}'.format( key ) ) kr.remove(key) self._write_keys(kr) key = self._hash_key(pickle.dumps(key)) self.mapping.removeNode(key) def __setitem__(self, key, value): with self._lock: with self.mapping.lock: if self.trackkeys: kr = self._get_keys() kr.add(key) self._write_keys(kr) key = self._hash_key(pickle.dumps(key)) if not self.mapping.nodeExists(key): self.mapping.makeNode(key) handle = self.mapping.getHandle(key) pickval = pickle.dumps(value) handle.truncate(len(pickval)) handle.write(pickval) def __iter__(self): if self.trackkeys: with self._lock: with self.mapping.lock: return iter(self._get_keys()) else: return None def __len__(self): if self.trackkeys: with self._lock: with self.mapping.lock: return len(self._get_keys()) else: return None def _hash_key(self, key): return hashlib.sha256(key).digest() class InstanceLockedShelve(Shelve): """ This will share the same file lock and cache for all operations, but for as long as this object is instantiated, no other thread or process will be able to access the shelve. So, in simple terms, it's faster, but only if you're working with a single thread or process. Can be used with `with`. """ _locks_i = {} def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.mapping.lock.acquire() if args[0] not in self._locks_i: self._locks_i[args[0]] = threading.Lock() self._lock_i = self._locks_i[args[0]] self._lock_i.acquire() def __enter__(self, *args, **kwargs): self.mapping.lock.acquire() return self def __exit__(self, *args, **kwargs): self.mapping.lock.release(force = True) if self._lock_i.locked(): self._lock_i.release() def __del__(self, *args, **kwargs): try: self.mapping.lock.release(force = True) except: pass try: if self._lock_i.locked(): self._lock_i.release() except: pass if __name__ == '__main__': import progressbar import matplotlib.pyplot as plt FILENAME = '/tmp/test.yun' TEST_VALUES = [os.urandom(2 ** x) for x in range(16)] def pulverise_original(): try: os.remove(FILENAME) except: pass def test(x, dotimes): indexes = list(range(dotimes)) times = [] for _ in progressbar.progressbar(indexes): key = os.urandom(8) start = time.perf_counter() operations = 0 for value in TEST_VALUES: x[key] = value assert x[key] == value operations += 2 end = ((time.perf_counter() - start) / operations) * 1000 times.append(end) return indexes, times def testset(x, dotimes): indexes = list(range(dotimes)) times = [] for _ in progressbar.progressbar(indexes): key = os.urandom(8) start = time.perf_counter() x[key] = os.urandom(8) end = (time.perf_counter() - start) * 1000 times.append(end) return indexes, times def testget(x, dotimes): indexes = list(range(dotimes)) times = [] for _ in progressbar.progressbar(indexes): key = os.urandom(8) value = os.urandom(4096) x[key] = value start = time.perf_counter() assert x[key] == value end = (time.perf_counter() - start) * 1000 times.append(end) return indexes, times def testin(x, dotimes): indexes = list(range(dotimes)) times = [] for i in progressbar.progressbar(indexes): x[i] = os.urandom(4096) start = time.perf_counter() assert (i in x) == True end = (time.perf_counter() - start) * 1000 times.append(end) return indexes, times def testdel(x, dotimes): indexes = list(range(dotimes)) times = [] for i in progressbar.progressbar(indexes): start = time.perf_counter() del x[i] end = (time.perf_counter() - start) * 1000 times.append(end) return indexes, list(reversed(times)) fig, ax = plt.subplots() pulverise_original() sobj = Shelve(FILENAME) ax.plot(*testset(sobj, 1024), label='set') pulverise_original() sobj = Shelve(FILENAME) ax.plot(*testget(sobj, 1024), label='get') pulverise_original() sobj = Shelve(FILENAME) ax.plot(*testin(sobj, 1024), label='in') ax.plot(*testdel(sobj, 1024), label='del') """ sobj = Shelve(FILENAME) sobj.trackkeys = False ax.plot(*test(sobj, 1024), label='keyless_cooperative') pulverise_original() with InstanceLockedShelve(FILENAME) as sobj: ax.plot(*test(sobj, 1024), label='lockhogger') pulverise_original() with InstanceLockedShelve(FILENAME) as sobj: sobj.trackkeys = False ax.plot(*test(sobj, 1024), label='keyless_lockhogger') """ ax.set_xlabel('Created Indexes in Database') ax.set_ylabel('Time to perform a single database operation (milliseconds)') ax.legend() plt.show() pulverise_original() # code.interact(local=dict(globals(), **locals()))
yunyundb
/yunyundb-0.3.0-py3-none-any.whl/yunyun.py
yunyun.py
# 云账户 SDK for Python 欢迎使用云账户 SDK for Python。 云账户是一家专注为平台企业和新就业形态劳动者提供高质量灵活就业服务的新时代企业。云账户 SDK 对云账户综合服务平台 API 接口进行封装,帮助您快速接入到云账户综合服务平台。云账户 SDK for Python 为您提供签约、下单、回调、数据查询等功能,帮助您完成与云账户综合服务平台的接口对接及业务开发。 如果您在使用过程中遇到任何问题,请在当前 GitHub 提交 Issues,或发送邮件至技术支持组 [[email protected]](mailto:[email protected])。 ### 环境要求 云账户 SDK for Python 支持 Python 3.0 及以上版本。 ### 快速使用 #### 通过 PIP 安装 1. 执行以下命令安装云账户 SDK for Python: > pip3 install yunzhanghu_sdk 2. 在您的代码中引用对应模块代码,具体引用方式可参考下文示例 #### 通过源码包安装 1. 前往 [Github 仓库](https://github.com/YunzhanghuOpen/sdk-python) 下载源码压缩包。 2. 解压源码包到您项目的合适位置。 3. 在您的代码中引用对应模块代码,可参考示例。 #### 示例 ``` #提示: #为了保护秘钥安全,建议将密钥配置到环境变量中或者配置文件中。 #请勿在代码中使用硬编码密钥,可能导致密钥暴露,存在安全隐患。 from yunzhanghu_sdk.client.api.model.payment import GetOrderRequest from yunzhanghu_sdk.client.api.payment_client import PaymentClient from yunzhanghu_sdk.config import * if __name__ == "__main__": # 平台企业 ID,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 dealer_id = "xxx" # 综合服务主体 ID,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 broker_id = "xxx" # 签名方式,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 # 签名方式为 RSA,参数固定为:rsa sign_type = "rsa" # 平台企业 App Key,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 app_key = "xxx" # 平台企业 3DES Key,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 des3key = "xxx" # 平台企业私钥,自行生成 RSA 公私钥,私钥请妥善保存,谨防泄露。平台企业公钥请登录云账户综合服务平台配置,选择“业务中心 > 业务管理 > 对接信息”,单击页面右上角的“编辑”,完成平台企业公钥配置。 dealer_private_key = ''' -----BEGIN PRIVATE KEY----- xxx -----END PRIVATE KEY----- ''' # 云账户公钥,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 yzh_public_key = ''' -----BEGIN PUBLIC KEY----- xxx -----END PUBLIC KEY----- ''' # 初始化配置参数 config = Config( # host 请求域名 host="https://api-service.yunzhanghu.com", dealer_id=dealer_id, sign_type=sign_type, app_key=app_key, des3key=des3key, dealer_private_key=dealer_private_key, yzh_public_key=yzh_public_key, ) # 获取订单详情 request = GetOrderRequest( order_id="232211231231231", channel="微信", data_type="encryption" ) # 建议自定义并将 request-id 记录在日志中 # request.request_id = "XXXXX" client = PaymentClient(config) resp = client.get_order(request) print(resp.code, resp.message, resp.request_id, resp.data) ```
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/云账户SDK-for-Python-pypi.md
云账户SDK-for-Python-pypi.md
# 云账户 SDK for Python 欢迎使用云账户 SDK for Python。 云账户是一家专注为平台企业和新就业形态劳动者提供高质量灵活就业服务的新时代企业。云账户 SDK 对云账户综合服务平台 API 接口进行封装,帮助您快速接入到云账户综合服务平台。云账户 SDK for Python 为您提供签约、支付、回调、数据查询等功能,帮助您完成与云账户综合服务平台的接口对接及业务开发。 如果您在使用过程中遇到任何问题,请在当前 GitHub 提交 Issues,或发送邮件至技术支持组 [[email protected]](mailto:[email protected])。 ### 环境要求 云账户 SDK for Python 支持 Python 3.0 及以上版本。 ### 配置密钥 #### 1、获取配置 使用云账户 SDK for Python 前,您需先获取 dealer_id、broker_id、3DES Key、App Key、云账户公钥。 获取方式:使用开户邮件中的账号登录【[云账户综合服务平台](https://service.yunzhanghu.com)】,选择“业务中心 > 业务管理 > 对接信息”,查看并获取以上配置信息。 ![获取配置信息](https://yos.yunzhanghu.com/getobject/duijiexinxi.png?isAttachment=false&fileID=9487bd54b93a5abf49003c2b8ce7e069bfa24220&signature=X%2BR7PocQgPqSpR2xM1TgYU6lAapr%2FB9p3aFof03Gcfw%3D) #### 2、生成密钥 - 方式一:使用 OpenSSL 生成 RSA 公私钥 ``` ① ⽣成私钥 private_key.pem OpenSSL-> genrsa -out private_key.pem 2048 // 建议密钥⻓度⾄少为 2048 位 OpenSSL-> pkcs8 -topk8 -inform PEM -in private_key.pem -outform PEM -nocrypt -out private_key_pkcs8.pem // 将私钥转为 PKCS8 格式 ② ⽣成公钥⽂件 pubkey.pem OpenSSL-> rsa -in private_key.pem -pubout -out pubkey.pem ``` - 方式二:使用工具生成 登录【[云账户开放平台](https://open.yunzhanghu.com)】,选择“开发工具下载 > 开发助手 > 工具下载”,下载安装“云账户开放平台开发助手”。 #### 3、配置密钥 登录【[云账户综合服务平台](https://service.yunzhanghu.com)】,选择“业务中心 > 业务管理 > 对接信息”,单击页面右上角的“编辑”,配置平台企业公钥。 ![配置平台企业公钥信息](https://yos.yunzhanghu.com/getobject/dujiexinxi-2.png?isAttachment=false&fileID=84e3cd1684a61c1e32eb0e7b7f43390cd053206b&signature=mqW8Zbk7h3gYXfzjR99pK%2B0pgVLcLly3VjBB2KsqDvQ%3D) ## 安装 Python SDK ### 通过 PIP 安装 推荐通过 Python 包管理工具 PIP 获取并安装云账户 SDK for Python。PIP 详细介绍请参考[ PIP 官网](https://pypi.org) 。 1. 执行以下命令安装云账户 SDK for Python: > pip3 install yunzhanghu_sdk 2. 在您的代码中引用对应模块代码,具体引用方式可参考下文示例 ### 通过源码包安装 1. 前往 [Github 仓库](https://github.com/YunzhanghuOpen/sdk-python) 下载源码压缩包。 2. 解压源码包到您项目的合适位置。 3. 在您的代码中引用对应模块代码,可参考示例。 ## 快速使用 ### 示例功能列表 - [用户信息验证](yunzhanghu_sdk/example/authentication_example.py) - [用户签约(H5 签约)](yunzhanghu_sdk/example/h5usersign_example.py) or [用户签约(API 签约)](yunzhanghu_sdk/example/apiusersign_example.py) - [个体工商户注册(云账户新经济 H5)](yunzhanghu_sdk/example/bizlicxjjh5_example.py) or [个体工商户注册(云账户新经济 H5+API)](yunzhanghu_sdk/example/bizlicxjjh5api_example.py) - [实时支付](yunzhanghu_sdk/example/payment_example.py) - [异步通知](yunzhanghu_sdk/example/notify_example.py) - [对账文件获取](yunzhanghu_sdk/example/dataservice_example.py) - [发票开具](yunzhanghu_sdk/example/invoice_example.py) #### 示例 ``` #提示: #为了保护秘钥安全,建议将密钥配置到环境变量中或者配置文件中。 #请勿在代码中使用硬编码密钥,可能导致密钥暴露,存在安全隐患。 from yunzhanghu_sdk.client.api.model.payment import GetOrderRequest from yunzhanghu_sdk.client.api.payment_client import PaymentClient from yunzhanghu_sdk.config import * if __name__ == "__main__": # 平台企业 ID,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 dealer_id = "xxx" # 综合服务主体 ID,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 broker_id = "xxx" # 签名方式,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 # 签名方式为 RSA,参数固定为:rsa sign_type = "rsa" # 平台企业 App Key,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 app_key = "xxx" # 平台企业 3DES Key,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 des3key = "xxx" # 平台企业私钥,自行生成 RSA 公私钥,私钥请妥善保存,谨防泄露。平台企业公钥请登录云账户综合服务平台配置,选择“业务中心 > 业务管理 > 对接信息”,单击页面右上角的“编辑”,完成平台企业公钥配置。 dealer_private_key = ''' -----BEGIN PRIVATE KEY----- xxx -----END PRIVATE KEY----- ''' # 云账户公钥,登录云账户综合服务平台,选择“业务中心 > 业务管理 > 对接信息”获取 yzh_public_key = ''' -----BEGIN PUBLIC KEY----- xxx -----END PUBLIC KEY----- ''' # 初始化配置参数 config = Config( # host 请求域名 host="https://api-service.yunzhanghu.com", dealer_id=dealer_id, sign_type=sign_type, app_key=app_key, des3key=des3key, dealer_private_key=dealer_private_key, yzh_public_key=yzh_public_key, ) # 获取订单详情 request = GetOrderRequest( order_id="", channel="", data_type="" ) # 建议自定义并将 request-id 记录在日志中 # request.request_id = "XXXXX" client = PaymentClient(config) resp = client.get_order(request) print(resp.code, resp.message, resp.request_id, resp.data)
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/README.md
README.md
from __future__ import absolute_import, unicode_literals import abc import base64 import hashlib import hmac import json import random import time import pyDes from Crypto.Hash import SHA256 from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 as Signature_pkcs1_v1_5 class TripleDes(object): """ 3DES 加解密 """ def __init__(self, data, de3key): self.__data = data self.__des3key = de3key def encrypt(self): data = bytes(self.__data, encoding="utf8") key = bytes(self.__des3key[0:8], encoding="utf8") return base64.b64encode( pyDes.triple_des(self.__des3key, pyDes.CBC, key, pad=None, padmode=pyDes.PAD_PKCS5).encrypt(data)) def decrypt(self): data = bytes(self.__data, encoding="utf8") key = bytes(self.__des3key[0:8], encoding="utf8") return pyDes.triple_des(self.__des3key, pyDes.CBC, key, pad=None, padmode=pyDes.PAD_PKCS5) \ .decrypt(base64.b64decode(data)) class Signer(abc.ABC): """ 签名 """ @abc.abstractmethod def sign_type(self): return NotImplemented @abc.abstractmethod def sign(self, data, mess, timestamp): return NotImplemented @abc.abstractmethod def verify_sign(self, data, mess, timestamp, signature): return NotImplemented class HmacSigner(Signer): """ Hmac 签名 """ def __init__(self, app_key): self.__app_key = app_key def sign_type(self): return "sha256" def sign(self, data, mess, timestamp): sign_pairs = "data=%s&mess=%s&timestamp=%d&key=%s" % ( str(data, encoding="utf-8"), mess, timestamp, self.__app_key) app_key = bytes(self.__app_key, encoding="utf8") sign_pairs = bytes(sign_pairs, encoding="utf8") return hmac.new(app_key, msg=sign_pairs, digestmod=hashlib.sha256).hexdigest() def verify_sign(self, data, mess, timestamp, signature): sign_pairs = "data=%s&mess=%s&timestamp=%d&key=%s" % (data, mess, timestamp, self.__app_key) app_key = bytes(self.__app_key, encoding="utf8") sign_pairs = bytes(sign_pairs, encoding="utf8") return hmac.new(app_key, msg=sign_pairs, digestmod=hashlib.sha256).hexdigest() == signature class RSASigner(Signer): """ RSA 签名 """ def __init__(self, app_key, public_key, private_key): self.__public_key = RSA.importKey(public_key) if private_key is not None: self.__private_key = RSA.importKey(private_key) self.__app_key = app_key def sign_type(self): return "rsa" def sign(self, data, mess, timestamp): sign_pairs = "data=%s&mess=%s&timestamp=%d&key=%s" % ( str(data, encoding="utf-8"), mess, timestamp, self.__app_key) signer = Signature_pkcs1_v1_5.new(self.__private_key) digest = SHA256.new() digest.update(sign_pairs.encode("utf8")) sign = signer.sign(digest) return base64.b64encode(sign) def verify_sign(self, data, mess, timestamp, signature): sign_pairs = "data=%s&mess=%s&timestamp=%d&key=%s" % (data, mess, timestamp, self.__app_key) signature = base64.b64decode(signature) cipher = Signature_pkcs1_v1_5.new(self.__public_key) digest = SHA256.new() digest.update(sign_pairs.encode("utf8")) return cipher.verify(digest, signature) class ReqMessage(object): """ ReqMessage 请求消息体 """ def __init__(self, encrypt, data, des3key): """ :param encrypt: 加密算法 :type data: {} 请求信息 :param data: 请求信息 """ self.__encrypt = encrypt self.__data = None self.__des3key = des3key if data is not None: self.__data = json.dumps(data, ensure_ascii=False) def pack(self): if self.__data is None: return None timestamp = int(time.time()) mess = "".join(random.sample("1234567890abcdefghijklmnopqrstuvwxy", 10)) encrypt_data = TripleDes(self.__data, self.__des3key).encrypt() return { "data": encrypt_data, "mess": mess, "timestamp": timestamp, "sign": self.__encrypt.sign(encrypt_data, mess, timestamp), "sign_type": self.__encrypt.sign_type() } class RespMessage(object): """ RespMessage 返回信息 """ def __init__(self, des3key, content, req_data, req_param, headers): self.__des3key = des3key self.__content = content dic = json.loads(content) self.__req_param = req_param self.__req_data = req_data self.__code = dic.get("code", None) self.__message = dic.get("message", None) self.__data = dic.get("data") self.__request_id = headers["request-id"] def decrypt(self): if self.__data is None: return self if self.__des3key is not None and self.__req_param is not None \ and self.__req_param.get("data_type", "") == "encryption": self.__data = json.loads(TripleDes(self.__data, self.__des3key).decrypt()) return self @property def code(self): return self.__code @property def message(self): return self.__message @property def data(self): return self.__data @property def content(self): return self.__content @property def request_id(self): return self.__request_id def notify_decoder(public_key, app_key, des3key, data, mess, timestamp, signature, sign_type): res_data, verify_result = "", False if sign_type == "sha256": if HmacSigner(app_key).verify_sign(data, mess, timestamp, signature): res_data = TripleDes(data, des3key).decrypt().decode() verify_result = True else: if RSASigner(app_key, public_key, None).verify_sign(data, mess, timestamp, signature): res_data = TripleDes(data, des3key).decrypt().decode() verify_result = True return verify_result, res_data
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/message.py
message.py
import platform import uuid import requests from .. import __version__ from ..message import * class BaseClient(object): def __init__(self, config, timeout=30): """ :type config: Config :param config: 配置信息 :type timeout: int :param timeout: 请求超时时间。非必填,默认 30 秒 """ sign_type = config.sign_type self.__des3key = config.des3key self.__app_key = config.app_key self.__encrypt = None if sign_type == "sha256": self.__encrypt = HmacSigner(config.app_key) if sign_type == "rsa": self.__encrypt = RSASigner(config.app_key, config.yzh_public_key, config.dealer_private_key) self.__dealer_id = config.dealer_id self.__base_url = config.host self.__timeout = timeout def __header(self, request_id): if type(request_id) is not str or request_id == "": request_id = str(int(time.time())) return { "dealer-id": self.__dealer_id, "request-id": request_id, "Content-Type": "application/x-www-form-urlencoded", "User-Agent": "yunzhanghu-sdk-python/%s/%s/%s" % ( __version__, platform.platform(), platform.python_version()), } def __request(self, method, url, **kwargs): data = kwargs.get("data", None) param = kwargs.get("param", None) headers = self.__header(kwargs["request_id"]) return self.__handle_resp( data, param, headers, requests.request(method=method, url=self.__base_url + url, headers=headers, data=ReqMessage(self.__encrypt, data, self.__des3key).pack(), params=ReqMessage(self.__encrypt, param, self.__des3key).pack(), timeout=self.__timeout)) def _post(self, url, request_id, data): kwargs = {"data": data, "request_id": request_id} return self.__request(method="POST", url=url, **kwargs) def _get(self, url, request_id, param): kwargs = {"param": param, "request_id": request_id} return self.__request(method="GET", url=url, **kwargs) def __handle_resp(self, req_data, req_param, headers, resp): if resp is None: raise ValueError("resp is None") resp.raise_for_status() return RespMessage(self.__des3key, resp.text, req_data, req_param, headers).decrypt() class BaseRequest(object): def __init__(self): self.__request_id = uuid.uuid1() @property def request_id(self): """ Get 请求 ID :return: str, dealer_id """ if self.__request_id is None or self.__request_id == "": self.__request_id = uuid.uuid1() return self.__request_id.__str__() @request_id.setter def request_id(self, request_id): """ Set 请求 ID :type request_id: str :param request_id: 请求 ID """ self.__request_id = request_id
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/base.py
base.py
from .model.dataservice import * from ..base import BaseClient from ...utils import Utils class DataServiceClient(BaseClient): def __init__(self, config): super().__init__(config) def list_daily_order(self, request: ListDailyOrderRequest): """ 查询日订单数据 :type request: ListDailyOrderRequest :param request: the ListDailyOrderRequest request parameters class. :return: ListDailyOrderResponse """ return self._get( "/api/dataservice/v1/orders", request.request_id, Utils.copy_dict(request.__dict__) ) def get_daily_order_file(self, request: GetDailyOrderFileRequest): """ 查询日订单文件 :type request: GetDailyOrderFileRequest :param request: the GetDailyOrderFileRequest request parameters class. :return: GetDailyOrderFileResponse """ return self._get( "/api/dataservice/v1/order/downloadurl", request.request_id, Utils.copy_dict(request.__dict__) ) def get_daily_order_file_v2(self, request: GetDailyOrderFileV2Request): """ 查询日订单文件(支付和退款订单) :type request: GetDailyOrderFileV2Request :param request: the GetDailyOrderFileV2Request request parameters class. :return: GetDailyOrderFileV2Response """ return self._get( "/api/dataservice/v1/order/day/url", request.request_id, Utils.copy_dict(request.__dict__) ) def list_daily_bill(self, request: ListDailyBillRequest): """ 查询日流水数据 :type request: ListDailyBillRequest :param request: the ListDailyBillRequest request parameters class. :return: ListDailyBillResponse """ return self._get( "/api/dataservice/v1/bills", request.request_id, Utils.copy_dict(request.__dict__) ) def get_daily_bill_file_v2(self, request: GetDailyBillFileV2Request): """ 查询日流水文件 :type request: GetDailyBillFileV2Request :param request: the GetDailyBillFileV2Request request parameters class. :return: GetDailyBillFileV2Response """ return self._get( "/api/dataservice/v2/bill/downloadurl", request.request_id, Utils.copy_dict(request.__dict__) ) def list_dealer_recharge_record_v2(self, request: ListDealerRechargeRecordV2Request): """ 查询平台企业预付业务服务费记录 :type request: ListDealerRechargeRecordV2Request :param request: the ListDealerRechargeRecordV2Request request parameters class. :return: ListDealerRechargeRecordV2Response """ return self._get( "/api/dataservice/v2/recharge-record", request.request_id, Utils.copy_dict(request.__dict__) ) def list_balance_daily_statement(self, request: ListBalanceDailyStatementRequest): """ 查询余额日账单数据 :type request: ListBalanceDailyStatementRequest :param request: the ListBalanceDailyStatementRequest request parameters class. :return: ListBalanceDailyStatementResponse """ return self._get( "/api/dataservice/v1/statements-daily", request.request_id, Utils.copy_dict(request.__dict__) )
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/dataservice_client.py
dataservice_client.py
from .model.apiusersign import * from ..base import BaseClient from ...utils import Utils class ApiUserSignServiceClient(BaseClient): def __init__(self, config): super().__init__(config) def api_use_sign_contract(self, request: ApiUseSignContractRequest): """ 获取协议预览 URL :type request: ApiUseSignContractRequest :param request: the ApiUseSignContractRequest request parameters class. :return: ApiUseSignContractResponse """ return self._get( "/api/sign/v1/user/contract", request.request_id, Utils.copy_dict(request.__dict__) ) def api_user_sign_contract(self, request: ApiUserSignContractRequest): """ 获取协议预览 URL V2 :type request: ApiUserSignContractRequest :param request: the ApiUserSignContractRequest request parameters class. :return: ApiUserSignContractResponse """ return self._get( "/api/sign/v1/user/contract", request.request_id, Utils.copy_dict(request.__dict__) ) def api_user_sign(self, request: ApiUserSignRequest): """ 用户签约 :type request: ApiUserSignRequest :param request: the ApiUserSignRequest request parameters class. :return: ApiUserSignResponse """ return self._post( "/api/sign/v1/user/sign", request.request_id, Utils.copy_dict(request.__dict__) ) def get_api_user_sign_status(self, request: GetApiUserSignStatusRequest): """ 获取用户签约状态 :type request: GetApiUserSignStatusRequest :param request: the GetApiUserSignStatusRequest request parameters class. :return: GetApiUserSignStatusResponse """ return self._get( "/api/sign/v1/user/status", request.request_id, Utils.copy_dict(request.__dict__) ) def api_user_sign_release(self, request: ApiUserSignReleaseRequest): """ 用户解约(测试账号专用接口) :type request: ApiUserSignReleaseRequest :param request: the ApiUserSignReleaseRequest request parameters class. :return: ApiUserSignReleaseResponse """ return self._post( "/api/sign/v1/user/release", request.request_id, Utils.copy_dict(request.__dict__) )
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/apiusersign_client.py
apiusersign_client.py
from .model.authentication import * from ..base import BaseClient from ...utils import Utils class AuthenticationClient(BaseClient): def __init__(self, config): super().__init__(config) def bank_card_four_auth_verify(self, request: BankCardFourAuthVerifyRequest): """ 银行卡四要素鉴权请求(下发短信验证码) :type request: BankCardFourAuthVerifyRequest :param request: the BankCardFourAuthVerifyRequest request parameters class. :return: BankCardFourAuthVerifyResponse """ return self._post( "/authentication/verify-request", request.request_id, Utils.copy_dict(request.__dict__) ) def bank_card_four_auth_confirm(self, request: BankCardFourAuthConfirmRequest): """ 银行卡四要素确认请求(上传短信验证码) :type request: BankCardFourAuthConfirmRequest :param request: the BankCardFourAuthConfirmRequest request parameters class. :return: BankCardFourAuthConfirmResponse """ return self._post( "/authentication/verify-confirm", request.request_id, Utils.copy_dict(request.__dict__) ) def bank_card_four_verify(self, request: BankCardFourVerifyRequest): """ 银行卡四要素验证 :type request: BankCardFourVerifyRequest :param request: the BankCardFourVerifyRequest request parameters class. :return: BankCardFourVerifyResponse """ return self._post( "/authentication/verify-bankcard-four-factor", request.request_id, Utils.copy_dict(request.__dict__) ) def bank_card_three_verify(self, request: BankCardThreeVerifyRequest): """ 银行卡三要素验证 :type request: BankCardThreeVerifyRequest :param request: the BankCardThreeVerifyRequest request parameters class. :return: BankCardThreeVerifyResponse """ return self._post( "/authentication/verify-bankcard-three-factor", request.request_id, Utils.copy_dict(request.__dict__) ) def id_card_verify(self, request: IDCardVerifyRequest): """ 身份证实名验证 :type request: IDCardVerifyRequest :param request: the IDCardVerifyRequest request parameters class. :return: IDCardVerifyResponse """ return self._post( "/authentication/verify-id", request.request_id, Utils.copy_dict(request.__dict__) ) def user_exempted_info(self, request: UserExemptedInfoRequest): """ 上传免验证用户名单信息 :type request: UserExemptedInfoRequest :param request: the UserExemptedInfoRequest request parameters class. :return: UserExemptedInfoResponse """ return self._post( "/api/payment/v1/user/exempted/info", request.request_id, Utils.copy_dict(request.__dict__) ) def user_white_check(self, request: UserWhiteCheckRequest): """ 查看免验证用户名单是否存在 :type request: UserWhiteCheckRequest :param request: the UserWhiteCheckRequest request parameters class. :return: UserWhiteCheckResponse """ return self._post( "/api/payment/v1/user/white/check", request.request_id, Utils.copy_dict(request.__dict__) ) def get_bank_card_info(self, request: GetBankCardInfoRequest): """ 银行卡信息查询接口 :type request: GetBankCardInfoRequest :param request: the GetBankCardInfoRequest request parameters class. :return: GetBankCardInfoResponse """ return self._get( "/api/payment/v1/card", request.request_id, Utils.copy_dict(request.__dict__) )
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/authentication_client.py
authentication_client.py
from .model.payment import * from ..base import BaseClient from ...utils import Utils class PaymentClient(BaseClient): def __init__(self, config): super().__init__(config) def create_bankpay_order(self, request: CreateBankpayOrderRequest): """ 银行卡实时支付 :type request: CreateBankpayOrderRequest :param request: the CreateBankpayOrderRequest request parameters class. :return: CreateBankpayOrderResponse """ return self._post( "/api/payment/v1/order-bankpay", request.request_id, Utils.copy_dict(request.__dict__) ) def create_alipay_order(self, request: CreateAlipayOrderRequest): """ 支付宝实时支付 :type request: CreateAlipayOrderRequest :param request: the CreateAlipayOrderRequest request parameters class. :return: CreateAlipayOrderResponse """ return self._post( "/api/payment/v1/order-alipay", request.request_id, Utils.copy_dict(request.__dict__) ) def create_wxpay_order(self, request: CreateWxpayOrderRequest): """ 微信实时支付 :type request: CreateWxpayOrderRequest :param request: the CreateWxpayOrderRequest request parameters class. :return: CreateWxpayOrderResponse """ return self._post( "/api/payment/v1/order-wxpay", request.request_id, Utils.copy_dict(request.__dict__) ) def get_order(self, request: GetOrderRequest): """ 查询单笔订单信息 :type request: GetOrderRequest :param request: the GetOrderRequest request parameters class. :return: GetOrderResponse """ return self._get( "/api/payment/v1/query-order", request.request_id, Utils.copy_dict(request.__dict__) ) def get_dealer_va_recharge_account(self, request: GetDealerVARechargeAccountRequest): """ 查询平台企业汇款信息 :type request: GetDealerVARechargeAccountRequest :param request: the GetDealerVARechargeAccountRequest request parameters class. :return: GetDealerVARechargeAccountResponse """ return self._get( "/api/payment/v1/va-account", request.request_id, Utils.copy_dict(request.__dict__) ) def list_account(self, request: ListAccountRequest): """ 查询平台企业余额 :type request: ListAccountRequest :param request: the ListAccountRequest request parameters class. :return: ListAccountResponse """ return self._get( "/api/payment/v1/query-accounts", request.request_id, Utils.copy_dict(request.__dict__) ) def get_ele_receipt_file(self, request: GetEleReceiptFileRequest): """ 查询电子回单 :type request: GetEleReceiptFileRequest :param request: the GetEleReceiptFileRequest request parameters class. :return: GetEleReceiptFileResponse """ return self._get( "/api/payment/v1/receipt/file", request.request_id, Utils.copy_dict(request.__dict__) ) def cancel_order(self, request: CancelOrderRequest): """ 取消待支付订单 :type request: CancelOrderRequest :param request: the CancelOrderRequest request parameters class. :return: CancelOrderResponse """ return self._post( "/api/payment/v1/order/fail", request.request_id, Utils.copy_dict(request.__dict__) ) def create_batch_order(self, request: CreateBatchOrderRequest): """ 批次下单 :type request: CreateBatchOrderRequest :param request: the CreateBatchOrderRequest request parameters class. :return: CreateBatchOrderResponse """ return self._post( "/api/payment/v1/order-batch", request.request_id, Utils.copy_dict(request.__dict__) ) def confirm_batch_order(self, request: ConfirmBatchOrderRequest): """ 批次确认 :type request: ConfirmBatchOrderRequest :param request: the ConfirmBatchOrderRequest request parameters class. :return: ConfirmBatchOrderResponse """ return self._post( "/api/payment/v1/confirm-batch", request.request_id, Utils.copy_dict(request.__dict__) )
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/payment_client.py
payment_client.py
from .model.invoice import * from ..base import BaseClient from ...utils import Utils class InvoiceClient(BaseClient): def __init__(self, config): super().__init__(config) def get_invoice_stat(self, request: GetInvoiceStatRequest): """ 查询平台企业已开具和待开具发票金额 :type request: GetInvoiceStatRequest :param request: the GetInvoiceStatRequest request parameters class. :return: GetInvoiceStatResponse """ return self._get( "/api/payment/v1/invoice-stat", request.request_id, Utils.copy_dict(request.__dict__) ) def get_invoice_amount(self, request: GetInvoiceAmountRequest): """ 查询可开具发票额度和发票开具信息 :type request: GetInvoiceAmountRequest :param request: the GetInvoiceAmountRequest request parameters class. :return: GetInvoiceAmountResponse """ return self._post( "/api/invoice/v2/invoice-amount", request.request_id, Utils.copy_dict(request.__dict__) ) def apply_invoice(self, request: ApplyInvoiceRequest): """ 发票开具申请 :type request: ApplyInvoiceRequest :param request: the ApplyInvoiceRequest request parameters class. :return: ApplyInvoiceResponse """ return self._post( "/api/invoice/v2/apply", request.request_id, Utils.copy_dict(request.__dict__) ) def get_invoice_status(self, request: GetInvoiceStatusRequest): """ 查询发票开具申请状态 :type request: GetInvoiceStatusRequest :param request: the GetInvoiceStatusRequest request parameters class. :return: GetInvoiceStatusResponse """ return self._post( "/api/invoice/v2/invoice/invoice-status", request.request_id, Utils.copy_dict(request.__dict__) ) def get_invoice_information(self, request: GetInvoiceInformationRequest): """ 查询发票信息 :type request: GetInvoiceInformationRequest :param request: the GetInvoiceInformationRequest request parameters class. :return: GetInvoiceInformationResponse """ return self._post( "/api/invoice/v2/invoice-face-information", request.request_id, Utils.copy_dict(request.__dict__) ) def get_invoice_file(self, request: GetInvoiceFileRequest): """ 下载 PDF 版发票 :type request: GetInvoiceFileRequest :param request: the GetInvoiceFileRequest request parameters class. :return: GetInvoiceFileResponse """ return self._post( "/api/invoice/v2/invoice/invoice-pdf", request.request_id, Utils.copy_dict(request.__dict__) ) def send_reminder_email(self, request: SendReminderEmailRequest): """ 发送发票扫描件压缩包下载链接邮件 :type request: SendReminderEmailRequest :param request: the SendReminderEmailRequest request parameters class. :return: SendReminderEmailResponse """ return self._post( "/api/invoice/v2/invoice/reminder/email", request.request_id, Utils.copy_dict(request.__dict__) )
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/invoice_client.py
invoice_client.py
from ...base import BaseRequest class GetInvoiceStatRequest(BaseRequest): """ 查询平台企业已开具和待开具发票金额请求 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type year: int :param year: 查询年份 """ def __init__( self, broker_id=None, dealer_id=None, year=None ): super().__init__() self.broker_id = broker_id self.dealer_id = dealer_id self.year = year class GetInvoiceStatResponse(BaseRequest): """ 查询平台企业已开具和待开具发票金额返回 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type invoiced: string :param invoiced: 已开发票金额 :type invoicing: string :param invoicing: 开票中发票金额 :type not_invoiced: string :param not_invoiced: 待开发票金额 """ def __init__( self, dealer_id=None, broker_id=None, invoiced=None, invoicing=None, not_invoiced=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.invoiced = invoiced self.invoicing = invoicing self.not_invoiced = not_invoiced class GetInvoiceAmountRequest(BaseRequest): """ 查询可开具发票额度和发票开具信息请求 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID """ def __init__( self, broker_id=None, dealer_id=None ): super().__init__() self.broker_id = broker_id self.dealer_id = dealer_id class GetInvoiceAmountResponse(BaseRequest): """ 查询可开具发票额度和发票开具信息返回 :type amount: string :param amount: 可开票额度 :type bank_name_account: list :param bank_name_account: 系统支持的开户行及账号 :type goods_services_name: list :param goods_services_name: 系统支持的货物或应税劳务、服务名称 """ def __init__( self, amount=None, bank_name_account=None, goods_services_name=None ): super().__init__() self.amount = amount self.bank_name_account = bank_name_account self.goods_services_name = goods_services_name class ApplyInvoiceRequest(BaseRequest): """ 发票开具申请请求 :type invoice_apply_id: string :param invoice_apply_id: 发票申请编号 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type amount: string :param amount: 申请开票金额 :type invoice_type: string :param invoice_type: 发票类型 :type bank_name_account: string :param bank_name_account: 开户行及账号 :type goods_services_name: string :param goods_services_name: 货物或应税劳务、服务名称 :type remark: string :param remark: 发票备注 """ def __init__( self, invoice_apply_id=None, broker_id=None, dealer_id=None, amount=None, invoice_type=None, bank_name_account=None, goods_services_name=None, remark=None ): super().__init__() self.invoice_apply_id = invoice_apply_id self.broker_id = broker_id self.dealer_id = dealer_id self.amount = amount self.invoice_type = invoice_type self.bank_name_account = bank_name_account self.goods_services_name = goods_services_name self.remark = remark class ApplyInvoiceResponse(BaseRequest): """ 发票开具申请返回 :type application_id: string :param application_id: 发票申请单 ID :type count: int :param count: 发票张数 """ def __init__( self, application_id=None, count=None ): super().__init__() self.application_id = application_id self.count = count class GetInvoiceStatusRequest(BaseRequest): """ 查询发票开具申请状态请求 :type invoice_apply_id: string :param invoice_apply_id: 发票申请编号 :type application_id: string :param application_id: 发票申请单 ID """ def __init__( self, invoice_apply_id=None, application_id=None ): super().__init__() self.invoice_apply_id = invoice_apply_id self.application_id = application_id class GetInvoiceStatusResponse(BaseRequest): """ 查询发票开具申请状态返回 :type status: string :param status: 申请结果 :type count: int :param count: 发票张数 :type price_tax_amount: string :param price_tax_amount: 价税合计 :type price_amount: string :param price_amount: 不含税金额 :type tax_amount: string :param tax_amount: 税额 :type invoice_type: string :param invoice_type: 发票类型 :type customer_name: string :param customer_name: 购方名称 :type customer_tax_num: string :param customer_tax_num: 纳税人识别号 :type customer_address_tel: string :param customer_address_tel: 购方地址、电话 :type bank_name_account: string :param bank_name_account: 开户行及账号 :type goods_services_name: string :param goods_services_name: 货物或应税劳务、服务名称 :type remark: string :param remark: 发票备注 :type post_type: string :param post_type: 邮寄类型 :type waybill_number: list :param waybill_number: 快递单号 """ def __init__( self, status=None, count=None, price_tax_amount=None, price_amount=None, tax_amount=None, invoice_type=None, customer_name=None, customer_tax_num=None, customer_address_tel=None, bank_name_account=None, goods_services_name=None, remark=None, post_type=None, waybill_number=None ): super().__init__() self.status = status self.count = count self.price_tax_amount = price_tax_amount self.price_amount = price_amount self.tax_amount = tax_amount self.invoice_type = invoice_type self.customer_name = customer_name self.customer_tax_num = customer_tax_num self.customer_address_tel = customer_address_tel self.bank_name_account = bank_name_account self.goods_services_name = goods_services_name self.remark = remark self.post_type = post_type self.waybill_number = waybill_number class GetInvoiceInformationRequest(BaseRequest): """ 查询发票信息请求 :type invoice_apply_id: string :param invoice_apply_id: 发票申请编号 :type application_id: string :param application_id: 发票申请单 ID """ def __init__( self, invoice_apply_id=None, application_id=None ): super().__init__() self.invoice_apply_id = invoice_apply_id self.application_id = application_id class GetInvoiceInformationResponse(BaseRequest): """ 查询发票信息返回 :type information: list :param information: 发票信息 """ def __init__( self, information=None ): super().__init__() self.information = information class InformationDataInfo(BaseRequest): """ 查询发票信息返回 :type goods_services_name: string :param goods_services_name: 货物或应税劳务、服务名称 :type invoice_num: string :param invoice_num: 发票号码 :type invoice_code: string :param invoice_code: 发票代码 :type price_amount: string :param price_amount: 不含税金额 :type tax_amount: string :param tax_amount: 税额 :type tax_rate: string :param tax_rate: 税率 :type price_tax_amount: string :param price_tax_amount: 价税合计 :type invoiced_date: string :param invoiced_date: 开票日期 """ def __init__( self, goods_services_name=None, invoice_num=None, invoice_code=None, price_amount=None, tax_amount=None, tax_rate=None, price_tax_amount=None, invoiced_date=None ): super().__init__() self.goods_services_name = goods_services_name self.invoice_num = invoice_num self.invoice_code = invoice_code self.price_amount = price_amount self.tax_amount = tax_amount self.tax_rate = tax_rate self.price_tax_amount = price_tax_amount self.invoiced_date = invoiced_date class BankNameAccount(BaseRequest): """ 系统支持的开户行及账号 :type item: string :param item: 开户行及账号 :type default: bool :param default: 是否为默认值 """ def __init__( self, item=None, default=None ): super().__init__() self.item = item self.default = default class GoodsServicesName(BaseRequest): """ 系统支持的货物或应税劳务、服务名称 :type item: string :param item: 货物或应税劳务、服务名称 :type default: bool :param default: 是否为默认值 """ def __init__( self, item=None, default=None ): super().__init__() self.item = item self.default = default class GetInvoiceFileRequest(BaseRequest): """ 下载 PDF 版发票请求 :type invoice_apply_id: string :param invoice_apply_id: 发票申请编号 :type application_id: string :param application_id: 发票申请单 ID """ def __init__( self, invoice_apply_id=None, application_id=None ): super().__init__() self.invoice_apply_id = invoice_apply_id self.application_id = application_id class GetInvoiceFileResponse(BaseRequest): """ 下载 PDF 版发票返回 :type url: string :param url: 下载地址 :type name: string :param name: 文件名称 """ def __init__( self, url=None, name=None ): super().__init__() self.url = url self.name = name class SendReminderEmailRequest(BaseRequest): """ 发送发票扫描件压缩包下载链接邮件请求 :type invoice_apply_id: string :param invoice_apply_id: 发票申请编号 :type application_id: string :param application_id: 发票申请单 ID """ def __init__( self, invoice_apply_id=None, application_id=None ): super().__init__() self.invoice_apply_id = invoice_apply_id self.application_id = application_id class SendReminderEmailResponse(BaseRequest): """ 发送发票扫描件压缩包下载链接邮件返回 """ class NotifyInvoiceDoneRequest(BaseRequest): """ 发票开具完成通知 :type application_id: string :param application_id: 发票申请单 ID :type invoice_apply_id: string :param invoice_apply_id: 发票申请编号 :type status: string :param status: 申请结果 :type count: int :param count: 发票张数 :type price_tax_amount: string :param price_tax_amount: 价税合计 :type price_amount: string :param price_amount: 不含税金额 :type tax_amount: string :param tax_amount: 税额 :type invoice_type: string :param invoice_type: 发票类型 :type customer_name: string :param customer_name: 购方名称 :type customer_tax_num: string :param customer_tax_num: 纳税人识别号 :type customer_address_tel: string :param customer_address_tel: 购方地址、电话 :type bank_name_account: string :param bank_name_account: 开户行及账号 :type goods_services_name: string :param goods_services_name: 货物或应税劳务、服务名称 :type remark: string :param remark: 发票备注 :type post_type: string :param post_type: 邮寄类型 :type waybill_number: list :param waybill_number: 快递单号 :type reject_reason: string :param reject_reason: 驳回原因 """ def __init__( self, application_id=None, invoice_apply_id=None, status=None, count=None, price_tax_amount=None, price_amount=None, tax_amount=None, invoice_type=None, customer_name=None, customer_tax_num=None, customer_address_tel=None, bank_name_account=None, goods_services_name=None, remark=None, post_type=None, waybill_number=None, reject_reason=None ): super().__init__() self.application_id = application_id self.invoice_apply_id = invoice_apply_id self.status = status self.count = count self.price_tax_amount = price_tax_amount self.price_amount = price_amount self.tax_amount = tax_amount self.invoice_type = invoice_type self.customer_name = customer_name self.customer_tax_num = customer_tax_num self.customer_address_tel = customer_address_tel self.bank_name_account = bank_name_account self.goods_services_name = goods_services_name self.remark = remark self.post_type = post_type self.waybill_number = waybill_number self.reject_reason = reject_reason
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/model/invoice.py
invoice.py
from ...base import BaseRequest class H5GetStartUrlRequest(BaseRequest): """ 预启动请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_user_id: string :param dealer_user_id: 平台企业端的用户 ID :type client_type: int :param client_type: 客户端类型 :type notify_url: string :param notify_url: 异步通知 URL :type color: string :param color: H5 页面主题颜色 :type return_url: string :param return_url: 跳转 URL :type customer_title: int :param customer_title: H5 页面 Title """ def __init__( self, dealer_id=None, broker_id=None, dealer_user_id=None, client_type=None, notify_url=None, color=None, return_url=None, customer_title=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.dealer_user_id = dealer_user_id self.client_type = client_type self.notify_url = notify_url self.color = color self.return_url = return_url self.customer_title = customer_title class H5GetStartUrlResponse(BaseRequest): """ 预启动返回 :type h5_url: string :param h5_url: 跳转 URL """ def __init__( self, h5_url=None ): super().__init__() self.h5_url = h5_url class H5EcoCityAicStatusRequest(BaseRequest): """ 查询个体工商户状态请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_user_id: string :param dealer_user_id: 平台企业端的用户 ID :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 :type open_id: string :param open_id: 用户唯一标识 """ def __init__( self, dealer_id=None, broker_id=None, dealer_user_id=None, id_card=None, real_name=None, open_id=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.dealer_user_id = dealer_user_id self.id_card = id_card self.real_name = real_name self.open_id = open_id class H5EcoCityAicStatusResponse(BaseRequest): """ 查询个体工商户状态返回 :type status: int :param status: 用户签约状态 :type status_message: string :param status_message: 注册状态描述 :type status_detail: int :param status_detail: 注册详情状态码 :type status_detail_message: string :param status_detail_message: 注册详情状态码描述 :type applyed_at: string :param applyed_at: 注册发起时间 :type registed_at: string :param registed_at: 注册完成时间 :type uscc: string :param uscc: 统一社会信用代码 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 """ def __init__( self, status=None, status_message=None, status_detail=None, status_detail_message=None, applyed_at=None, registed_at=None, uscc=None, id_card=None, real_name=None ): super().__init__() self.status = status self.status_message = status_message self.status_detail = status_detail self.status_detail_message = status_detail_message self.applyed_at = applyed_at self.registed_at = registed_at self.uscc = uscc self.id_card = id_card self.real_name = real_name class NotifyH5EcoCityAicRequest(BaseRequest): """ 结果回调 :type open_id: string :param open_id: 用户唯一标识 :type dealer_user_id: string :param dealer_user_id: 平台企业端的用户 ID :type submit_at: string :param submit_at: 注册/注销提交时间 :type registed_at: string :param registed_at: 注册/注销完成时间 :type status: int :param status: 用户签约状态 :type status_message: string :param status_message: 注册状态描述 :type status_detail: int :param status_detail: 注册详情状态码 :type status_detail_message: string :param status_detail_message: 注册详情状态码描述 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type uscc: string :param uscc: 统一社会信用代码 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 :type type: int :param type: 回调类型 """ def __init__( self, open_id=None, dealer_user_id=None, submit_at=None, registed_at=None, status=None, status_message=None, status_detail=None, status_detail_message=None, dealer_id=None, broker_id=None, uscc=None, id_card=None, real_name=None, type=None ): super().__init__() self.open_id = open_id self.dealer_user_id = dealer_user_id self.submit_at = submit_at self.registed_at = registed_at self.status = status self.status_message = status_message self.status_detail = status_detail self.status_detail_message = status_detail_message self.dealer_id = dealer_id self.broker_id = broker_id self.uscc = uscc self.id_card = id_card self.real_name = real_name self.type = type
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/model/bizlicxjjh5.py
bizlicxjjh5.py
from ...base import BaseRequest class H5UserPresignRequest(BaseRequest): """ 预申请签约请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type real_name: string :param real_name: 姓名 :type id_card: string :param id_card: 证件号码 :type certificate_type: int :param certificate_type: 证件类型 0:身份证 2:港澳居民来往内地通行证 3:护照 5:台湾居民来往大陆通行证 9:港澳居民居住证 10:台湾居民居住证 11:外国人永久居留身份证 12:外国人工作许可证 """ def __init__( self, dealer_id=None, broker_id=None, real_name=None, id_card=None, certificate_type=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.real_name = real_name self.id_card = id_card self.certificate_type = certificate_type class H5UserPresignResponse(BaseRequest): """ 预申请签约返回 :type uid: string :param uid: 用户 ID(废弃字段) :type token: string :param token: H5 签约 token :type status: int :param status: 签约状态 """ def __init__( self, uid=None, token=None, status=None ): super().__init__() self.uid = uid self.token = token self.status = status class H5UserSignRequest(BaseRequest): """ 申请签约请求 :type token: string :param token: H5 签约 token :type color: string :param color: H5 页面主题颜色 :type url: string :param url: 回调 URL 地址 :type redirect_url: string :param redirect_url: 跳转 URL """ def __init__( self, token=None, color=None, url=None, redirect_url=None ): super().__init__() self.token = token self.color = color self.url = url self.redirect_url = redirect_url class H5UserSignResponse(BaseRequest): """ 申请签约返回 :type url: string :param url: H5 签约页面 URL """ def __init__( self, url=None ): super().__init__() self.url = url class GetH5UserSignStatusRequest(BaseRequest): """ 获取用户签约状态请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type real_name: string :param real_name: 姓名 :type id_card: string :param id_card: 证件号码 """ def __init__( self, dealer_id=None, broker_id=None, real_name=None, id_card=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.real_name = real_name self.id_card = id_card class GetH5UserSignStatusResponse(BaseRequest): """ 获取用户签约状态返回 :type signed_at: string :param signed_at: 签约时间 :type status: int :param status: 用户签约状态 """ def __init__( self, signed_at=None, status=None ): super().__init__() self.signed_at = signed_at self.status = status class H5UserReleaseRequest(BaseRequest): """ 用户解约(测试账号专用接口)请求 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type real_name: string :param real_name: 姓名 :type id_card: string :param id_card: 证件号码 :type certificate_type: int :param certificate_type: 证件类型 0:身份证 2:港澳居民来往内地通行证 3:护照 5:台湾居民来往大陆通行证 9:港澳居民居住证 10:台湾居民居住证 11:外国人永久居留身份证 12:外国人工作许可证 """ def __init__( self, broker_id=None, dealer_id=None, real_name=None, id_card=None, certificate_type=None ): super().__init__() self.broker_id = broker_id self.dealer_id = dealer_id self.real_name = real_name self.id_card = id_card self.certificate_type = certificate_type class H5UserReleaseResponse(BaseRequest): """ 用户解约(测试账号专用接口)返回 :type status: string :param status: 是否解约成功 """ def __init__( self, status=None ): super().__init__() self.status = status class NotifyH5UserSignRequest(BaseRequest): """ 签约回调 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type real_name: string :param real_name: 姓名 :type id_card: string :param id_card: 证件号码 :type phone: string :param phone: 预签约手机号 """ def __init__( self, dealer_id=None, broker_id=None, real_name=None, id_card=None, phone=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.real_name = real_name self.id_card = id_card self.phone = phone
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/model/h5usersign.py
h5usersign.py
from ...base import BaseRequest class GetDailyOrderFileRequest(BaseRequest): """ 查询日订单文件请求 :type order_date: string :param order_date: 订单查询日期, 格式:yyyy-MM-dd """ def __init__( self, order_date=None ): super().__init__() self.order_date = order_date class GetDailyOrderFileResponse(BaseRequest): """ 查询日订单文件返回 :type order_download_url: string :param order_download_url: 下载地址 """ def __init__( self, order_download_url=None ): super().__init__() self.order_download_url = order_download_url class GetDailyBillFileV2Request(BaseRequest): """ 查询日流水文件请求 :type bill_date: string :param bill_date: 所需获取的日流水日期,格式:yyyy-MM-dd """ def __init__( self, bill_date=None ): super().__init__() self.bill_date = bill_date class GetDailyBillFileV2Response(BaseRequest): """ 查询日流水文件返回 :type bill_download_url: string :param bill_download_url: 下载地址 """ def __init__( self, bill_download_url=None ): super().__init__() self.bill_download_url = bill_download_url class ListDealerRechargeRecordV2Request(BaseRequest): """ 平台企业预付业务服务费记录请求 :type begin_at: string :param begin_at: 开始时间,格式:yyyy-MM-dd :type end_at: string :param end_at: 结束时间,格式:yyyy-MM-dd """ def __init__( self, begin_at=None, end_at=None ): super().__init__() self.begin_at = begin_at self.end_at = end_at class ListDealerRechargeRecordV2Response(BaseRequest): """ 平台企业预付业务服务费记录返回 :type data: list :param data: 预付业务服务费记录 """ def __init__( self, data=None ): super().__init__() self.data = data class RechargeRecordInfo(BaseRequest): """ 预付业务服务费记录信息 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type recharge_id: string :param recharge_id: 预付业务服务费记录 ID :type amount: string :param amount: 预付业务服务费 :type actual_amount: string :param actual_amount: 实际到账金额 :type created_at: string :param created_at: 创建时间 :type recharge_channel: string :param recharge_channel: 资金用途 :type remark: string :param remark: 预付业务服务费备注 :type recharge_account_no: string :param recharge_account_no: 平台企业付款银行账号 """ def __init__( self, dealer_id=None, broker_id=None, recharge_id=None, amount=None, actual_amount=None, created_at=None, recharge_channel=None, remark=None, recharge_account_no=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.recharge_id = recharge_id self.amount = amount self.actual_amount = actual_amount self.created_at = created_at self.recharge_channel = recharge_channel self.remark = remark self.recharge_account_no = recharge_account_no class ListDailyOrderRequest(BaseRequest): """ 查询日订单数据请求 :type order_date: string :param order_date: 订单查询日期, 格式:yyyy-MM-dd格式:yyyy-MM-dd :type offset: int :param offset: 偏移量 :type length: int :param length: 长度 :type channel: string :param channel: 支付路径名,银行卡(默认)、支付宝、微信 :type data_type: string :param data_type: 如果为 encryption,则对返回的 data 进行加密 """ def __init__( self, order_date=None, offset=None, length=None, channel=None, data_type=None ): super().__init__() self.order_date = order_date self.offset = offset self.length = length self.channel = channel self.data_type = data_type class ListDailyOrderResponse(BaseRequest): """ 查询日订单数据返回 :type total_num: int :param total_num: 总数目 :type list: list :param list: 条目信息 """ def __init__( self, total_num=None, list=None ): super().__init__() self.total_num = total_num self.list = list class DealerOrderInfo(BaseRequest): """ 平台企业支付订单信息 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type order_id: string :param order_id: 平台企业订单号 :type ref: string :param ref: 订单流水号 :type batch_id: string :param batch_id: 批次ID :type real_name: string :param real_name: 姓名 :type card_no: string :param card_no: 收款账号 :type broker_amount: string :param broker_amount: 综合服务主体订单金额 :type broker_fee: string :param broker_fee: 综合服务主体加成服务费 :type bill: string :param bill: 支付路径流水号 :type status: string :param status: 订单状态 :type status_message: string :param status_message: 订单状态码描述 :type status_detail: string :param status_detail: 订单详情 :type status_detail_message: string :param status_detail_message: 订单详细状态码描述 :type statement_id: string :param statement_id: 短周期授信账单号 :type fee_statement_id: string :param fee_statement_id: 服务费账单号 :type bal_statement_id: string :param bal_statement_id: 余额账单号 :type channel: string :param channel: 支付路径 :type created_at: string :param created_at: 创建时间 :type finished_time: string :param finished_time: 完成时间 """ def __init__( self, broker_id=None, dealer_id=None, order_id=None, ref=None, batch_id=None, real_name=None, card_no=None, broker_amount=None, broker_fee=None, bill=None, status=None, status_message=None, status_detail=None, status_detail_message=None, statement_id=None, fee_statement_id=None, bal_statement_id=None, channel=None, created_at=None, finished_time=None ): super().__init__() self.broker_id = broker_id self.dealer_id = dealer_id self.order_id = order_id self.ref = ref self.batch_id = batch_id self.real_name = real_name self.card_no = card_no self.broker_amount = broker_amount self.broker_fee = broker_fee self.bill = bill self.status = status self.status_message = status_message self.status_detail = status_detail self.status_detail_message = status_detail_message self.statement_id = statement_id self.fee_statement_id = fee_statement_id self.bal_statement_id = bal_statement_id self.channel = channel self.created_at = created_at self.finished_time = finished_time class ListDailyBillRequest(BaseRequest): """ 查询日流水数据请求 :type bill_date: string :param bill_date: 流水查询日期 :type offset: int :param offset: 偏移量 :type length: int :param length: 长度 :type data_type: string :param data_type: 如果为 encryption,则对返回的 data 进行加密 """ def __init__( self, bill_date=None, offset=None, length=None, data_type=None ): super().__init__() self.bill_date = bill_date self.offset = offset self.length = length self.data_type = data_type class ListDailyBillResponse(BaseRequest): """ 查询日流水数据返回 :type total_num: int :param total_num: 总条数 :type list: list :param list: 条目信息 """ def __init__( self, total_num=None, list=None ): super().__init__() self.total_num = total_num self.list = list class DealerBillInfo(BaseRequest): """ 流水详情 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type order_id: string :param order_id: 平台企业订单号 :type ref: string :param ref: 资金流水号 :type broker_product_name: string :param broker_product_name: 综合服务主体名称 :type dealer_product_name: string :param dealer_product_name: 平台企业名称 :type biz_ref: string :param biz_ref: 业务订单流水号 :type acct_type: string :param acct_type: 账户类型 :type amount: string :param amount: 入账金额 :type balance: string :param balance: 账户余额 :type business_category: string :param business_category: 业务分类 :type business_type: string :param business_type: 业务类型 :type consumption_type: string :param consumption_type: 收支类型 :type created_at: string :param created_at: 入账时间 :type remark: string :param remark: 备注 """ def __init__( self, broker_id=None, dealer_id=None, order_id=None, ref=None, broker_product_name=None, dealer_product_name=None, biz_ref=None, acct_type=None, amount=None, balance=None, business_category=None, business_type=None, consumption_type=None, created_at=None, remark=None ): super().__init__() self.broker_id = broker_id self.dealer_id = dealer_id self.order_id = order_id self.ref = ref self.broker_product_name = broker_product_name self.dealer_product_name = dealer_product_name self.biz_ref = biz_ref self.acct_type = acct_type self.amount = amount self.balance = balance self.business_category = business_category self.business_type = business_type self.consumption_type = consumption_type self.created_at = created_at self.remark = remark class GetDailyOrderFileV2Request(BaseRequest): """ 查询日订单文件(支付和退款订单)请求 :type order_date: string :param order_date: 订单查询日期, 格式:yyyy-MM-dd """ def __init__( self, order_date=None ): super().__init__() self.order_date = order_date class GetDailyOrderFileV2Response(BaseRequest): """ 查询日订单文件(支付和退款订单)返回 :type url: string :param url: 下载地址 """ def __init__( self, url=None ): super().__init__() self.url = url class ListBalanceDailyStatementRequest(BaseRequest): """ 查询余额日账单数据请求 :type statement_date: string :param statement_date: 账单查询日期 格式:yyyy-MM-dd """ def __init__( self, statement_date=None ): super().__init__() self.statement_date = statement_date class ListBalanceDailyStatementResponse(BaseRequest): """ 查询余额日账单数据返回 :type list: list :param list: 条目信息 """ def __init__( self, list=None ): super().__init__() self.list = list class StatementDetail(BaseRequest): """ 余额账单信息详情 :type statement_id: string :param statement_id: 账单 ID :type statement_date: string :param statement_date: 账单日期 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_product_name: string :param broker_product_name: 综合服务主体名称 :type dealer_product_name: string :param dealer_product_name: 平台企业名称 :type biz_type: string :param biz_type: 业务类型 :type total_money: string :param total_money: 账单金额 :type amount: string :param amount: 订单金额 :type reex_amount: string :param reex_amount: 退汇金额 :type fee_amount: string :param fee_amount: 加成服务费金额 :type deduct_rebate_fee_amount: string :param deduct_rebate_fee_amount: 加成服务费抵扣金额 :type money_adjust: string :param money_adjust: 冲补金额 :type status: string :param status: 账单状态 :type invoice_status: string :param invoice_status: 开票状态 :type project_id: string :param project_id: 项目 ID :type project_name: string :param project_name: 项目名称 """ def __init__( self, statement_id=None, statement_date=None, broker_id=None, dealer_id=None, broker_product_name=None, dealer_product_name=None, biz_type=None, total_money=None, amount=None, reex_amount=None, fee_amount=None, deduct_rebate_fee_amount=None, money_adjust=None, status=None, invoice_status=None, project_id=None, project_name=None ): super().__init__() self.statement_id = statement_id self.statement_date = statement_date self.broker_id = broker_id self.dealer_id = dealer_id self.broker_product_name = broker_product_name self.dealer_product_name = dealer_product_name self.biz_type = biz_type self.total_money = total_money self.amount = amount self.reex_amount = reex_amount self.fee_amount = fee_amount self.deduct_rebate_fee_amount = deduct_rebate_fee_amount self.money_adjust = money_adjust self.status = status self.invoice_status = invoice_status self.project_id = project_id self.project_name = project_name
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/model/dataservice.py
dataservice.py
from ...base import BaseRequest class BankCardFourAuthVerifyRequest(BaseRequest): """ 银行卡四要素鉴权请求(下发短信验证码)请求 :type card_no: string :param card_no: 银行卡号 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 :type mobile: string :param mobile: 银行预留手机号 """ def __init__( self, card_no=None, id_card=None, real_name=None, mobile=None ): super().__init__() self.card_no = card_no self.id_card = id_card self.real_name = real_name self.mobile = mobile class BankCardFourAuthVerifyResponse(BaseRequest): """ 银行卡四要素鉴权请求(下发短信验证码)返回 :type ref: string :param ref: 交易凭证 """ def __init__( self, ref=None ): super().__init__() self.ref = ref class BankCardFourAuthConfirmRequest(BaseRequest): """ 银行卡四要素确认请求(上传短信验证码)请求 :type card_no: string :param card_no: 银行卡号 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 :type mobile: string :param mobile: 银行预留手机号 :type captcha: string :param captcha: 短信验证码 :type ref: string :param ref: 交易凭证 """ def __init__( self, card_no=None, id_card=None, real_name=None, mobile=None, captcha=None, ref=None ): super().__init__() self.card_no = card_no self.id_card = id_card self.real_name = real_name self.mobile = mobile self.captcha = captcha self.ref = ref class BankCardFourAuthConfirmResponse(BaseRequest): """ 银行卡四要素确认请求(上传短信验证码)返回 """ class BankCardFourVerifyRequest(BaseRequest): """ 银行卡四要素验证请求 :type card_no: string :param card_no: 银行卡号 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 :type mobile: string :param mobile: 银行预留手机号 """ def __init__( self, card_no=None, id_card=None, real_name=None, mobile=None ): super().__init__() self.card_no = card_no self.id_card = id_card self.real_name = real_name self.mobile = mobile class BankCardFourVerifyResponse(BaseRequest): """ 银行卡四要素验证返回 """ class BankCardThreeVerifyRequest(BaseRequest): """ 银行卡三要素验证请求 :type card_no: string :param card_no: 银行卡号 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 """ def __init__( self, card_no=None, id_card=None, real_name=None ): super().__init__() self.card_no = card_no self.id_card = id_card self.real_name = real_name class BankCardThreeVerifyResponse(BaseRequest): """ 银行卡三要素验证返回 """ class IDCardVerifyRequest(BaseRequest): """ 身份证实名验证请求 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 """ def __init__( self, id_card=None, real_name=None ): super().__init__() self.id_card = id_card self.real_name = real_name class IDCardVerifyResponse(BaseRequest): """ 身份证实名验证返回 """ class UserExemptedInfoRequest(BaseRequest): """ 上传免验证用户名单信息请求 :type card_type: string :param card_type: 证件类型码 :type id_card: string :param id_card: 证件号码 :type real_name: string :param real_name: 姓名 :type comment_apply: string :param comment_apply: 申请备注 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type user_images: list :param user_images: 人员信息图片 :type country: string :param country: 国别(地区)代码 :type birthday: string :param birthday: 出生日期 :type gender: string :param gender: 性别 :type notify_url: string :param notify_url: 回调地址 :type ref: string :param ref: 请求流水号 """ def __init__( self, card_type=None, id_card=None, real_name=None, comment_apply=None, broker_id=None, dealer_id=None, user_images=None, country=None, birthday=None, gender=None, notify_url=None, ref=None ): super().__init__() self.card_type = card_type self.id_card = id_card self.real_name = real_name self.comment_apply = comment_apply self.broker_id = broker_id self.dealer_id = dealer_id self.user_images = user_images self.country = country self.birthday = birthday self.gender = gender self.notify_url = notify_url self.ref = ref class UserExemptedInfoResponse(BaseRequest): """ 上传免验证用户名单信息返回 :type ok: string :param ok: 是否上传成功 """ def __init__( self, ok=None ): super().__init__() self.ok = ok class NotifyUserExemptedInfoRequest(BaseRequest): """ 上传免验证用户名单信息审核结果通知 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type real_name: string :param real_name: 姓名 :type id_card: string :param id_card: 证件号 :type status: string :param status: 审核状态 :type ref: string :param ref: 流水号 :type comment: string :param comment: 审核信息 """ def __init__( self, broker_id=None, dealer_id=None, real_name=None, id_card=None, status=None, ref=None, comment=None ): super().__init__() self.broker_id = broker_id self.dealer_id = dealer_id self.real_name = real_name self.id_card = id_card self.status = status self.ref = ref self.comment = comment class UserWhiteCheckRequest(BaseRequest): """ 查看免验证用户名单是否存在请求 :type id_card: string :param id_card: 证件号码 :type real_name: string :param real_name: 姓名 """ def __init__( self, id_card=None, real_name=None ): super().__init__() self.id_card = id_card self.real_name = real_name class UserWhiteCheckResponse(BaseRequest): """ 查看免验证用户名单是否存在返回 :type ok: bool :param ok: """ def __init__( self, ok=None ): super().__init__() self.ok = ok class GetBankCardInfoRequest(BaseRequest): """ 银行卡信息查询请求 :type card_no: string :param card_no: 银行卡号 :type bank_name: string :param bank_name: 银行名称 """ def __init__( self, card_no=None, bank_name=None ): super().__init__() self.card_no = card_no self.bank_name = bank_name class GetBankCardInfoResponse(BaseRequest): """ 银行卡信息查询返回 :type bank_code: string :param bank_code: 银行代码 :type bank_name: string :param bank_name: 银行名称 :type card_type: string :param card_type: 卡类型 :type is_support: bool :param is_support: 云账户是否支持向该银行支付 """ def __init__( self, bank_code=None, bank_name=None, card_type=None, is_support=None ): super().__init__() self.bank_code = bank_code self.bank_name = bank_name self.card_type = card_type self.is_support = is_support
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/model/authentication.py
authentication.py
from ...base import BaseRequest class ApiUseSignContractRequest(BaseRequest): """ 获取协议预览 URL 请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID """ def __init__( self, dealer_id=None, broker_id=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id class ApiUseSignContractResponse(BaseRequest): """ 获取协议预览 URL 返回 :type url: string :param url: 预览跳转 URL :type title: string :param title: 协议名称 """ def __init__( self, url=None, title=None ): super().__init__() self.url = url self.title = title class ApiUserSignContractRequest(BaseRequest): """ 获取协议预览 URL 请求 V2 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID """ def __init__( self, dealer_id=None, broker_id=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id class ApiUserSignContractResponse(BaseRequest): """ 获取协议预览 URL 返回 V2 :type url: string :param url: 预览跳转 URL :type title: string :param title: 协议名称 """ def __init__( self, url=None, title=None ): super().__init__() self.url = url self.title = title class ApiUserSignRequest(BaseRequest): """ 用户签约请求 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type real_name: string :param real_name: 姓名 :type id_card: string :param id_card: 证件号码 :type card_type: string :param card_type: 证件类型 idcard:身份证 passport:护照 mtphkm:港澳居民来往内地通行证 mtpt:台湾居民往来大陆通行证 rphkm:中华人民共和国港澳居民居住证 rpt:中华人民共和国台湾居民居住证 fpr:外国人永久居留身份证 ffwp:中华人民共和国外国人就业许可证书 """ def __init__( self, broker_id=None, dealer_id=None, real_name=None, id_card=None, card_type=None ): super().__init__() self.broker_id = broker_id self.dealer_id = dealer_id self.real_name = real_name self.id_card = id_card self.card_type = card_type class ApiUserSignResponse(BaseRequest): """ 用户签约返回 :type status: string :param status: 是否签约成功 """ def __init__( self, status=None ): super().__init__() self.status = status class GetApiUserSignStatusRequest(BaseRequest): """ 获取用户签约状态请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type real_name: string :param real_name: 姓名 :type id_card: string :param id_card: 证件号码 """ def __init__( self, dealer_id=None, broker_id=None, real_name=None, id_card=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.real_name = real_name self.id_card = id_card class GetApiUserSignStatusResponse(BaseRequest): """ 获取用户签约状态返回 :type signed_at: string :param signed_at: 签约时间 :type status: string :param status: 用户签约状态 """ def __init__( self, signed_at=None, status=None ): super().__init__() self.signed_at = signed_at self.status = status class ApiUserSignReleaseRequest(BaseRequest): """ 用户解约(测试账号专用接口)请求 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type real_name: string :param real_name: 姓名 :type id_card: string :param id_card: 证件号码 :type card_type: string :param card_type: 证件类型 idcard:身份证 passport:护照 mtphkm:港澳居民来往内地通行证 mtpt:台湾居民往来大陆通行证 rphkm:中华人民共和国港澳居民居住证 rpt:中华人民共和国台湾居民居住证 fpr:外国人永久居留身份证 ffwp:中华人民共和国外国人就业许可证书 """ def __init__( self, broker_id=None, dealer_id=None, real_name=None, id_card=None, card_type=None ): super().__init__() self.broker_id = broker_id self.dealer_id = dealer_id self.real_name = real_name self.id_card = id_card self.card_type = card_type class ApiUserSignReleaseResponse(BaseRequest): """ 用户解约(测试账号专用接口)返回 :type status: string :param status: 是否解约成功 """ def __init__( self, status=None ): super().__init__() self.status = status
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/model/apiusersign.py
apiusersign.py
from ...base import BaseRequest class H5PreCollectBizlicMsgRequest(BaseRequest): """ 工商实名信息录入请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_user_id: string :param dealer_user_id: 平台企业端的用户 ID :type phone_no: string :param phone_no: 手机号 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 :type id_card_address: string :param id_card_address: 身份证住址 :type id_card_agency: string :param id_card_agency: 身份证签发机关 :type id_card_nation: string :param id_card_nation: 身份证民族 :type id_card_validity_start: string :param id_card_validity_start: 身份证有效期开始时间 :type id_card_validity_end: string :param id_card_validity_end: 身份证有效期结束时间 """ def __init__( self, dealer_id=None, broker_id=None, dealer_user_id=None, phone_no=None, id_card=None, real_name=None, id_card_address=None, id_card_agency=None, id_card_nation=None, id_card_validity_start=None, id_card_validity_end=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.dealer_user_id = dealer_user_id self.phone_no = phone_no self.id_card = id_card self.real_name = real_name self.id_card_address = id_card_address self.id_card_agency = id_card_agency self.id_card_nation = id_card_nation self.id_card_validity_start = id_card_validity_start self.id_card_validity_end = id_card_validity_end class H5PreCollectBizlicMsgResponse(BaseRequest): """ 工商实名信息录入返回 :type dealer_user_id: string :param dealer_user_id: 平台企业端的用户 ID """ def __init__( self, dealer_user_id=None ): super().__init__() self.dealer_user_id = dealer_user_id class H5APIGetStartUrlRequest(BaseRequest): """ 预启动请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_user_id: string :param dealer_user_id: 平台企业端的用户 ID :type client_type: int :param client_type: 客户端类型 :type notify_url: string :param notify_url: 异步通知 URL :type color: string :param color: H5 页面主题颜色 :type return_url: string :param return_url: 跳转 URL :type customer_title: int :param customer_title: H5 页面 Title """ def __init__( self, dealer_id=None, broker_id=None, dealer_user_id=None, client_type=None, notify_url=None, color=None, return_url=None, customer_title=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.dealer_user_id = dealer_user_id self.client_type = client_type self.notify_url = notify_url self.color = color self.return_url = return_url self.customer_title = customer_title class H5APIGetStartUrlResponse(BaseRequest): """ 预启动返回 :type h5_url: string :param h5_url: 跳转 URL """ def __init__( self, h5_url=None ): super().__init__() self.h5_url = h5_url class H5APIEcoCityAicStatusRequest(BaseRequest): """ 查询个体工商户状态请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_user_id: string :param dealer_user_id: 平台企业端的用户 ID :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 :type open_id: string :param open_id: 用户唯一标识 """ def __init__( self, dealer_id=None, broker_id=None, dealer_user_id=None, id_card=None, real_name=None, open_id=None ): super().__init__() self.dealer_id = dealer_id self.broker_id = broker_id self.dealer_user_id = dealer_user_id self.id_card = id_card self.real_name = real_name self.open_id = open_id class H5APIEcoCityAicStatusResponse(BaseRequest): """ 查询个体工商户状态返回 :type status: int :param status: 用户签约状态 :type status_message: string :param status_message: 注册状态描述 :type status_detail: int :param status_detail: 注册详情状态码 :type status_detail_message: string :param status_detail_message: 注册详情状态码描述 :type applyed_at: string :param applyed_at: 注册发起时间 :type registed_at: string :param registed_at: 注册完成时间 :type uscc: string :param uscc: 统一社会信用代码 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 """ def __init__( self, status=None, status_message=None, status_detail=None, status_detail_message=None, applyed_at=None, registed_at=None, uscc=None, id_card=None, real_name=None ): super().__init__() self.status = status self.status_message = status_message self.status_detail = status_detail self.status_detail_message = status_detail_message self.applyed_at = applyed_at self.registed_at = registed_at self.uscc = uscc self.id_card = id_card self.real_name = real_name class NotifyH5APIEcoCityAicRequest(BaseRequest): """ 结果回调 :type open_id: string :param open_id: 用户唯一标识 :type dealer_user_id: string :param dealer_user_id: 平台企业端的用户 ID :type submit_at: string :param submit_at: 注册/注销提交时间 :type registed_at: string :param registed_at: 注册/注销完成时间 :type status: int :param status: 用户签约状态 :type status_message: string :param status_message: 注册状态描述 :type status_detail: int :param status_detail: 注册详情状态码 :type status_detail_message: string :param status_detail_message: 注册详情状态码描述 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type uscc: string :param uscc: 统一社会信用代码 :type id_card: string :param id_card: 身份证号码 :type real_name: string :param real_name: 姓名 :type type: int :param type: 回调类型 """ def __init__( self, open_id=None, dealer_user_id=None, submit_at=None, registed_at=None, status=None, status_message=None, status_detail=None, status_detail_message=None, dealer_id=None, broker_id=None, uscc=None, id_card=None, real_name=None, type=None ): super().__init__() self.open_id = open_id self.dealer_user_id = dealer_user_id self.submit_at = submit_at self.registed_at = registed_at self.status = status self.status_message = status_message self.status_detail = status_detail self.status_detail_message = status_detail_message self.dealer_id = dealer_id self.broker_id = broker_id self.uscc = uscc self.id_card = id_card self.real_name = real_name self.type = type
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/model/bizlicxjjh5api.py
bizlicxjjh5api.py
from ...base import BaseRequest class CreateBankpayOrderRequest(BaseRequest): """ 银行卡实时支付请求 :type order_id: string :param order_id: 平台企业订单号 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type real_name: string :param real_name: 姓名 :type card_no: string :param card_no: 银行卡号 :type id_card: string :param id_card: 身份证号码 :type phone_no: string :param phone_no: 手机号 :type pay: string :param pay: 订单金额 :type pay_remark: string :param pay_remark: 订单备注 :type notify_url: string :param notify_url: 回调地址 :type project_id: string :param project_id: 项目标识 """ def __init__( self, order_id=None, dealer_id=None, broker_id=None, real_name=None, card_no=None, id_card=None, phone_no=None, pay=None, pay_remark=None, notify_url=None, project_id=None ): super().__init__() self.order_id = order_id self.dealer_id = dealer_id self.broker_id = broker_id self.real_name = real_name self.card_no = card_no self.id_card = id_card self.phone_no = phone_no self.pay = pay self.pay_remark = pay_remark self.notify_url = notify_url self.project_id = project_id class CreateBankpayOrderResponse(BaseRequest): """ 银行卡实时支付返回 :type order_id: string :param order_id: :type ref: string :param ref: 综合服务平台流水号 :type pay: string :param pay: 订单金额 """ def __init__( self, order_id=None, ref=None, pay=None ): super().__init__() self.order_id = order_id self.ref = ref self.pay = pay class CreateAlipayOrderRequest(BaseRequest): """ 支付宝实时支付请求 :type order_id: string :param order_id: 平台企业订单号 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type real_name: string :param real_name: 姓名 :type card_no: string :param card_no: 支付宝账户 :type id_card: string :param id_card: 身份证号码 :type phone_no: string :param phone_no: 手机号 :type pay: string :param pay: 订单金额 :type pay_remark: string :param pay_remark: 订单备注 :type notify_url: string :param notify_url: 回调地址 :type project_id: string :param project_id: 项目标识 :type check_name: string :param check_name: 校验支付宝账户姓名,固定值:Check """ def __init__( self, order_id=None, dealer_id=None, broker_id=None, real_name=None, card_no=None, id_card=None, phone_no=None, pay=None, pay_remark=None, notify_url=None, project_id=None, check_name=None ): super().__init__() self.order_id = order_id self.dealer_id = dealer_id self.broker_id = broker_id self.real_name = real_name self.card_no = card_no self.id_card = id_card self.phone_no = phone_no self.pay = pay self.pay_remark = pay_remark self.notify_url = notify_url self.project_id = project_id self.check_name = check_name class CreateAlipayOrderResponse(BaseRequest): """ 支付宝实时支付返回 :type order_id: string :param order_id: 平台企业订单号 :type ref: string :param ref: 综合服务平台流水号 :type pay: string :param pay: 订单金额 """ def __init__( self, order_id=None, ref=None, pay=None ): super().__init__() self.order_id = order_id self.ref = ref self.pay = pay class CreateWxpayOrderRequest(BaseRequest): """ 微信实时支付请求 :type order_id: string :param order_id: 平台企业订单号 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type real_name: string :param real_name: 姓名 :type openid: string :param openid: 微信用户 openid :type id_card: string :param id_card: 身份证号码 :type phone_no: string :param phone_no: 手机号 :type pay: string :param pay: 订单金额 :type pay_remark: string :param pay_remark: 订单备注 :type notify_url: string :param notify_url: 回调地址 :type wx_app_id: string :param wx_app_id: 平台企业微信 AppID :type wxpay_mode: string :param wxpay_mode: 微信支付模式,固定值:transfer :type project_id: string :param project_id: 项目标识 :type notes: string :param notes: 描述信息,该字段已废弃 """ def __init__( self, order_id=None, dealer_id=None, broker_id=None, real_name=None, openid=None, id_card=None, phone_no=None, pay=None, pay_remark=None, notify_url=None, wx_app_id=None, wxpay_mode=None, project_id=None, notes=None ): super().__init__() self.order_id = order_id self.dealer_id = dealer_id self.broker_id = broker_id self.real_name = real_name self.openid = openid self.id_card = id_card self.phone_no = phone_no self.pay = pay self.pay_remark = pay_remark self.notify_url = notify_url self.wx_app_id = wx_app_id self.wxpay_mode = wxpay_mode self.project_id = project_id self.notes = notes class CreateWxpayOrderResponse(BaseRequest): """ 微信实时支付返回 :type order_id: string :param order_id: 平台企业订单号 :type ref: string :param ref: 综合服务平台流水号,唯一 :type pay: string :param pay: 订单金额 """ def __init__( self, order_id=None, ref=None, pay=None ): super().__init__() self.order_id = order_id self.ref = ref self.pay = pay class GetOrderRequest(BaseRequest): """ 查询单笔订单信息请求 :type order_id: string :param order_id: 平台企业订单号 :type channel: string :param channel: 支付路径名,银行卡(默认)、支付宝、微信 :type data_type: string :param data_type: 数据类型,如果为 encryption,则对返回的 data 进行加密 """ def __init__( self, order_id=None, channel=None, data_type=None ): super().__init__() self.order_id = order_id self.channel = channel self.data_type = data_type class GetOrderResponse(BaseRequest): """ 查询单笔订单信息返回 :type order_id: string :param order_id: 平台企业订单号 :type pay: string :param pay: 订单金额 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type real_name: string :param real_name: 姓名 :type card_no: string :param card_no: 收款人账号 :type id_card: string :param id_card: 身份证号码 :type phone_no: string :param phone_no: 手机号 :type status: string :param status: 订单状态码 :type status_detail: string :param status_detail: 订单详细状态码 :type status_message: string :param status_message: 订单状态码描述 :type status_detail_message: string :param status_detail_message: 订单详细状态码描述 :type broker_amount: string :param broker_amount: 综合服务主体支付金额 :type ref: string :param ref: 综合服务平台流水号 :type broker_bank_bill: string :param broker_bank_bill: 支付交易流水号 :type withdraw_platform: string :param withdraw_platform: 支付路径 :type created_at: string :param created_at: 订单接收时间,精确到秒 :type finished_time: string :param finished_time: 订单完成时间,精确到秒 :type broker_fee: string :param broker_fee: 综合服务主体加成服务费 :type broker_real_fee: string :param broker_real_fee: 余额账户支出加成服务费 :type broker_deduct_fee: string :param broker_deduct_fee: 抵扣账户支出加成服务费 :type pay_remark: string :param pay_remark: 订单备注 :type user_fee: string :param user_fee: 用户加成服务费 :type bank_name: string :param bank_name: 银行名称 :type project_id: string :param project_id: 项目标识 :type anchor_id: string :param anchor_id: 新就业形态劳动者 ID,该字段已废弃 :type notes: string :param notes: 描述信息,该字段已废弃 :type sys_amount: string :param sys_amount: 系统支付金额,该字段已废弃 :type tax: string :param tax: 税费,该字段已废弃 :type sys_fee: string :param sys_fee: 系统支付费用,该字段已废弃 """ def __init__( self, order_id=None, pay=None, broker_id=None, dealer_id=None, real_name=None, card_no=None, id_card=None, phone_no=None, status=None, status_detail=None, status_message=None, status_detail_message=None, broker_amount=None, ref=None, broker_bank_bill=None, withdraw_platform=None, created_at=None, finished_time=None, broker_fee=None, broker_real_fee=None, broker_deduct_fee=None, pay_remark=None, user_fee=None, bank_name=None, project_id=None, anchor_id=None, notes=None, sys_amount=None, tax=None, sys_fee=None ): super().__init__() self.order_id = order_id self.pay = pay self.broker_id = broker_id self.dealer_id = dealer_id self.real_name = real_name self.card_no = card_no self.id_card = id_card self.phone_no = phone_no self.status = status self.status_detail = status_detail self.status_message = status_message self.status_detail_message = status_detail_message self.broker_amount = broker_amount self.ref = ref self.broker_bank_bill = broker_bank_bill self.withdraw_platform = withdraw_platform self.created_at = created_at self.finished_time = finished_time self.broker_fee = broker_fee self.broker_real_fee = broker_real_fee self.broker_deduct_fee = broker_deduct_fee self.pay_remark = pay_remark self.user_fee = user_fee self.bank_name = bank_name self.project_id = project_id self.anchor_id = anchor_id self.notes = notes self.sys_amount = sys_amount self.tax = tax self.sys_fee = sys_fee class GetDealerVARechargeAccountRequest(BaseRequest): """ 查询平台企业汇款信息请求 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID """ def __init__( self, broker_id=None, dealer_id=None ): super().__init__() self.broker_id = broker_id self.dealer_id = dealer_id class GetDealerVARechargeAccountResponse(BaseRequest): """ 查询平台企业汇款信息返回 :type acct_name: string :param acct_name: 账户名称 :type acct_no: string :param acct_no: 专属账户 :type bank_name: string :param bank_name: 银行名称 :type dealer_acct_name: string :param dealer_acct_name: 付款账户 """ def __init__( self, acct_name=None, acct_no=None, bank_name=None, dealer_acct_name=None ): super().__init__() self.acct_name = acct_name self.acct_no = acct_no self.bank_name = bank_name self.dealer_acct_name = dealer_acct_name class CancelOrderRequest(BaseRequest): """ 取消待支付订单请求 :type dealer_id: string :param dealer_id: 平台企业 ID :type order_id: string :param order_id: 平台企业订单号 :type ref: string :param ref: 综合服务平台流水号 :type channel: string :param channel: 支付路径名,银行卡(默认)、支付宝、微信 """ def __init__( self, dealer_id=None, order_id=None, ref=None, channel=None ): super().__init__() self.dealer_id = dealer_id self.order_id = order_id self.ref = ref self.channel = channel class CancelOrderResponse(BaseRequest): """ 取消待支付订单返回 :type ok: string :param ok: """ def __init__( self, ok=None ): super().__init__() self.ok = ok class ListAccountRequest(BaseRequest): """ 查询平台企业余额请求 :type dealer_id: string :param dealer_id: 平台企业 ID """ def __init__( self, dealer_id=None ): super().__init__() self.dealer_id = dealer_id class ListAccountResponse(BaseRequest): """ 查询平台企业余额返回 :type dealer_infos: list :param dealer_infos: """ def __init__( self, dealer_infos=None ): super().__init__() self.dealer_infos = dealer_infos class AccountInfo(BaseRequest): """ 账户信息 :type broker_id: string :param broker_id: 综合服务主体 ID :type bank_card_balance: string :param bank_card_balance: 银行卡余额 :type is_bank_card: bool :param is_bank_card: 是否开通银行卡支付路径 :type alipay_balance: string :param alipay_balance: 支付宝余额 :type is_alipay: bool :param is_alipay: 是否开通支付宝支付路径 :type wxpay_balance: string :param wxpay_balance: 微信余额 :type is_wxpay: bool :param is_wxpay: 是否开通微信支付路径 :type rebate_fee_balance: string :param rebate_fee_balance: 加成服务费返点余额 :type acct_balance: string :param acct_balance: 业务服务费余额 :type total_balance: string :param total_balance: 总余额 """ def __init__( self, broker_id=None, bank_card_balance=None, is_bank_card=None, alipay_balance=None, is_alipay=None, wxpay_balance=None, is_wxpay=None, rebate_fee_balance=None, acct_balance=None, total_balance=None ): super().__init__() self.broker_id = broker_id self.bank_card_balance = bank_card_balance self.is_bank_card = is_bank_card self.alipay_balance = alipay_balance self.is_alipay = is_alipay self.wxpay_balance = wxpay_balance self.is_wxpay = is_wxpay self.rebate_fee_balance = rebate_fee_balance self.acct_balance = acct_balance self.total_balance = total_balance class GetEleReceiptFileRequest(BaseRequest): """ 查询电子回单请求 :type order_id: string :param order_id: 平台企业订单号 :type ref: string :param ref: 综合服务平台流水号 """ def __init__( self, order_id=None, ref=None ): super().__init__() self.order_id = order_id self.ref = ref class GetEleReceiptFileResponse(BaseRequest): """ 查询电子回单返回 :type expire_time: string :param expire_time: 链接失效时间 :type file_name: string :param file_name: 回单名 :type url: string :param url: 下载链接 """ def __init__( self, expire_time=None, file_name=None, url=None ): super().__init__() self.expire_time = expire_time self.file_name = file_name self.url = url class NotifyOrderRequest(BaseRequest): """ 订单支付状态回调通知 :type notify_id: string :param notify_id: 通知 ID :type notify_time: string :param notify_time: 通知时间 :type data: NotifyOrderData :param data: 返回数据 """ def __init__( self, notify_id=None, notify_time=None, data=None ): super().__init__() self.notify_id = notify_id self.notify_time = notify_time self.data = data class NotifyOrderData(BaseRequest): """ 订单支付状态回调通知数据 :type order_id: string :param order_id: 平台企业订单号 :type pay: string :param pay: 订单金额 :type broker_id: string :param broker_id: 综合服务主体 ID :type dealer_id: string :param dealer_id: 平台企业 ID :type real_name: string :param real_name: 姓名 :type card_no: string :param card_no: 收款人账号 :type id_card: string :param id_card: 身份证号码 :type phone_no: string :param phone_no: 手机号 :type status: string :param status: 订单状态码 :type status_detail: string :param status_detail: 订单详细状态码 :type status_message: string :param status_message: 订单状态码描述 :type status_detail_message: string :param status_detail_message: 订单详细状态码描述 :type broker_amount: string :param broker_amount: 综合服务主体支付金额 :type ref: string :param ref: 综合服务平台流水号 :type broker_bank_bill: string :param broker_bank_bill: 支付交易流水号 :type withdraw_platform: string :param withdraw_platform: 支付路径 :type created_at: string :param created_at: 订单接收时间,精确到秒 :type finished_time: string :param finished_time: 订单完成时间,精确到秒 :type broker_fee: string :param broker_fee: 综合服务主体加成服务费 :type broker_real_fee: string :param broker_real_fee: 余额账户支出加成服务费 :type broker_deduct_fee: string :param broker_deduct_fee: 抵扣账户支出加成服务费 :type pay_remark: string :param pay_remark: 订单备注 :type user_fee: string :param user_fee: 用户加成服务费 :type bank_name: string :param bank_name: 银行名称 :type project_id: string :param project_id: 项目标识 :type user_id: string :param user_id: 平台企业用户 ID """ def __init__( self, order_id=None, pay=None, broker_id=None, dealer_id=None, real_name=None, card_no=None, id_card=None, phone_no=None, status=None, status_detail=None, status_message=None, status_detail_message=None, broker_amount=None, ref=None, broker_bank_bill=None, withdraw_platform=None, created_at=None, finished_time=None, broker_fee=None, broker_real_fee=None, broker_deduct_fee=None, pay_remark=None, user_fee=None, bank_name=None, project_id=None, user_id=None ): super().__init__() self.order_id = order_id self.pay = pay self.broker_id = broker_id self.dealer_id = dealer_id self.real_name = real_name self.card_no = card_no self.id_card = id_card self.phone_no = phone_no self.status = status self.status_detail = status_detail self.status_message = status_message self.status_detail_message = status_detail_message self.broker_amount = broker_amount self.ref = ref self.broker_bank_bill = broker_bank_bill self.withdraw_platform = withdraw_platform self.created_at = created_at self.finished_time = finished_time self.broker_fee = broker_fee self.broker_real_fee = broker_real_fee self.broker_deduct_fee = broker_deduct_fee self.pay_remark = pay_remark self.user_fee = user_fee self.bank_name = bank_name self.project_id = project_id self.user_id = user_id class CreateBatchOrderRequest(BaseRequest): """ 批量下单请求 :type batch_id: string :param batch_id: 平台企业批次号 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type channel: string :param channel: 支付路径 :type wx_app_id: string :param wx_app_id: 平台企业的微信 AppID :type total_pay: string :param total_pay: 订单总金额 :type total_count: string :param total_count: 总笔数 :type order_list: list :param order_list: 订单列表 """ def __init__( self, batch_id=None, dealer_id=None, broker_id=None, channel=None, wx_app_id=None, total_pay=None, total_count=None, order_list=None ): super().__init__() self.batch_id = batch_id self.dealer_id = dealer_id self.broker_id = broker_id self.channel = channel self.wx_app_id = wx_app_id self.total_pay = total_pay self.total_count = total_count self.order_list = order_list class BatchOrderInfo(BaseRequest): """ 批量下单订单信息 :type order_id: string :param order_id: 平台企业订单号 :type real_name: string :param real_name: 姓名 :type id_card: string :param id_card: 身份证号码 :type card_no: string :param card_no: 收款账号 :type openid: string :param openid: 微信用户 openid :type phone_no: string :param phone_no: 手机号 :type project_id: string :param project_id: 项目标识 :type pay: string :param pay: 订单金额 :type pay_remark: string :param pay_remark: 订单备注 :type notify_url: string :param notify_url: 回调地址 """ def __init__( self, order_id=None, real_name=None, id_card=None, card_no=None, openid=None, phone_no=None, project_id=None, pay=None, pay_remark=None, notify_url=None ): super().__init__() self.order_id = order_id self.real_name = real_name self.id_card = id_card self.card_no = card_no self.openid = openid self.phone_no = phone_no self.project_id = project_id self.pay = pay self.pay_remark = pay_remark self.notify_url = notify_url class CreateBatchOrderResponse(BaseRequest): """ 批量下单返回 :type batch_id: string :param batch_id: 平台企业批次号 :type result_list: list :param result_list: 订单结果列表 """ def __init__( self, batch_id=None, result_list=None ): super().__init__() self.batch_id = batch_id self.result_list = result_list class BatchOrderResult(BaseRequest): """ 批量下单返回订单信息 :type order_id: string :param order_id: 平台企业订单号 :type ref: string :param ref: 综合服务平台流水号 :type pay: string :param pay: 订单金额 """ def __init__( self, order_id=None, ref=None, pay=None ): super().__init__() self.order_id = order_id self.ref = ref self.pay = pay class ConfirmBatchOrderRequest(BaseRequest): """ 批次确认请求 :type batch_id: string :param batch_id: 平台企业批次号 :type dealer_id: string :param dealer_id: 平台企业 ID :type broker_id: string :param broker_id: 综合服务主体 ID :type channel: string :param channel: 支付路径 """ def __init__( self, batch_id=None, dealer_id=None, broker_id=None, channel=None ): super().__init__() self.batch_id = batch_id self.dealer_id = dealer_id self.broker_id = broker_id self.channel = channel class ConfirmBatchOrderResponse(BaseRequest): """ 批次确认响应 """
yunzhanghu-sdk
/yunzhanghu_sdk-1.0.7.tar.gz/yunzhanghu_sdk-1.0.7/yunzhanghu_sdk/client/api/model/payment.py
payment.py
# yup yup generates HTML documentation for your REST API from YAML files. It will perform HTTP requests against the API endpoint to validate that your examples work, and to capture example responses for the documentation. Installation: pip install yup Usage: yup --input-dir DIR --output-dir DIR --url http://127.0.0.1 Options: - `input-dir` is the directory to read YAML files from. - `output-dir` is the directoy to write HTML files into. - `url` is the base URL to use for example requests.
yup
/yup-0.1.0.tar.gz/yup-0.1.0/README.md
README.md
# Yupdates Python SDK The Yupdates Python SDK lets you easily use the Yupdates API from your own software and scripts. This is [hosted on GitHub](https://github.com/yupdates/yupdates-sdk-py). There is also a [Yupdates Rust SDK](https://github.com/yupdates/yupdates-sdk-rs). ### Requirements The Python SDK has *zero external dependencies*. It is written so that you can easily drop it into your scripts, Lambda functions, and bigger projects without any dependency needs or conflicts. It requires Python 3.7 or higher. You will need an API token from the application. Navigate to "Settings" and then "API". The examples below start with read-only operations, so you can use the general, read-only token to get started. ### Installation Before running the following commands, we assume you have set up your environment (pyenv, virtualenv, etc.). Install the SDK via [pip](https://pip.pypa.io). ```shell $ pip install yupdates ``` Or, install from source: ```shell $ git clone git://github.com/yupdates/yupdates-sdk-py.git $ cd yupdates-sdk-py $ pip install . ``` Set the API token environment variable: ```shell $ set +o history $ export YUPDATES_API_TOKEN="1a7814fc25:c38bb526..." $ set -o history ``` Now test the connection and authentication. This will work from a Python shell or script: ```python from yupdates import yapi print(yapi.ping()) ``` If there is anything but a 200 response, it will throw an exception. Otherwise, this will print out the JSON response which is returned from the `ping` function deserialized into a Python dict. The `ping` operation is helpful to run in the beginning of your scripts to make sure there are no setup issues. Another way to use the SDK is to instantiate a client once and use it repeatedly: ```python from yupdates.client import yupdates_client yup = yupdates_client() print(yup.ping()) ``` ### Read items from a feed ```python from yupdates import yapi feed_id = '02fb24a4478462a4491067224b66d9a8b2338dada2737' feed_items = yapi.read_items(feed_id) # See client.py for optional parameters for feed_item in feed_items: print(feed_item.title) # See models.py and API docs for field descriptions ``` ### Write items to a feed To write items, you cannot use the read-only API token anymore. Obtain a token with write privileges by adding an API input to a feed in the app, and set the `YUPDATES_API_TOKEN` environment variable as you did above. ```python from yupdates.client import yupdates_client from yupdates.models import InputItem yc = yupdates_client() item = InputItem("a title", "some content", "https://www.example.com/something") yc.new_items([item]) ``` The API token is feed-specific, which is why there is no other configuration needed. You make one configuration (the API token) and Yupdates figures out the rest on the server side. That is for convenience, but it also means there's only one permission to reason about, and a small blast radius if it's exposed. The token is authorized to add items to one, single feed, and it cannot do anything else (not even read items). You're not dropping a master key into a cronjob script or Lambda function or wherever it's going to run. In the future, it will be possible to obtain a token with wider writer privileges, so you can add items to multiple feeds. ### Getting help You can create a [GitHub issue](https://github.com/yupdates/yupdates-sdk-py/issues) on this repository for bugs and feature requests. The fastest way to get help is to create a support ticket from the Yupdates application. Or email `[email protected]`. Especially if you need help that is not specific to this SDK, or if you would like more hands-on setup and troubleshooting advice. ### Conventions This library follows the [Numpy docstring conventions](https://numpydoc.readthedocs.io/en/stable/format.html#docstring-standard). ### License The SDK is distributed under the MIT license, please see [LICENSE](https://github.com/yupdates/yupdates-sdk-py/blob/main/LICENSE) for more information. This covers the source code and examples, but it does not cover related items like the Yupdates logo or API documentation which is not hosted here.
yupdates
/yupdates-0.1.1.tar.gz/yupdates-0.1.1/README.md
README.md
# PyTools PyTools is a Python package based on PyTorch. --- ## Installation Latest version: 0.1.23 ``` pip install yupeeee-pytools==0.1.23 ``` Manual installation of PyTorch is required.\ https://pytorch.org/get-started/locally/ ### Requirements ``` Python >= 3.8 grad-cam matplotlib ml_collections more_itertools numpy opencv-python == 4.5.5.64 pandas Pillow pyyaml scikit_learn scipy timm # torch # torchvision tqdm ``` ## Usage ``` import yupeeee_pytools ``` Example codes: https://github.com/yupeeee/PyTools/tree/main/examples
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/README.md
README.md
import torchvision.transforms as tf from ...datasets import normalize from ...tools import merge_lists_in_dictionary modes = [None, "train", "eval"] weight_specifications = [None, "DEFAULT", "IMAGENET1K_V1", "IMAGENET1K_V2"] default_weight_specification = "IMAGENET1K_V1" default_cifar10_train_preprocess = tf.Compose([ # tf.ToPILImage(), # tf.RandomCrop(32, padding=4), # tf.RandomHorizontalFlip(), # tf.RandomRotation(15), # tf.Resize(224), tf.ToTensor(), normalize["CIFAR-10"], ]) default_cifar10_val_preprocess = tf.Compose([ # tf.ToPILImage(), # tf.Resize(224), tf.ToTensor(), normalize["CIFAR-10"], ]) default_cifar100_train_preprocess = tf.Compose([ # tf.ToPILImage(), # tf.RandomCrop(32, padding=4), # tf.RandomHorizontalFlip(), # tf.RandomRotation(15), # tf.Resize(224), tf.ToTensor(), normalize["CIFAR-100"], ]) default_cifar100_val_preprocess = tf.Compose([ # tf.ToPILImage(), # tf.Resize(224), tf.ToTensor(), normalize["CIFAR-100"], ]) default_imagenet_preprocess = tf.Compose([ tf.CenterCrop(256), tf.Resize(224), tf.ToTensor(), normalize["ImageNet"], ]) pytorch_imagenet_models = { "Alexnet": [ "alexnet", ], "ConvNeXt": [ "convnext_tiny", "convnext_small", "convnext_base", "convnext_large", ], "DenseNet": [ "densenet121", "densenet161", "densenet169", "densenet201", ], "EfficientNet": [ "efficientnet_b0", "efficientnet_b1", "efficientnet_b2", "efficientnet_b3", "efficientnet_b4", "efficientnet_b5", "efficientnet_b6", "efficientnet_b7", ], "EfficientNetV2": [ "efficientnet_v2_s", "efficientnet_v2_m", "efficientnet_v2_l", ], "GoogLeNet": [ "googlenet", ], "Inception v3": [ "inception_v3", ], "MaxVit": [ # "maxvit_t", ], "MNASNet": [ "mnasnet0_5", "mnasnet0_75", "mnasnet1_0", "mnasnet1_3", ], "MobileNet V2": [ "mobilenet_v2", ], "MobileNet V3": [ "mobilenet_v3_large", "mobilenet_v3_small", ], "RegNet": [ "regnet_y_400mf", "regnet_y_800mf", "regnet_y_1_6gf", "regnet_y_3_2gf", "regnet_y_8gf", "regnet_y_16gf", "regnet_y_32gf", # "regnet_y_128gf", "regnet_x_1_6gf", "regnet_x_3_2gf", "regnet_x_8gf", "regnet_x_16gf", "regnet_x_32gf", ], "ResNet": [ "resnet18", "resnet34", "resnet50", "resnet101", "resnet152", ], "ResNext": [ "resnext50_32x4d", "resnext101_32x8d", "resnext101_64x4d" ], "ShuffleNet V2": [ "shufflenet_v2_x0_5", "shufflenet_v2_x1_0", "shufflenet_v2_x1_5", "shufflenet_v2_x2_0", ], "SqueezeNet": [ "squeezenet1_0", "squeezenet1_1", ], "SwinTransformer": [ "swin_t", "swin_s", "swin_b", # "swin_v2_t", # "swin_v2_s", # "swin_v2_b", ], "VGG": [ "vgg11", "vgg11_bn", "vgg13", "vgg13_bn", "vgg16", "vgg16_bn", "vgg19", "vgg19_bn", ], "VisionTransformer": [ "vit_b_16", "vit_b_32", "vit_l_16", "vit_l_32", # "vit_h_14", ], "Wide ResNet": [ "wide_resnet50_2", "wide_resnet101_2", ], } pytorch_imagenet_model_names = { "alexnet": "AlexNet", "convnext_tiny": "ConvNeXt_Tiny", "convnext_small": "ConvNeXt_Small", "convnext_base": "ConvNeXt_Base", "convnext_large": "ConvNeXt_Large", "densenet121": "DenseNet121", "densenet161": "DenseNet161", "densenet169": "DenseNet169", "densenet201": "DenseNet201", "efficientnet_b0": "EfficientNet_B0", "efficientnet_b1": "EfficientNet_B1", "efficientnet_b2": "EfficientNet_B2", "efficientnet_b3": "EfficientNet_B3", "efficientnet_b4": "EfficientNet_B4", "efficientnet_b5": "EfficientNet_B5", "efficientnet_b6": "EfficientNet_B6", "efficientnet_b7": "EfficientNet_B7", "efficientnet_v2_s": "EfficientNet_V2_S", "efficientnet_v2_m": "EfficientNet_V2_M", "efficientnet_v2_l": "EfficientNet_V2_L", "googlenet": "GoogLeNet", "inception_v3": "Inception_V3", # "maxvit_t", "mnasnet0_5": "MNASNet0_5", "mnasnet0_75": "MNASNet0_75", "mnasnet1_0": "MNASNet1_0", "mnasnet1_3": "MNASNet1_3", "mobilenet_v2": "MobileNet_V2", "mobilenet_v3_large": "MobileNet_V3_Large", "mobilenet_v3_small": "MobileNet_V3_Small", "regnet_y_400mf": "RegNet_Y_400MF", "regnet_y_800mf": "RegNet_Y_800MF", "regnet_y_1_6gf": "RegNet_Y_1_6GF", "regnet_y_3_2gf": "RegNet_Y_3_2GF", "regnet_y_8gf": "RegNet_Y_8GF", "regnet_y_16gf": "RegNet_Y_16GF", "regnet_y_32gf": "RegNet_Y_32GF", "regnet_y_128gf": "RegNet_Y_128GF", "regnet_x_1_6gf": "RegNet_X_1_6GF", "regnet_x_3_2gf": "RegNet_X_3_2GF", "regnet_x_8gf": "RegNet_X_8GF", "regnet_x_16gf": "RegNet_X_16GF", "regnet_x_32gf": "RegNet_X_32GF", "resnet18": "ResNet18", "resnet34": "ResNet34", "resnet50": "ResNet50", "resnet101": "ResNet101", "resnet152": "ResNet152", "resnext50_32x4d": "ResNeXt50_32X4D", "resnext101_32x8d": "ResNeXt101_32X8D", "resnext101_64x4d": "ResNeXt101_64X4D", "shufflenet_v2_x0_5": "ShuffleNet_V2_X0_5", "shufflenet_v2_x1_0": "ShuffleNet_V2_X1_0", "shufflenet_v2_x1_5": "ShuffleNet_V2_X1_5", "shufflenet_v2_x2_0": "ShuffleNet_V2_X2_0", "squeezenet1_0": "SqueezeNet1_0", "squeezenet1_1": "SqueezeNet1_1", "swin_t": "Swin_T", "swin_s": "Swin_S", "swin_b": "Swin_B", # "swin_v2_t", # "swin_v2_s", # "swin_v2_b", "vgg11": "VGG11", "vgg11_bn": "VGG11_BN", "vgg13": "VGG13", "vgg13_bn": "VGG13_BN", "vgg16": "VGG16", "vgg16_bn": "VGG16_BN", "vgg19": "VGG19", "vgg19_bn": "VGG19_BN", "vit_b_16": "ViT_B_16", "vit_b_32": "ViT_B_32", "vit_l_16": "ViT_L_16", "vit_l_32": "ViT_L_32", # "vit_h_14": "ViT_H_14", "wide_resnet50_2": "Wide_ResNet50_2", "wide_resnet101_2": "Wide_ResNet101_2", } not_in_pytorch_imagenet_models = { "DeiT": [ "deit_tiny_patch16_224", "deit_small_patch16_224", "deit_base_patch16_224", "deit_tiny_distilled_patch16_224", "deit_small_distilled_patch16_224", "deit_base_distilled_patch16_224", "deit_base_patch16_384", "deit_base_distilled_patch16_384", ], "PoolFormer": [ "poolformer_s12", "poolformer_s24", "poolformer_s36", "poolformer_m36", "poolformer_m48", ], "PVT": [ "pvt_tiny", "pvt_small", "pvt_medium", "pvt_large", ], "MLP-Mixer": [ "mixer_b_16", "mixer_l_16", ], } not_in_pytorch_imagenet_model_names = { "deit_tiny_patch16_224": "DeiT-Ti", "deit_small_patch16_224": "DeiT-S", "deit_base_patch16_224": "DeiT-B", "deit_tiny_distilled_patch16_224": "DeiT-Ti⚗", "deit_small_distilled_patch16_224": "DeiT-S⚗", "deit_base_distilled_patch16_224": "DeiT-B⚗", "deit_base_patch16_384": "DeiT-B↑384", "deit_base_distilled_patch16_384": "DeiT-B⚗↑384", "poolformer_s12": "PoolFormer-S12", "poolformer_s24": "PoolFormer-S24", "poolformer_s36": "PoolFormer-S36", "poolformer_m36": "PoolFormer-M36", "poolformer_m48": "PoolFormer-M48", "pvt_tiny": "PVT-Tiny", "pvt_small": "PVT-Small", "pvt_medium": "PVT-Medium", "pvt_large": "PVT-Large", "mixer_b_16": "Mixer-B_16", "mixer_l_16": "Mixer-L_16", } list_of_pytorch_imagenet_models = merge_lists_in_dictionary( pytorch_imagenet_models ) list_of_not_in_pytorch_imagenet_models = merge_lists_in_dictionary( not_in_pytorch_imagenet_models ) imagenet_models = \ list_of_pytorch_imagenet_models + list_of_not_in_pytorch_imagenet_models imagenet_model_names = {**pytorch_imagenet_model_names, **not_in_pytorch_imagenet_model_names}
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/models/classification/config.py
config.py
from typing import Any, Dict, Iterable, Tuple from collections import OrderedDict import numpy as np import torch import torch.nn as nn from torchvision import models from pytorch_grad_cam import GradCAM from pytorch_grad_cam.utils.model_targets import ClassifierOutputTarget from .config import * __all__ = [ "load_pytorch_model_weights", "load_not_in_pytorch_model", "ClassificationModel", ] def load_pytorch_model_weights( model_name: str, specify_weights: str = default_weight_specification, ) -> Any: assert model_name in list_of_pytorch_imagenet_models assert specify_weights is not None and specify_weights in weight_specifications weights = getattr(models, f"{imagenet_model_names[model_name]}_Weights") weights = getattr(weights, specify_weights) return weights def load_not_in_pytorch_model( model_name: str, pretrained: bool = False, weights_dir: str = None, ) -> Any: assert model_name in list_of_not_in_pytorch_imagenet_models supported_models = not_in_pytorch_imagenet_models supported_model_names = not_in_pytorch_imagenet_model_names # DeiT if model_name in supported_models["DeiT"]: from .nets import deit model = getattr(deit, model_name)(pretrained=pretrained) # PoolFormer elif model_name in supported_models["PoolFormer"]: from .nets import poolformer model = getattr(poolformer, model_name)() if pretrained: state_dict = torch.load(f"{weights_dir}/{model_name}.pth.tar") model.load_state_dict(state_dict) # PVT elif model_name in supported_models["PVT"]: from .nets import pvt model = getattr(pvt, model_name)() if pretrained: state_dict = torch.load(f"{weights_dir}/{model_name}.pth") model.load_state_dict(state_dict) # MLP-Mixer elif model_name in supported_models["MLP-Mixer"]: from .nets.mixer import MlpMixer, CONFIGS model = MlpMixer(config=CONFIGS[supported_model_names[model_name]]) if pretrained: model.load_from(np.load(f"{weights_dir}/imagenet1k_{supported_model_names[model_name]}.npz")) else: raise ValueError return model class ClassificationModel: def __init__( self, name: str, pretrained: bool = False, specify_weights: str = None, weights_dir: str = None, mode: str = None, use_cuda: bool = False, ) -> None: assert mode in modes self.name = name self.pretrained = pretrained self.specify_weights = specify_weights self.weights_dir = weights_dir self.mode = mode self.use_cuda = use_cuda self.machine = "cuda" if use_cuda else "cpu" self.model = self.load_model() self.softmax = nn.Softmax(dim=-1) def __call__( self, data: Any, ) -> Any: return self.model(getattr(data, self.machine)()).detach() def load_model( self, ) -> Any: assert self.name in imagenet_models if self.name in list_of_pytorch_imagenet_models: model = getattr(models, self.name) if self.pretrained: weights = load_pytorch_model_weights(self.name, self.specify_weights) model = model(weights=weights) else: model = model(weights=None) else: model = load_not_in_pytorch_model(self.name, self.pretrained, self.weights_dir) if self.mode is not None: model = getattr(model, self.mode)() model = getattr(model, self.machine)() return model def load_state_dict( self, state_dict_path: str, ) -> None: state_dict = OrderedDict([ (".".join(k.split(".")[1:]), v) if k.split(".")[0] == "module" else (k, v) for k, v in torch.load(state_dict_path).items() ]) self.model.load_state_dict(state_dict) def replace( self, target: str, to: str, ) -> None: from ..replace import Replacer Replacer( target=target, to=to, use_cuda=self.use_cuda, )(self.model) if self.mode is not None: self.model = getattr(self.model, self.mode)() self.name = f"{self.name}_{target}-{to}" def merge_preprocess( self, preprocess: torch.nn.Module, ) -> None: self.model = nn.Sequential( preprocess, self.model, ) def predict( self, data: Any, ) -> Tuple[Any, Any]: out = self.__call__(data) confs = self.softmax(out).to(torch.device("cpu")) preds = torch.argmax(confs, dim=-1) return preds, confs def dissect( self, dummy_data: Any, ) -> Dict[str, Any]: hooks = [] layers = {} def register_hook(module): def hook(module, input, output): if len(input) and len(output): class_name = str(module.__class__).split(".")[-1].split("'")[0] module_idx = len(layers) module_key = f"{class_name}-{module_idx + 1}" layers[module_key] = module if ( not isinstance(module, nn.Sequential) and not isinstance(module, nn.ModuleList) ): hooks.append(module.register_forward_hook(hook)) self.model.apply(register_hook) self.model(getattr(dummy_data, self.machine)()) for hook in hooks: hook.remove() return layers def x_ray( self, data: Any, ) -> Tuple[Dict, Dict]: hooks = [] inputs = {} outputs = {} def register_hook(module): def hook(module, input, output): if len(input) and len(output): class_name = str(module.__class__).split(".")[-1].split("'")[0] module_idx = len(outputs) module_key = f"{class_name}-{module_idx + 1}" if isinstance(input, tuple): input = [v for v in input if v is not None] input = torch.cat(input, dim=0) if isinstance(output, tuple): output = [v for v in output if v is not None] output = torch.cat(output, dim=0) inputs[module_key] = input.detach().cpu() outputs[module_key] = output.detach().cpu() if ( not isinstance(module, nn.Sequential) and not isinstance(module, nn.ModuleList) ): hooks.append(module.register_forward_hook(hook)) self.model.apply(register_hook) self.model(getattr(data, self.machine)()) for hook in hooks: hook.remove() return inputs, outputs def grad_cam( self, data: Any, targets: Iterable[Any], indices: Iterable[int], colormap: str = None, aug_smooth: bool = False, eigen_smooth: bool = False, ) -> torch.Tensor: layers = self.dissect(dummy_data=data) layer_names = list(layers.keys()) target_layer_names = [layer_names[i] for i in indices] target_layers = [layers[layer_name] for layer_name in target_layer_names] cam = GradCAM(model=self.model, target_layers=target_layers, use_cuda=self.use_cuda) if targets is not None: targets = [ClassifierOutputTarget(target) for target in targets] mask = cam( input_tensor=data, targets=targets, aug_smooth=aug_smooth, eigen_smooth=eigen_smooth, ) if colormap is not None: from ...tools.imgtools import grayscale_to_colormap mask = grayscale_to_colormap(np.uint8(mask * 255), colormap) mask = np.float32(mask) / 255 return torch.from_numpy(mask)
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/models/classification/base.py
base.py
from ..replace import reshape_classifier_output from .base import ClassificationModel __all__ = [ "CIFAR10ClassificationModel", "CIFAR100ClassificationModel", "ImageNetClassificationModel", ] class CIFAR10ClassificationModel(ClassificationModel): def __init__( self, name: str, weights_path: str = None, mode: str = None, use_cuda: bool = False, ) -> None: super().__init__( name=name, pretrained=False, specify_weights=None, weights_dir=None, mode=mode, use_cuda=use_cuda, ) reshape_classifier_output( model=self.model, out_features=10, use_cuda=use_cuda, ) if weights_path is not None: self.load_state_dict(weights_path) class CIFAR100ClassificationModel(ClassificationModel): def __init__( self, name: str, weights_path: str = None, mode: str = None, use_cuda: bool = False, ) -> None: super().__init__( name=name, pretrained=False, specify_weights=None, weights_dir=None, mode=mode, use_cuda=use_cuda, ) reshape_classifier_output( model=self.model, out_features=100, use_cuda=use_cuda, ) if weights_path is not None: self.load_state_dict(weights_path) class ImageNetClassificationModel(ClassificationModel): def __init__( self, name: str, pretrained: bool = False, specify_weights: str = None, weights_dir: str = None, mode: str = None, use_cuda: bool = False, ) -> None: super().__init__( name=name, pretrained=pretrained, specify_weights=specify_weights, weights_dir=weights_dir, mode=mode, use_cuda=use_cuda, )
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/models/classification/model.py
model.py
import os import copy import torch import torch.nn as nn from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD from timm.models.layers import DropPath, trunc_normal_ from timm.models.registry import register_model from timm.models.layers.helpers import to_2tuple try: from mmseg.models.builder import BACKBONES as seg_BACKBONES from mmseg.utils import get_root_logger from mmcv.runner import _load_checkpoint has_mmseg = True except ImportError: print("If for semantic segmentation, please install mmsegmentation first") has_mmseg = False try: from mmdet.models.builder import BACKBONES as det_BACKBONES from mmdet.utils import get_root_logger from mmcv.runner import _load_checkpoint has_mmdet = True except ImportError: print("If for detection, please install mmdetection first") has_mmdet = False def _cfg(url='', **kwargs): return { 'url': url, 'num_classes': 1000, 'input_size': (3, 224, 224), 'pool_size': None, 'crop_pct': .95, 'interpolation': 'bicubic', 'mean': IMAGENET_DEFAULT_MEAN, 'std': IMAGENET_DEFAULT_STD, 'classifier': 'head', **kwargs } default_cfgs = { 'poolformer_s': _cfg(crop_pct=0.9), 'poolformer_m': _cfg(crop_pct=0.95), } class PatchEmbed(nn.Module): """ Patch Embedding that is implemented by a layer of conv. Input: tensor in shape [B, C, H, W] Output: tensor in shape [B, C, H/stride, W/stride] """ def __init__(self, patch_size=16, stride=16, padding=0, in_chans=3, embed_dim=768, norm_layer=None): super().__init__() patch_size = to_2tuple(patch_size) stride = to_2tuple(stride) padding = to_2tuple(padding) self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, stride=stride, padding=padding) self.norm = norm_layer(embed_dim) if norm_layer else nn.Identity() def forward(self, x): x = self.proj(x) x = self.norm(x) return x class LayerNormChannel(nn.Module): """ LayerNorm only for Channel Dimension. Input: tensor in shape [B, C, H, W] """ def __init__(self, num_channels, eps=1e-05): super().__init__() self.weight = nn.Parameter(torch.ones(num_channels)) self.bias = nn.Parameter(torch.zeros(num_channels)) self.eps = eps def forward(self, x): u = x.mean(1, keepdim=True) s = (x - u).pow(2).mean(1, keepdim=True) x = (x - u) / torch.sqrt(s + self.eps) x = self.weight.unsqueeze(-1).unsqueeze(-1) * x \ + self.bias.unsqueeze(-1).unsqueeze(-1) return x class GroupNorm(nn.GroupNorm): """ Group Normalization with 1 group. Input: tensor in shape [B, C, H, W] """ def __init__(self, num_channels, **kwargs): super().__init__(1, num_channels, **kwargs) class Pooling(nn.Module): """ Implementation of pooling for PoolFormer --pool_size: pooling size """ def __init__(self, pool_size=3): super().__init__() self.pool = nn.AvgPool2d( pool_size, stride=1, padding=pool_size // 2, count_include_pad=False) def forward(self, x): return self.pool(x) - x class Mlp(nn.Module): """ Implementation of MLP with 1*1 convolutions. Input: tensor with shape [B, C, H, W] """ def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.): super().__init__() out_features = out_features or in_features hidden_features = hidden_features or in_features self.fc1 = nn.Conv2d(in_features, hidden_features, 1) self.act = act_layer() self.fc2 = nn.Conv2d(hidden_features, out_features, 1) self.drop = nn.Dropout(drop) self.apply(self._init_weights) def _init_weights(self, m): if isinstance(m, nn.Conv2d): trunc_normal_(m.weight, std=.02) if m.bias is not None: nn.init.constant_(m.bias, 0) def forward(self, x): x = self.fc1(x) x = self.act(x) x = self.drop(x) x = self.fc2(x) x = self.drop(x) return x class PoolFormerBlock(nn.Module): """ Implementation of one PoolFormer block. --dim: embedding dim --pool_size: pooling size --mlp_ratio: mlp expansion ratio --act_layer: activation --norm_layer: normalization --drop: dropout rate --drop path: Stochastic Depth, refer to https://arxiv.org/abs/1603.09382 --use_layer_scale, --layer_scale_init_value: LayerScale, refer to https://arxiv.org/abs/2103.17239 """ def __init__(self, dim, pool_size=3, mlp_ratio=4., act_layer=nn.GELU, norm_layer=GroupNorm, drop=0., drop_path=0., use_layer_scale=True, layer_scale_init_value=1e-5): super().__init__() self.norm1 = norm_layer(dim) self.token_mixer = Pooling(pool_size=pool_size) self.norm2 = norm_layer(dim) mlp_hidden_dim = int(dim * mlp_ratio) self.mlp = Mlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop) # The following two techniques are useful to train deep PoolFormers. self.drop_path = DropPath(drop_path) if drop_path > 0. \ else nn.Identity() self.use_layer_scale = use_layer_scale if use_layer_scale: self.layer_scale_1 = nn.Parameter( layer_scale_init_value * torch.ones((dim)), requires_grad=True) self.layer_scale_2 = nn.Parameter( layer_scale_init_value * torch.ones((dim)), requires_grad=True) def forward(self, x): if self.use_layer_scale: x = x + self.drop_path( self.layer_scale_1.unsqueeze(-1).unsqueeze(-1) * self.token_mixer(self.norm1(x))) x = x + self.drop_path( self.layer_scale_2.unsqueeze(-1).unsqueeze(-1) * self.mlp(self.norm2(x))) else: x = x + self.drop_path(self.token_mixer(self.norm1(x))) x = x + self.drop_path(self.mlp(self.norm2(x))) return x def basic_blocks(dim, index, layers, pool_size=3, mlp_ratio=4., act_layer=nn.GELU, norm_layer=GroupNorm, drop_rate=.0, drop_path_rate=0., use_layer_scale=True, layer_scale_init_value=1e-5): """ generate PoolFormer blocks for a stage return: PoolFormer blocks """ blocks = [] for block_idx in range(layers[index]): block_dpr = drop_path_rate * ( block_idx + sum(layers[:index])) / (sum(layers) - 1) blocks.append(PoolFormerBlock( dim, pool_size=pool_size, mlp_ratio=mlp_ratio, act_layer=act_layer, norm_layer=norm_layer, drop=drop_rate, drop_path=block_dpr, use_layer_scale=use_layer_scale, layer_scale_init_value=layer_scale_init_value, )) blocks = nn.Sequential(*blocks) return blocks class PoolFormer(nn.Module): """ PoolFormer, the main class of our model --layers: [x,x,x,x], number of blocks for the 4 stages --embed_dims, --mlp_ratios, --pool_size: the embedding dims, mlp ratios and pooling size for the 4 stages --downsamples: flags to apply downsampling or not --norm_layer, --act_layer: define the types of normalization and activation --num_classes: number of classes for the image classification --in_patch_size, --in_stride, --in_pad: specify the patch embedding for the input image --down_patch_size --down_stride --down_pad: specify the downsample (patch embed.) --fork_feat: whether output features of the 4 stages, for dense prediction --init_cfg, --pretrained: for mmdetection and mmsegmentation to load pretrained weights """ def __init__(self, layers, embed_dims=None, mlp_ratios=None, downsamples=None, pool_size=3, norm_layer=GroupNorm, act_layer=nn.GELU, num_classes=1000, in_patch_size=7, in_stride=4, in_pad=2, down_patch_size=3, down_stride=2, down_pad=1, drop_rate=0., drop_path_rate=0., use_layer_scale=True, layer_scale_init_value=1e-5, fork_feat=False, init_cfg=None, pretrained=None, **kwargs): super().__init__() if not fork_feat: self.num_classes = num_classes self.fork_feat = fork_feat self.patch_embed = PatchEmbed( patch_size=in_patch_size, stride=in_stride, padding=in_pad, in_chans=3, embed_dim=embed_dims[0]) # set the main block in network network = [] for i in range(len(layers)): stage = basic_blocks(embed_dims[i], i, layers, pool_size=pool_size, mlp_ratio=mlp_ratios[i], act_layer=act_layer, norm_layer=norm_layer, drop_rate=drop_rate, drop_path_rate=drop_path_rate, use_layer_scale=use_layer_scale, layer_scale_init_value=layer_scale_init_value) network.append(stage) if i >= len(layers) - 1: break if downsamples[i] or embed_dims[i] != embed_dims[i + 1]: # downsampling between two stages network.append( PatchEmbed( patch_size=down_patch_size, stride=down_stride, padding=down_pad, in_chans=embed_dims[i], embed_dim=embed_dims[i + 1] ) ) self.network = nn.ModuleList(network) if self.fork_feat: # add a norm layer for each output self.out_indices = [0, 2, 4, 6] for i_emb, i_layer in enumerate(self.out_indices): if i_emb == 0 and os.environ.get('FORK_LAST3', None): # TODO: more elegant way """For RetinaNet, `start_level=1`. The first norm layer will not used. cmd: `FORK_LAST3=1 python -m torch.distributed.launch ...` """ layer = nn.Identity() else: layer = norm_layer(embed_dims[i_emb]) layer_name = f'norm{i_layer}' self.add_module(layer_name, layer) else: # Classifier head self.norm = norm_layer(embed_dims[-1]) self.head = nn.Linear( embed_dims[-1], num_classes) if num_classes > 0 \ else nn.Identity() self.apply(self.cls_init_weights) self.init_cfg = copy.deepcopy(init_cfg) # load pre-trained model if self.fork_feat and ( self.init_cfg is not None or pretrained is not None): self.init_weights() # init for classification def cls_init_weights(self, m): if isinstance(m, nn.Linear): trunc_normal_(m.weight, std=.02) if isinstance(m, nn.Linear) and m.bias is not None: nn.init.constant_(m.bias, 0) # init for mmdetection or mmsegmentation by loading # imagenet pre-trained weights def init_weights(self, pretrained=None): logger = get_root_logger() if self.init_cfg is None and pretrained is None: logger.warn(f'No pre-trained weights for ' f'{self.__class__.__name__}, ' f'training start from scratch') pass else: assert 'checkpoint' in self.init_cfg, f'Only support ' \ f'specify `Pretrained` in ' \ f'`init_cfg` in ' \ f'{self.__class__.__name__} ' if self.init_cfg is not None: ckpt_path = self.init_cfg['checkpoint'] elif pretrained is not None: ckpt_path = pretrained ckpt = _load_checkpoint( ckpt_path, logger=logger, map_location='cpu') if 'state_dict' in ckpt: _state_dict = ckpt['state_dict'] elif 'model' in ckpt: _state_dict = ckpt['model'] else: _state_dict = ckpt state_dict = _state_dict missing_keys, unexpected_keys = \ self.load_state_dict(state_dict, False) # show for debug # print('missing_keys: ', missing_keys) # print('unexpected_keys: ', unexpected_keys) def get_classifier(self): return self.head def reset_classifier(self, num_classes): self.num_classes = num_classes self.head = nn.Linear( self.embed_dim, num_classes) if num_classes > 0 else nn.Identity() def forward_embeddings(self, x): x = self.patch_embed(x) return x def forward_tokens(self, x): outs = [] for idx, block in enumerate(self.network): x = block(x) if self.fork_feat and idx in self.out_indices: norm_layer = getattr(self, f'norm{idx}') x_out = norm_layer(x) outs.append(x_out) if self.fork_feat: # output the features of four stages for dense prediction return outs # output only the features of last layer for image classification return x def forward(self, x): # input embedding x = self.forward_embeddings(x) # through backbone x = self.forward_tokens(x) if self.fork_feat: # otuput features of four stages for dense prediction return x x = self.norm(x) cls_out = self.head(x.mean([-2, -1])) # for image classification return cls_out model_urls = { "poolformer_s12": "https://github.com/sail-sg/poolformer/releases/download/v1.0/poolformer_s12.pth.tar", "poolformer_s24": "https://github.com/sail-sg/poolformer/releases/download/v1.0/poolformer_s24.pth.tar", "poolformer_s36": "https://github.com/sail-sg/poolformer/releases/download/v1.0/poolformer_s36.pth.tar", "poolformer_m36": "https://github.com/sail-sg/poolformer/releases/download/v1.0/poolformer_m36.pth.tar", "poolformer_m48": "https://github.com/sail-sg/poolformer/releases/download/v1.0/poolformer_m48.pth.tar", } @register_model def poolformer_s12(pretrained=False, **kwargs): """ PoolFormer-S12 model, Params: 12M --layers: [x,x,x,x], numbers of layers for the four stages --embed_dims, --mlp_ratios: embedding dims and mlp ratios for the four stages --downsamples: flags to apply downsampling or not in four blocks """ layers = [2, 2, 6, 2] embed_dims = [64, 128, 320, 512] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] model = PoolFormer( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, **kwargs) model.default_cfg = default_cfgs['poolformer_s'] if pretrained: url = model_urls['poolformer_s12'] checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", check_hash=True) model.load_state_dict(checkpoint) return model @register_model def poolformer_s24(pretrained=False, **kwargs): """ PoolFormer-S24 model, Params: 21M """ layers = [4, 4, 12, 4] embed_dims = [64, 128, 320, 512] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] model = PoolFormer( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, **kwargs) model.default_cfg = default_cfgs['poolformer_s'] if pretrained: url = model_urls['poolformer_s24'] checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", check_hash=True) model.load_state_dict(checkpoint) return model @register_model def poolformer_s36(pretrained=False, **kwargs): """ PoolFormer-S36 model, Params: 31M """ layers = [6, 6, 18, 6] embed_dims = [64, 128, 320, 512] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] model = PoolFormer( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, layer_scale_init_value=1e-6, **kwargs) model.default_cfg = default_cfgs['poolformer_s'] if pretrained: url = model_urls['poolformer_s36'] checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", check_hash=True) model.load_state_dict(checkpoint) return model @register_model def poolformer_m36(pretrained=False, **kwargs): """ PoolFormer-M36 model, Params: 56M """ layers = [6, 6, 18, 6] embed_dims = [96, 192, 384, 768] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] model = PoolFormer( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, layer_scale_init_value=1e-6, **kwargs) model.default_cfg = default_cfgs['poolformer_m'] if pretrained: url = model_urls['poolformer_m36'] checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", check_hash=True) model.load_state_dict(checkpoint) return model @register_model def poolformer_m48(pretrained=False, **kwargs): """ PoolFormer-M48 model, Params: 73M """ layers = [8, 8, 24, 8] embed_dims = [96, 192, 384, 768] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] model = PoolFormer( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, layer_scale_init_value=1e-6, **kwargs) model.default_cfg = default_cfgs['poolformer_m'] if pretrained: url = model_urls['poolformer_m48'] checkpoint = torch.hub.load_state_dict_from_url(url=url, map_location="cpu", check_hash=True) model.load_state_dict(checkpoint) return model if has_mmseg and has_mmdet: """ The following models are for dense prediction based on mmdetection and mmsegmentation """ @seg_BACKBONES.register_module() @det_BACKBONES.register_module() class poolformer_s12_feat(PoolFormer): """ PoolFormer-S12 model, Params: 12M """ def __init__(self, **kwargs): layers = [2, 2, 6, 2] embed_dims = [64, 128, 320, 512] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] super().__init__( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, fork_feat=True, **kwargs) @seg_BACKBONES.register_module() @det_BACKBONES.register_module() class poolformer_s24_feat(PoolFormer): """ PoolFormer-S24 model, Params: 21M """ def __init__(self, **kwargs): layers = [4, 4, 12, 4] embed_dims = [64, 128, 320, 512] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] super().__init__( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, fork_feat=True, **kwargs) @seg_BACKBONES.register_module() @det_BACKBONES.register_module() class poolformer_s36_feat(PoolFormer): """ PoolFormer-S36 model, Params: 31M """ def __init__(self, **kwargs): layers = [6, 6, 18, 6] embed_dims = [64, 128, 320, 512] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] super().__init__( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, layer_scale_init_value=1e-6, fork_feat=True, **kwargs) @seg_BACKBONES.register_module() @det_BACKBONES.register_module() class poolformer_m36_feat(PoolFormer): """ PoolFormer-S36 model, Params: 56M """ def __init__(self, **kwargs): layers = [6, 6, 18, 6] embed_dims = [96, 192, 384, 768] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] super().__init__( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, layer_scale_init_value=1e-6, fork_feat=True, **kwargs) @seg_BACKBONES.register_module() @det_BACKBONES.register_module() class poolformer_m48_feat(PoolFormer): """ PoolFormer-M48 model, Params: 73M """ def __init__(self, **kwargs): layers = [8, 8, 24, 8] embed_dims = [96, 192, 384, 768] mlp_ratios = [4, 4, 4, 4] downsamples = [True, True, True, True] super().__init__( layers, embed_dims=embed_dims, mlp_ratios=mlp_ratios, downsamples=downsamples, layer_scale_init_value=1e-6, fork_feat=True, **kwargs)
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/models/classification/nets/poolformer.py
poolformer.py
import torch import torch.nn as nn from functools import partial from timm.models.vision_transformer import VisionTransformer, _cfg from timm.models.registry import register_model from timm.models.layers import trunc_normal_ __all__ = [ 'deit_tiny_patch16_224', 'deit_small_patch16_224', 'deit_base_patch16_224', 'deit_tiny_distilled_patch16_224', 'deit_small_distilled_patch16_224', 'deit_base_distilled_patch16_224', 'deit_base_patch16_384', 'deit_base_distilled_patch16_384', ] class DistilledVisionTransformer(VisionTransformer): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.dist_token = nn.Parameter(torch.zeros(1, 1, self.embed_dim)) num_patches = self.patch_embed.num_patches self.pos_embed = nn.Parameter(torch.zeros(1, num_patches + 2, self.embed_dim)) self.head_dist = nn.Linear(self.embed_dim, self.num_classes) if self.num_classes > 0 else nn.Identity() trunc_normal_(self.dist_token, std=.02) trunc_normal_(self.pos_embed, std=.02) self.head_dist.apply(self._init_weights) def forward_features(self, x): # taken from https://github.com/rwightman/pytorch-image-models/blob/master/timm/models/vision_transformer.py # with slight modifications to add the dist_token B = x.shape[0] x = self.patch_embed(x) cls_tokens = self.cls_token.expand(B, -1, -1) # stole cls_tokens impl from Phil Wang, thanks dist_token = self.dist_token.expand(B, -1, -1) x = torch.cat((cls_tokens, dist_token, x), dim=1) x = x + self.pos_embed x = self.pos_drop(x) for blk in self.blocks: x = blk(x) x = self.norm(x) return x[:, 0], x[:, 1] def forward(self, x): x, x_dist = self.forward_features(x) x = self.head(x) x_dist = self.head_dist(x_dist) if self.training: return x, x_dist else: # during inference, return the average of both classifier predictions return (x + x_dist) / 2 @register_model def deit_tiny_patch16_224(pretrained=False, **kwargs): model = VisionTransformer( patch_size=16, embed_dim=192, depth=12, num_heads=3, mlp_ratio=4, qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs) model.default_cfg = _cfg() if pretrained: checkpoint = torch.hub.load_state_dict_from_url( url="https://dl.fbaipublicfiles.com/deit/deit_tiny_patch16_224-a1311bcf.pth", map_location="cpu", check_hash=True ) model.load_state_dict(checkpoint["model"]) return model @register_model def deit_small_patch16_224(pretrained=False, **kwargs): model = VisionTransformer( patch_size=16, embed_dim=384, depth=12, num_heads=6, mlp_ratio=4, qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs) model.default_cfg = _cfg() if pretrained: checkpoint = torch.hub.load_state_dict_from_url( url="https://dl.fbaipublicfiles.com/deit/deit_small_patch16_224-cd65a155.pth", map_location="cpu", check_hash=True ) model.load_state_dict(checkpoint["model"]) return model @register_model def deit_base_patch16_224(pretrained=False, **kwargs): model = VisionTransformer( patch_size=16, embed_dim=768, depth=12, num_heads=12, mlp_ratio=4, qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs) model.default_cfg = _cfg() if pretrained: checkpoint = torch.hub.load_state_dict_from_url( url="https://dl.fbaipublicfiles.com/deit/deit_base_patch16_224-b5f2ef4d.pth", map_location="cpu", check_hash=True ) model.load_state_dict(checkpoint["model"]) return model @register_model def deit_tiny_distilled_patch16_224(pretrained=False, **kwargs): model = DistilledVisionTransformer( patch_size=16, embed_dim=192, depth=12, num_heads=3, mlp_ratio=4, qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs) model.default_cfg = _cfg() if pretrained: checkpoint = torch.hub.load_state_dict_from_url( url="https://dl.fbaipublicfiles.com/deit/deit_tiny_distilled_patch16_224-b40b3cf7.pth", map_location="cpu", check_hash=True ) model.load_state_dict(checkpoint["model"]) return model @register_model def deit_small_distilled_patch16_224(pretrained=False, **kwargs): model = DistilledVisionTransformer( patch_size=16, embed_dim=384, depth=12, num_heads=6, mlp_ratio=4, qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs) model.default_cfg = _cfg() if pretrained: checkpoint = torch.hub.load_state_dict_from_url( url="https://dl.fbaipublicfiles.com/deit/deit_small_distilled_patch16_224-649709d9.pth", map_location="cpu", check_hash=True ) model.load_state_dict(checkpoint["model"]) return model @register_model def deit_base_distilled_patch16_224(pretrained=False, **kwargs): model = DistilledVisionTransformer( patch_size=16, embed_dim=768, depth=12, num_heads=12, mlp_ratio=4, qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs) model.default_cfg = _cfg() if pretrained: checkpoint = torch.hub.load_state_dict_from_url( url="https://dl.fbaipublicfiles.com/deit/deit_base_distilled_patch16_224-df68dfff.pth", map_location="cpu", check_hash=True ) model.load_state_dict(checkpoint["model"]) return model @register_model def deit_base_patch16_384(pretrained=False, **kwargs): model = VisionTransformer( img_size=384, patch_size=16, embed_dim=768, depth=12, num_heads=12, mlp_ratio=4, qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs) model.default_cfg = _cfg() if pretrained: checkpoint = torch.hub.load_state_dict_from_url( url="https://dl.fbaipublicfiles.com/deit/deit_base_patch16_384-8de9b5d1.pth", map_location="cpu", check_hash=True ) model.load_state_dict(checkpoint["model"]) return model @register_model def deit_base_distilled_patch16_384(pretrained=False, **kwargs): model = DistilledVisionTransformer( img_size=384, patch_size=16, embed_dim=768, depth=12, num_heads=12, mlp_ratio=4, qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), **kwargs) model.default_cfg = _cfg() if pretrained: checkpoint = torch.hub.load_state_dict_from_url( url="https://dl.fbaipublicfiles.com/deit/deit_base_distilled_patch16_384-d0272ac0.pth", map_location="cpu", check_hash=True ) model.load_state_dict(checkpoint["model"]) return model
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/models/classification/nets/deit.py
deit.py
import copy import ml_collections import torch from torch import nn from torch.nn.modules.utils import _pair def get_mixer_b16_config(): """Returns Mixer-B/16 configuration.""" config = ml_collections.ConfigDict() config.name = 'Mixer-B_16' config.patches = ml_collections.ConfigDict({'size': (16, 16)}) config.hidden_dim = 768 config.num_blocks = 12 config.tokens_mlp_dim = 384 config.channels_mlp_dim = 3072 return config def get_mixer_l16_config(): """Returns Mixer-L/16 configuration.""" config = ml_collections.ConfigDict() config.name = 'Mixer-L_16' config.patches = ml_collections.ConfigDict({'size': (16, 16)}) config.hidden_dim = 1024 config.num_blocks = 24 config.tokens_mlp_dim = 512 config.channels_mlp_dim = 4096 return config TOK_FC_0 = "token_mixing/Dense_0" TOK_FC_1 = "token_mixing/Dense_1" CHA_FC_0 = "channel_mixing/Dense_0" CHA_FC_1 = "channel_mixing/Dense_1" PRE_NORM = "LayerNorm_0" POST_NORM = "LayerNorm_1" def np2th(weights, conv=False): """Possibly convert HWIO to OIHW.""" if conv: weights = weights.transpose([3, 2, 0, 1]) return torch.from_numpy(weights) class MlpBlock(nn.Module): def __init__(self, hidden_dim, ff_dim): super(MlpBlock, self).__init__() self.fc0 = nn.Linear(hidden_dim, ff_dim, bias=True) self.fc1 = nn.Linear(ff_dim, hidden_dim, bias=True) self.act_fn = nn.GELU() def forward(self, x): x = self.fc0(x) x = self.act_fn(x) x = self.fc1(x) return x class MixerBlock(nn.Module): def __init__(self, config): super(MixerBlock, self).__init__() self.token_mlp_block = MlpBlock(config.n_patches, config.tokens_mlp_dim) self.channel_mlp_block = MlpBlock(config.hidden_dim, config.channels_mlp_dim) self.pre_norm = nn.LayerNorm(config.hidden_dim, eps=1e-6) self.post_norm = nn.LayerNorm(config.hidden_dim, eps=1e-6) def forward(self, x): h = x x = self.pre_norm(x) x = x.transpose(-1, -2) x = self.token_mlp_block(x) x = x.transpose(-1, -2) x = x + h h = x x = self.post_norm(x) x = self.channel_mlp_block(x) x = x + h return x def load_from(self, weights, n_block): ROOT = f"MixerBlock_{n_block}" with torch.no_grad(): self.token_mlp_block.fc0.weight.copy_( np2th(weights['/'.join([ROOT, TOK_FC_0, "kernel"])]).t()) self.token_mlp_block.fc1.weight.copy_( np2th(weights['/'.join([ROOT, TOK_FC_1, "kernel"])]).t()) self.token_mlp_block.fc0.bias.copy_( np2th(weights['/'.join([ROOT, TOK_FC_0, "bias"])]).t()) self.token_mlp_block.fc1.bias.copy_( np2th(weights['/'.join([ROOT, TOK_FC_1, "bias"])]).t()) self.channel_mlp_block.fc0.weight.copy_( np2th(weights['/'.join([ROOT, CHA_FC_0, "kernel"])]).t()) self.channel_mlp_block.fc1.weight.copy_( np2th(weights['/'.join([ROOT, CHA_FC_1, "kernel"])]).t()) self.channel_mlp_block.fc0.bias.copy_( np2th(weights['/'.join([ROOT, CHA_FC_0, "bias"])]).t()) self.channel_mlp_block.fc1.bias.copy_( np2th(weights['/'.join([ROOT, CHA_FC_1, "bias"])]).t()) self.pre_norm.weight.copy_(np2th(weights['/'.join([ROOT, PRE_NORM, "scale"])])) self.pre_norm.bias.copy_(np2th(weights['/'.join([ROOT, PRE_NORM, "bias"])])) self.post_norm.weight.copy_(np2th(weights['/'.join([ROOT, POST_NORM, "scale"])])) self.post_norm.bias.copy_(np2th(weights['/'.join([ROOT, POST_NORM, "bias"])])) class MlpMixer(nn.Module): def __init__(self, config, img_size=224, num_classes=1000, patch_size=16, zero_head=False): super(MlpMixer, self).__init__() self.zero_head = zero_head self.num_classes = num_classes patch_size = _pair(patch_size) n_patches = (img_size // patch_size[0]) * (img_size // patch_size[1]) config.n_patches = n_patches self.stem = nn.Conv2d(in_channels=3, out_channels=config.hidden_dim, kernel_size=patch_size, stride=patch_size) self.head = nn.Linear(config.hidden_dim, num_classes, bias=True) self.pre_head_ln = nn.LayerNorm(config.hidden_dim, eps=1e-6) self.layer = nn.ModuleList() for _ in range(config.num_blocks): layer = MixerBlock(config) self.layer.append(copy.deepcopy(layer)) def forward(self, x, labels=None): x = self.stem(x) x = x.flatten(2) x = x.transpose(-1, -2) for block in self.layer: x = block(x) x = self.pre_head_ln(x) x = torch.mean(x, dim=1) logits = self.head(x) if labels is not None: loss_fct = nn.CrossEntropyLoss() loss = loss_fct(logits.view(-1, self.num_classes), labels.view(-1)) return loss else: return logits def load_from(self, weights): with torch.no_grad(): if self.zero_head: nn.init.zeros_(self.head.weight) nn.init.zeros_(self.head.bias) else: self.head.weight.copy_(np2th(weights["head/kernel"]).t()) self.head.bias.copy_(np2th(weights["head/bias"]).t()) self.stem.weight.copy_(np2th(weights["stem/kernel"], conv=True)) self.stem.bias.copy_(np2th(weights["stem/bias"])) self.pre_head_ln.weight.copy_(np2th(weights["pre_head_layer_norm/scale"])) self.pre_head_ln.bias.copy_(np2th(weights["pre_head_layer_norm/bias"])) for bname, block in self.layer.named_children(): block.load_from(weights, n_block=bname) CONFIGS = { 'Mixer-B_16': get_mixer_b16_config(), 'Mixer-L_16': get_mixer_l16_config(), 'Mixer-B_16-21k': get_mixer_b16_config(), 'Mixer-L_16-21k': get_mixer_l16_config() }
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/models/classification/nets/mixer.py
mixer.py
import torch import torch.nn as nn import torch.nn.functional as F from functools import partial from timm.models.layers import DropPath, to_2tuple, trunc_normal_ from timm.models.registry import register_model from timm.models.vision_transformer import _cfg __all__ = [ 'pvt_tiny', 'pvt_small', 'pvt_medium', 'pvt_large' ] class Mlp(nn.Module): def __init__(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.): super().__init__() out_features = out_features or in_features hidden_features = hidden_features or in_features self.fc1 = nn.Linear(in_features, hidden_features) self.act = act_layer() self.fc2 = nn.Linear(hidden_features, out_features) self.drop = nn.Dropout(drop) def forward(self, x): x = self.fc1(x) x = self.act(x) x = self.drop(x) x = self.fc2(x) x = self.drop(x) return x class Attention(nn.Module): def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0., sr_ratio=1): super().__init__() assert dim % num_heads == 0, f"dim {dim} should be divided by num_heads {num_heads}." self.dim = dim self.num_heads = num_heads head_dim = dim // num_heads self.scale = qk_scale or head_dim ** -0.5 self.q = nn.Linear(dim, dim, bias=qkv_bias) self.kv = nn.Linear(dim, dim * 2, bias=qkv_bias) self.attn_drop = nn.Dropout(attn_drop) self.proj = nn.Linear(dim, dim) self.proj_drop = nn.Dropout(proj_drop) self.sr_ratio = sr_ratio if sr_ratio > 1: self.sr = nn.Conv2d(dim, dim, kernel_size=sr_ratio, stride=sr_ratio) self.norm = nn.LayerNorm(dim) def forward(self, x, H, W): B, N, C = x.shape q = self.q(x).reshape(B, N, self.num_heads, C // self.num_heads).permute(0, 2, 1, 3) if self.sr_ratio > 1: x_ = x.permute(0, 2, 1).reshape(B, C, H, W) x_ = self.sr(x_).reshape(B, C, -1).permute(0, 2, 1) x_ = self.norm(x_) kv = self.kv(x_).reshape(B, -1, 2, self.num_heads, C // self.num_heads).permute(2, 0, 3, 1, 4) else: kv = self.kv(x).reshape(B, -1, 2, self.num_heads, C // self.num_heads).permute(2, 0, 3, 1, 4) k, v = kv[0], kv[1] attn = (q @ k.transpose(-2, -1)) * self.scale attn = attn.softmax(dim=-1) attn = self.attn_drop(attn) x = (attn @ v).transpose(1, 2).reshape(B, N, C) x = self.proj(x) x = self.proj_drop(x) return x class Block(nn.Module): def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0., drop_path=0., act_layer=nn.GELU, norm_layer=nn.LayerNorm, sr_ratio=1): super().__init__() self.norm1 = norm_layer(dim) self.attn = Attention( dim, num_heads=num_heads, qkv_bias=qkv_bias, qk_scale=qk_scale, attn_drop=attn_drop, proj_drop=drop, sr_ratio=sr_ratio) # NOTE: drop path for stochastic depth, we shall see if this is better than dropout here self.drop_path = DropPath(drop_path) if drop_path > 0. else nn.Identity() self.norm2 = norm_layer(dim) mlp_hidden_dim = int(dim * mlp_ratio) self.mlp = Mlp(in_features=dim, hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop) def forward(self, x, H, W): x = x + self.drop_path(self.attn(self.norm1(x), H, W)) x = x + self.drop_path(self.mlp(self.norm2(x))) return x class PatchEmbed(nn.Module): """ Image to Patch Embedding """ def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768): super().__init__() img_size = to_2tuple(img_size) patch_size = to_2tuple(patch_size) self.img_size = img_size self.patch_size = patch_size # assert img_size[0] % patch_size[0] == 0 and img_size[1] % patch_size[1] == 0, \ # f"img_size {img_size} should be divided by patch_size {patch_size}." self.H, self.W = img_size[0] // patch_size[0], img_size[1] // patch_size[1] self.num_patches = self.H * self.W self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, stride=patch_size) self.norm = nn.LayerNorm(embed_dim) def forward(self, x): B, C, H, W = x.shape x = self.proj(x).flatten(2).transpose(1, 2) x = self.norm(x) H, W = H // self.patch_size[0], W // self.patch_size[1] return x, (H, W) class PyramidVisionTransformer(nn.Module): def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classes=1000, embed_dims=[64, 128, 256, 512], num_heads=[1, 2, 4, 8], mlp_ratios=[4, 4, 4, 4], qkv_bias=False, qk_scale=None, drop_rate=0., attn_drop_rate=0., drop_path_rate=0., norm_layer=nn.LayerNorm, depths=[3, 4, 6, 3], sr_ratios=[8, 4, 2, 1], num_stages=4): super().__init__() self.num_classes = num_classes self.depths = depths self.num_stages = num_stages dpr = [x.item() for x in torch.linspace(0, drop_path_rate, sum(depths))] # stochastic depth decay rule cur = 0 for i in range(num_stages): patch_embed = PatchEmbed(img_size=img_size if i == 0 else img_size // (2 ** (i + 1)), patch_size=patch_size if i == 0 else 2, in_chans=in_chans if i == 0 else embed_dims[i - 1], embed_dim=embed_dims[i]) num_patches = patch_embed.num_patches if i != num_stages - 1 else patch_embed.num_patches + 1 pos_embed = nn.Parameter(torch.zeros(1, num_patches, embed_dims[i])) pos_drop = nn.Dropout(p=drop_rate) block = nn.ModuleList([Block( dim=embed_dims[i], num_heads=num_heads[i], mlp_ratio=mlp_ratios[i], qkv_bias=qkv_bias, qk_scale=qk_scale, drop=drop_rate, attn_drop=attn_drop_rate, drop_path=dpr[cur + j], norm_layer=norm_layer, sr_ratio=sr_ratios[i]) for j in range(depths[i])]) cur += depths[i] setattr(self, f"patch_embed{i + 1}", patch_embed) setattr(self, f"pos_embed{i + 1}", pos_embed) setattr(self, f"pos_drop{i + 1}", pos_drop) setattr(self, f"block{i + 1}", block) self.norm = norm_layer(embed_dims[3]) # cls_token self.cls_token = nn.Parameter(torch.zeros(1, 1, embed_dims[3])) # classification head self.head = nn.Linear(embed_dims[3], num_classes) if num_classes > 0 else nn.Identity() # init weights for i in range(num_stages): pos_embed = getattr(self, f"pos_embed{i + 1}") trunc_normal_(pos_embed, std=.02) trunc_normal_(self.cls_token, std=.02) self.apply(self._init_weights) def _init_weights(self, m): if isinstance(m, nn.Linear): trunc_normal_(m.weight, std=.02) if isinstance(m, nn.Linear) and m.bias is not None: nn.init.constant_(m.bias, 0) elif isinstance(m, nn.LayerNorm): nn.init.constant_(m.bias, 0) nn.init.constant_(m.weight, 1.0) @torch.jit.ignore def no_weight_decay(self): # return {'pos_embed', 'cls_token'} # has pos_embed may be better return {'cls_token'} def get_classifier(self): return self.head def reset_classifier(self, num_classes, global_pool=''): self.num_classes = num_classes self.head = nn.Linear(self.embed_dim, num_classes) if num_classes > 0 else nn.Identity() def _get_pos_embed(self, pos_embed, patch_embed, H, W): if H * W == self.patch_embed1.num_patches: return pos_embed else: return F.interpolate( pos_embed.reshape(1, patch_embed.H, patch_embed.W, -1).permute(0, 3, 1, 2), size=(H, W), mode="bilinear").reshape(1, -1, H * W).permute(0, 2, 1) def forward_features(self, x): B = x.shape[0] for i in range(self.num_stages): patch_embed = getattr(self, f"patch_embed{i + 1}") pos_embed = getattr(self, f"pos_embed{i + 1}") pos_drop = getattr(self, f"pos_drop{i + 1}") block = getattr(self, f"block{i + 1}") x, (H, W) = patch_embed(x) if i == self.num_stages - 1: cls_tokens = self.cls_token.expand(B, -1, -1) x = torch.cat((cls_tokens, x), dim=1) pos_embed_ = self._get_pos_embed(pos_embed[:, 1:], patch_embed, H, W) pos_embed = torch.cat((pos_embed[:, 0:1], pos_embed_), dim=1) else: pos_embed = self._get_pos_embed(pos_embed, patch_embed, H, W) x = pos_drop(x + pos_embed) for blk in block: x = blk(x, H, W) if i != self.num_stages - 1: x = x.reshape(B, H, W, -1).permute(0, 3, 1, 2).contiguous() x = self.norm(x) return x[:, 0] def forward(self, x): x = self.forward_features(x) x = self.head(x) return x def _conv_filter(state_dict, patch_size=16): """ convert patch embedding weight from manual patchify + linear proj to conv""" out_dict = {} for k, v in state_dict.items(): if 'patch_embed.proj.weight' in k: v = v.reshape((v.shape[0], 3, patch_size, patch_size)) out_dict[k] = v return out_dict @register_model def pvt_tiny(pretrained=False, **kwargs): model = PyramidVisionTransformer( patch_size=4, embed_dims=[64, 128, 320, 512], num_heads=[1, 2, 5, 8], mlp_ratios=[8, 8, 4, 4], qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), depths=[2, 2, 2, 2], sr_ratios=[8, 4, 2, 1], **kwargs) model.default_cfg = _cfg() return model @register_model def pvt_small(pretrained=False, **kwargs): model = PyramidVisionTransformer( patch_size=4, embed_dims=[64, 128, 320, 512], num_heads=[1, 2, 5, 8], mlp_ratios=[8, 8, 4, 4], qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), depths=[3, 4, 6, 3], sr_ratios=[8, 4, 2, 1], **kwargs) model.default_cfg = _cfg() return model @register_model def pvt_medium(pretrained=False, **kwargs): model = PyramidVisionTransformer( patch_size=4, embed_dims=[64, 128, 320, 512], num_heads=[1, 2, 5, 8], mlp_ratios=[8, 8, 4, 4], qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), depths=[3, 4, 18, 3], sr_ratios=[8, 4, 2, 1], **kwargs) model.default_cfg = _cfg() return model @register_model def pvt_large(pretrained=False, **kwargs): model = PyramidVisionTransformer( patch_size=4, embed_dims=[64, 128, 320, 512], num_heads=[1, 2, 5, 8], mlp_ratios=[8, 8, 4, 4], qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), depths=[3, 8, 27, 3], sr_ratios=[8, 4, 2, 1], **kwargs) model.default_cfg = _cfg() return model @register_model def pvt_huge_v2(pretrained=False, **kwargs): model = PyramidVisionTransformer( patch_size=4, embed_dims=[128, 256, 512, 768], num_heads=[2, 4, 8, 12], mlp_ratios=[8, 8, 4, 4], qkv_bias=True, norm_layer=partial(nn.LayerNorm, eps=1e-6), depths=[3, 10, 60, 3], sr_ratios=[8, 4, 2, 1], # drop_rate=0.0, drop_path_rate=0.02) **kwargs) model.default_cfg = _cfg() return model
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/models/classification/nets/pvt.py
pvt.py
from torch.optim import lr_scheduler __all__ = [ "build_scheduler", ] schedulers = [ # "LambdaLR", # "MultiplicativeLR", "StepLR", "MultiStepLR", # "ConstantLR", # "LinearLR", # "ExponentialLR", # "PolynomialLR", "CosineAnnealingLR", # "SequentialLR", # "CyclicLR", # "OneCycleLR", # "ChainedScheduler", # "ReduceLROnPlateau", # "CosineAnnealingWarmRestarts", ] def build_scheduler(optimizer, config, start_epoch): scheduler_type = config.SCHEDULER.TYPE assert scheduler_type in schedulers if scheduler_type == "StepLR": scheduler = StepLR(optimizer, config) elif scheduler_type == "MultiStepLR": scheduler = MultiStepLR(optimizer, config) elif scheduler_type == "CosineAnnealingLR": scheduler = CosineAnnealingLR(optimizer, config) else: raise ValueError if hasattr(config.SCHEDULER, "WARMUP"): from .lr_warmup import warmup_wrapper scheduler = warmup_wrapper(scheduler, config, start_epoch) return scheduler def StepLR(optimizer, config): """ in config.yaml: ⋮ SCHEDULER: TYPE: StepLR STEP_SIZE: int GAMMA: float ⋮ """ return lr_scheduler.StepLR( optimizer=optimizer, step_size=config.SCHEDULER.STEP_SIZE, gamma=config.SCHEDULER.GAMMA, last_epoch=-1, verbose=False, ) def MultiStepLR(optimizer, config): """ in config.yaml: ⋮ SCHEDULER: TYPE: MultiStepLR MILESTONES: Iterable[int] GAMMA: float ⋮ """ return lr_scheduler.MultiStepLR( optimizer=optimizer, milestones=config.SCHEDULER.MILESTONES, gamma=config.SCHEDULER.GAMMA, last_epoch=-1, verbose=False, ) def CosineAnnealingLR(optimizer, config): """ in config.yaml: ⋮ SCHEDULER: TYPE: CosineAnnealingLR T_MAX: int ETA_MIN: float ⋮ """ return lr_scheduler.CosineAnnealingLR( optimizer=optimizer, T_max=config.SCHEDULER.T_MAX, eta_min=config.SCHEDULER.ETA_MIN, last_epoch=-1, verbose=False, )
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/train/lr_scheduler.py
lr_scheduler.py
from datetime import datetime import numpy as np import time import torch from torch.nn import DataParallel import tqdm import yaml from ..tools import AttrDict, load_csv_dict __all__ = [ "Trainer", ] def load_config( config_path: str, ) -> AttrDict: from ..tools import make_attrdict with open(config_path, "r") as f: config = yaml.load(f, Loader=yaml.FullLoader) return make_attrdict(config) class Trainer: def __init__( self, train_dataset, val_dataset, model, config_path: str, use_cuda: bool = False, ) -> None: from .criterion import build_criterion from .dataloader import build_dataloader from .lr_scheduler import build_scheduler from .optimizer import build_optimizer self.model = model self.model.model = DataParallel( module=self.model.model, device_ids=list(np.arange(torch.cuda.device_count())), ) self.config = load_config(config_path) self.start_epoch = 1 self.epochs = self.config.EPOCH self.train_dataloader = build_dataloader(train_dataset, self.config) self.val_dataloader = build_dataloader(val_dataset, self.config) if val_dataset is not None else None self.criterion = build_criterion(self.config) self.optimizer = build_optimizer(model.model, self.config) self.scheduler = build_scheduler(self.optimizer, self.config, self.start_epoch) self.use_cuda = use_cuda self.datetime = datetime.now().strftime("%y%m%d%H%M%S") def run( self, weights_save_root: str, log_save_root: str, weights_save_period: int = 1, ) -> None: from ..tools import makedir, save_dictionary_in_csv best_eval_acc = 0.0 log_save_dir = \ f"{log_save_root}/" \ f"{self.train_dataloader.dataset.name}/" \ f"{self.model.name}-{self.datetime}" weights_save_dir = \ f"{weights_save_root}/" \ f"{self.train_dataloader.dataset.name}/" \ f"{self.model.name}_{self.datetime}" if self.start_epoch == 1: makedir(log_save_dir) makedir(weights_save_dir) # save train configuration with open(f"{log_save_dir}/config.yaml", "w") as f: yaml.dump(self.config, f, default_flow_style=False) # save initial model print(f"Saving initial weights to {weights_save_dir}...\n") torch.save( self.model.model.state_dict(), f"{weights_save_dir}/{self.model.name}-init.pth" ) log = { "epoch": [], "lr": [], "train_time": [], "train_loss": [], "train_acc": [], } if self.val_dataloader is not None: log["eval_time"] = [] log["eval_loss"] = [] log["eval_acc"] = [] else: log = load_csv_dict( csv_path=f"{log_save_dir}/log.csv", index_col=None, ) for epoch in range(self.start_epoch, self.epochs + 1): # train lr, train_time, train_loss, train_acc = \ self.train(self.model.model, self.train_dataloader, epoch) log["epoch"].append(epoch) log["lr"].append(lr) log["train_time"].append(train_time) log["train_loss"].append(train_loss) log["train_acc"].append(train_acc) self.scheduler.step() # eval if self.val_dataloader is not None: eval_time, eval_loss, eval_acc = \ self.eval(self.model.model, self.val_dataloader, epoch) log["eval_time"].append(eval_time) log["eval_loss"].append(eval_loss) log["eval_acc"].append(eval_acc) else: eval_acc = train_acc # save best model weights if eval_acc > best_eval_acc: best_eval_acc = eval_acc print(f"Saving best weights to {weights_save_dir}... (Epoch: {epoch})\n") torch.save( self.model.model.state_dict(), f"{weights_save_dir}/{self.model.name}-best.pth" ) # save model weights per weights_save_period if not epoch % weights_save_period: print(f"Saving weights to {weights_save_dir}...\n") torch.save( self.model.model.state_dict(), f"{weights_save_dir}/{self.model.name}-epoch_{epoch}.pth" ) # save train log save_dictionary_in_csv( dictionary=log, save_dir=log_save_dir, save_name="log", index_col="epoch", ) # save checkpoint torch.save( { "epoch": epoch, "state_dict": self.model.model.state_dict(), "optimizer": self.optimizer.state_dict(), }, f"{log_save_dir}/checkpoint.pt", ) def train(self, model, dataloader, epoch): start = time.time() model.train() train_loss = 0.0 train_acc = 0.0 lr = self.optimizer.param_groups[0]["lr"] for (data, targets) in tqdm.tqdm( dataloader, desc=f"[EPOCH {epoch}/{self.epochs}] TRAIN (LR: {lr:0.8f})" ): if self.use_cuda: data = data.to(torch.device("cuda")) targets = targets.to(torch.device("cuda")) self.optimizer.zero_grad() outputs = model(data) loss = self.criterion(outputs, targets) loss.requires_grad_(True) loss.backward() self.optimizer.step() train_loss += loss.item() _, preds = outputs.max(1) train_acc += float(preds.eq(targets).sum().detach().cpu()) finish = time.time() train_loss = train_loss / len(dataloader) train_acc = train_acc / len(dataloader.dataset) print(f"TRAIN LOSS: {train_loss:.8f}\tTRAIN ACC: {(train_acc * 100):.4f}%\n") return self.optimizer.param_groups[0]["lr"], finish - start, train_loss, train_acc @torch.no_grad() def eval(self, model, dataloader, epoch): start = time.time() model.eval() eval_loss = 0.0 eval_acc = 0.0 for (data, targets) in tqdm.tqdm( dataloader, desc=f"[EPOCH {epoch}/{self.epochs}] EVAL" ): if self.use_cuda: data = data.to(torch.device("cuda")) targets = targets.to(torch.device("cuda")) outputs = model(data) loss = self.criterion(outputs, targets) eval_loss += loss.item() _, preds = outputs.max(1) eval_acc += float(preds.eq(targets).sum().detach().cpu()) finish = time.time() eval_loss = eval_loss / len(dataloader) eval_acc = eval_acc / len(dataloader.dataset) print(f"EVAL LOSS: {eval_loss:.8f}\tEVAL ACC: {(eval_acc * 100):.4f}%\n") return finish - start, eval_loss, eval_acc def resume( self, weights_save_root: str, log_save_root: str, prev_datetime: str, weights_save_period: int = 1, ) -> None: from .lr_scheduler import build_scheduler print( f"Resuming {prev_datetime}... " f"(dataset: {self.train_dataloader.dataset.name} / model: {self.model.name})" ) self.datetime = prev_datetime log_save_dir = \ f"{log_save_root}/" \ f"{self.train_dataloader.dataset.name}/" \ f"{self.model.name}-{self.datetime}" checkpoint = torch.load(f"{log_save_dir}/checkpoint.pt") stopped_epoch = checkpoint["epoch"] self.model.model.load_state_dict(checkpoint["state_dict"]) self.optimizer.load_state_dict(checkpoint["optimizer"]) self.start_epoch = stopped_epoch + 1 self.scheduler = build_scheduler(self.optimizer, self.config, self.start_epoch) self.run( weights_save_root, log_save_root, weights_save_period, )
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/train/base.py
base.py
import math from torch.optim.lr_scheduler import _LRScheduler __all__ = [ "warmup_wrapper", ] strategies = [ "const", "cos", "linear", ] def warmup_wrapper(scheduler, config, start_epoch): """ in config.yaml: ⋮ SCHEDULER: TYPE: ... ⋮ WARMUP: INIT_LR: float WARMUP_STEPS: int STRATEGY: str ⋮ """ return WarmUpLR( scheduler=scheduler, max_lr=config.LR, init_lr=config.SCHEDULER.WARMUP.INIT_LR, warmup_steps=config.SCHEDULER.WARMUP.WARMUP_STEPS, strategy=config.SCHEDULER.WARMUP.STRATEGY, start_epoch=start_epoch, ) def warmup_const(start, end, pct): return start if pct < 1 else end def warmup_cos(start, end, pct): cos_pct = (math.cos(math.pi * (1 + pct)) + 1) / 2 return start + (end - start) * cos_pct def warmup_linear(start, end, pct): return start + (end - start) * pct class WarmUpLR(_LRScheduler): def __init__( self, scheduler: _LRScheduler, max_lr: float, init_lr: float = 0., warmup_steps: int = 1, strategy: str = "linear", start_epoch: int = 1, ) -> None: assert strategy in strategies self.scheduler = scheduler self.max_lr = max_lr self.init_lr = init_lr self.warmup_steps = warmup_steps self.strategy = strategy self.start_epoch = start_epoch if strategy == "const": self.warmup_ft = warmup_const elif strategy == "cos": self.warmup_ft = warmup_cos elif strategy == "linear": self.warmup_ft = warmup_linear else: raise ValueError self.init_param() def __getattr__(self, name): return getattr(self.scheduler, name) def state_dict(self): wrapper_state_dict = { key: value for key, value in self.__dict__.items() if (key != "optimizer" and key != "scheduler") } wrapped_state_dict = { key: value for key, value in self.scheduler.__dict__.items() if key != "optimizer" } return {"wrapped": wrapped_state_dict, "wrapper": wrapper_state_dict} def load_state_dict(self, state_dict): self.__dict__.update(state_dict["wrapper"]) self.scheduler.__dict__.update(state_dict["wrapped"]) def init_param(self): for group in self.scheduler.optimizer.param_groups: if self.start_epoch == 1: group["warmup_max_lr"] = group["lr"] else: group["warmup_max_lr"] = self.max_lr init_lr = min(self.init_lr, group["lr"]) group["lr"] = init_lr group["warmup_init_lr"] = init_lr for i in range(1, self.start_epoch): self.scheduler.optimizer.step() self.step() def get_lr(self): lrs = [] step_num = self._step_count if step_num <= self.warmup_steps: for group in self.scheduler.optimizer.param_groups: lr = self.warmup_ft( start=group["warmup_init_lr"], end=group["warmup_max_lr"], pct=step_num / self.warmup_steps, ) lrs.append(lr) else: lrs = self.scheduler.get_lr() return lrs def step(self, *args): if self._step_count <= self.warmup_steps: lrs = self.get_lr() for param_group, lr in zip( self.scheduler.optimizer.param_groups, lrs ): param_group["lr"] = lr self._step_count += 1 self.scheduler.step(*args)
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/train/lr_warmup.py
lr_warmup.py
import torch import torch.nn as nn from .config import methods, normalizations __all__ = [ "DirectionGenerator", ] def normalize_direction( direction: torch.Tensor, method: str = "dim", ) -> torch.Tensor: from ..tools import normalize_v shape = direction.shape normalized = normalize_v( v=direction.reshape(-1), method=method, ) return normalized.reshape(shape) # def cw_direction( # data: torch.Tensor, # targets: torch.Tensor, # model, # normalize: str = None, # seed: int = None, # use_cuda: bool = False, # ) -> torch.Tensor: # TBD def fgsm_direction( data: torch.Tensor, targets: torch.Tensor, model, normalize: str = None, seed: int = None, use_cuda: bool = False, ) -> torch.Tensor: from ..tools import set_random_seed assert model is not None if seed is not None: set_random_seed(seed) device = torch.device("cuda") if use_cuda else torch.device("cpu") data, targets = data.detach().to(device), targets.detach().to(device) data.requires_grad = True out = model(data) model.zero_grad() loss = nn.CrossEntropyLoss()(out, targets) loss.backward() with torch.no_grad(): data_grad = data.grad.data direction = data_grad.sign().detach().cpu() if normalize is not None: direction = normalize_direction(direction, normalize) return direction def random_direction( data: torch.Tensor, normalize: str = None, seed: int = None, ) -> torch.Tensor: from ..tools import set_random_seed if seed is not None: set_random_seed(seed) direction = torch.randn_like(data) if normalize is not None: direction = normalize_direction(direction, normalize) return direction class DirectionGenerator: def __init__( self, method: str = "fgsm", normalize: str = "dim", seed: int = None, model=None, use_cuda: bool = False, ) -> None: assert method in methods assert normalize in normalizations self.method = method self.normalize = normalize self.seed = seed self.model = model self.use_cuda = use_cuda def __call__( self, data: torch.Tensor, targets: torch.Tensor = None, ) -> torch.Tensor: if self.method == "fgsm": assert self.model is not None return fgsm_direction( data=data, targets=targets, model=self.model, normalize=self.normalize, seed=self.seed, use_cuda=self.use_cuda, ) elif self.method == "random": return random_direction( data=data, normalize=self.normalize, seed=self.seed, ) else: raise ValueError def make_perpendicular( self, direction: torch.Tensor, seed: int = None, ) -> torch.Tensor: from ..tools import orthogonal_vector_to_v, set_random_seed shape = direction.shape _direction = orthogonal_vector_to_v( v=direction.reshape(-1), seed=seed, ) set_random_seed(seed=self.seed) _direction = _direction.reshape(shape) if self.normalize is not None: _direction = normalize_direction(_direction, self.normalize) return _direction
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/travel/direction.py
direction.py
import torch from .config import * __all__ = [ "Footprint", ] class Footprint: def __init__( self, model, step: int, method: str = default_method, normalize: str = default_normalize, seed: int = default_seed, bound_data: bool = False, use_cuda: bool = False, ) -> None: from .direction import DirectionGenerator self.model = model self.step = step self.method = method self.normalize = normalize self.seed = seed self.bound_data = bound_data self.use_cuda = use_cuda self.direction_generator = DirectionGenerator( method=method, normalize=normalize, seed=seed, model=model, use_cuda=use_cuda, ) def __call__( self, data: torch.Tensor, epsilons: torch.Tensor, targets: torch.Tensor = None, ) -> torch.Tensor: directions = self.direction_generator( data=data, targets=targets, ) footprints = [] for i in range(len(data)): footprints.append( self.generate_footprints( data=data[i], direction=directions[i], epsilon=epsilons[i], ).unsqueeze(dim=0) ) return torch.cat(footprints, dim=0) def generate_footprints( self, data: torch.Tensor, direction: torch.Tensor, epsilon: float, ) -> torch.Tensor: from ..tools import repeat_tensor footprints = repeat_tensor( tensor=data, repeat=self.step + 1, dim=0, ) footprints_shape = footprints.shape if epsilon < 0: return torch.ones_like(footprints) * invalid_footprint_val directions = repeat_tensor( tensor=direction, repeat=self.step + 1, dim=0, ).reshape(self.step + 1, -1) strides = torch.linspace(0., epsilon, self.step + 1) footprints += (directions.T * strides).T.reshape(footprints_shape) if self.bound_data: footprints = footprints.clamp(0, 1) return footprints
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/travel/footprint.py
footprint.py
from typing import Tuple import torch from torch.nn import Softmax import tqdm from .config import * __all__ = [ "Traveler", ] class Traveler: def __init__( self, model, method: str = default_method, normalize: str = default_normalize, seed: int = default_seed, init_eps: float = 1e-3, stride: float = 1e-3, stride_decay: float = 0.5, tol: float = 1e-10, max_iter: int = 10000, turnaround: float = 0.1, bound_data: bool = False, use_cuda: bool = False, verbose: bool = False, ) -> None: from .direction import DirectionGenerator assert stride > 0 assert 0 < stride_decay < 1 self.model = model self.softmax = Softmax(dim=-1) # travel direction self.method = method self.normalize = normalize self.seed = seed self.direction_generator = DirectionGenerator( method=method, normalize=normalize, seed=seed, model=model, use_cuda=use_cuda, ) # travel hyperparameters self.hyperparameters = { "init_eps": init_eps, "stride": stride, "stride_decay": stride_decay, } self.epsilon = init_eps self.stride = stride self.stride_decay = stride_decay self.tol = tol self.max_iter = max_iter self.turnaround = turnaround self.bound_data = bound_data self.correct = None self._correct = None self.flag = False self.use_cuda = use_cuda self.device = torch.device("cuda" if use_cuda else "cpu") self.verbose = verbose self.num_data = 0 def __call__( self, data: torch.Tensor, targets: torch.Tensor, ) -> Tuple[torch.Tensor, torch.Tensor]: self.num_data = len(data) directions = self.direction_generator(data, targets) traveled_data = torch.zeros_like(data) epsilons = torch.zeros(size=(self.num_data,)) for i in range(self.num_data): traveled_data[i], epsilons[i] = self.travel( data=data[i], target=targets[i], direction=directions[i], i=i, ) self.reset() return traveled_data, epsilons def reset( self, ) -> None: self.epsilon = self.hyperparameters["init_eps"] self.stride = self.hyperparameters["stride"] self.stride_decay = self.hyperparameters["stride_decay"] self.correct = None self._correct = None self.flag = False def update( self, iteration: int, ) -> None: # crossed the decision boundary if self.correct != self._correct: self.flag = True # decrease epsilon & stride self.epsilon = self.epsilon - self.stride self.stride = self.stride * self.stride_decay # still inside the decision region else: self.flag = False # increase epsilon self.epsilon = self.epsilon + self.stride # epsilon must be over 0 if self.epsilon < 0: self.epsilon = 0 # divergence test: # if data still remains inside its decision region (no change in stride) # after {turnaround * 100}% of max_iter, # end travel. if iteration > self.max_iter * self.turnaround \ and self.stride == self.hyperparameters["stride"]: self.flag = "break" def is_correct( self, data: torch.Tensor, target: torch.Tensor, ) -> bool: from .common import model_output _, pred = model_output( model=self.model, data=data, use_cuda=self.use_cuda, ) return bool(torch.eq(pred, target)) def travel( self, data: torch.Tensor, target: torch.Tensor, direction: torch.Tensor, i: int, ) -> Tuple[torch.Tensor, float]: data = data.unsqueeze(dim=0) self.correct = self.is_correct(data, target) if not self.correct: return data, eps_for_incorrect _data = data for iteration in tqdm.trange( self.max_iter, desc=f"[TRAVEL {i + 1}/{self.num_data}]", disable=not self.verbose ): self._correct = self.correct _data = data + (direction * self.epsilon) if self.bound_data: _data = _data.clamp(0, 1) self.correct = self.is_correct(_data, target) # print(f"[eps: {self.epsilon}, stride: {self.stride}] {self._correct} -> {self.correct}") self.update(iteration) # diverged if self.flag == "break": return data, eps_for_divergence # converged: just crossed the decision boundary if self.stride < self.tol and not self.correct: return _data, self.epsilon # not fully converged return _data, -self.epsilon
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/travel/travel.py
travel.py
from typing import Any, Callable, Optional, Tuple import numpy as np from PIL import Image import torch __all__ = [ "ClassificationDataset", ] class ClassificationDataset: def __init__( self, name: str, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, ) -> None: self.name = name self.transform = transform self.target_transform = target_transform self.data = None # << must be initialized self.targets = None # << must be initialized def __getitem__( self, index: int, ) -> Tuple[Any, Any]: if isinstance(self.data, list): # ImageNet path, target = self.data[index] data = Image.open(path).convert("RGB") else: data = self.data[index] target = self.targets[index] if self.transform is not None: data = self.transform(data) if self.target_transform is not None: target = self.target_transform(target) return data, target def __len__( self, ) -> int: return len(self.data) def initialize( self, dataset, ) -> None: self.data = dataset.data self.targets = dataset.targets if isinstance(self.targets, list): self.targets = torch.Tensor(self.targets) self.targets = self.targets.to(torch.int64) def mean_and_std_of_data( self, ) -> Tuple[Any, Any]: assert self.data is not None assert not isinstance(self.data, list) data = self.data if isinstance(data, np.ndarray): data = torch.from_numpy(data) data = data.type(torch.float32) mean = data.mean(axis=(0, 1, 2)) std = data.std(axis=(0, 1, 2)) return mean, std def data_and_targets_of_class_c( self, c: int, ) -> Tuple[Any, Any]: assert self.data is not None and self.targets is not None indices = torch.arange(len(self))[self.targets == c] if isinstance(self.data, list): data_c = [] for i in indices: data, _ = self[i] data_c.append(data.unsqueeze(dim=0)) data_c = torch.cat(data_c, dim=0) else: data_c = self.data[indices] if self.transform: data_c = self.transform(data_c) targets_c = self.targets[indices] if self.target_transform: targets_c = self.target_transform(targets_c) return data_c, targets_c
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/datasets/base.py
base.py
from typing import Callable, List, Optional, Tuple from .base import ClassificationDataset __all__ = [ "CIFAR10Dataset", "CIFAR100Dataset", "FashionMNISTDataset", "ImageNetDataset", "MNISTDataset", ] class CIFAR10Dataset(ClassificationDataset): def __init__( self, root: str, train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False, ) -> None: from torchvision.datasets import CIFAR10 super().__init__( name="CIFAR-10", transform=transform, target_transform=target_transform, ) dataset = CIFAR10(root, train, None, None, download) self.initialize(dataset) class CIFAR100Dataset(ClassificationDataset): def __init__( self, root: str, train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False, ) -> None: from torchvision.datasets import CIFAR100 super().__init__( name="CIFAR-100", transform=transform, target_transform=target_transform, ) dataset = CIFAR100(root, train, None, None, download) self.initialize(dataset) class FashionMNISTDataset(ClassificationDataset): def __init__( self, root: str, train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False, ) -> None: from torchvision.datasets import FashionMNIST super().__init__( name="Fashion-MNIST", transform=transform, target_transform=target_transform, ) dataset = FashionMNIST(root, train, None, None, download) self.initialize(dataset) class ImageNetDataset(ClassificationDataset): def __init__( self, root: str, split: str = "train", transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, ) -> None: from torchvision.datasets import ImageNet from ..tools import get_file_list, make_attrdict super().__init__( name="ImageNet", transform=transform, target_transform=target_transform, ) if split in get_file_list(root, fext=None): path_and_class = self.make_dataset(root, split) dataset = make_attrdict({ "data": path_and_class, "targets": [v[-1] for v in path_and_class], }) else: dataset = ImageNet(root, split) setattr(dataset, "data", dataset.imgs) self.initialize(dataset) @staticmethod def make_dataset( root: str, split: str = "train", ) -> List[Tuple[str, int]]: from torchvision.datasets import DatasetFolder extensions = [".jpeg",] datasetfolder = DatasetFolder( root=f"{root}/{split}", loader=None, extensions=extensions, transform=None, target_transform=None, is_valid_file=None, ) _, class_to_idx = datasetfolder.find_classes(directory=f"{root}/{split}") path_and_class = datasetfolder.make_dataset( directory=f"{root}/{split}", class_to_idx=class_to_idx, extensions=extensions, is_valid_file=None, ) return path_and_class class MNISTDataset(ClassificationDataset): def __init__( self, root: str, train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False, ) -> None: from torchvision.datasets import MNIST super().__init__( name="MNIST", transform=transform, target_transform=target_transform, ) dataset = MNIST(root, train, None, None, download) self.initialize(dataset)
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/datasets/classification.py
classification.py
from typing import Any, Dict, Iterable, List, Tuple from itertools import chain, compress from more_itertools import locate import re __all__ = [ "argmax_list", "argmin_list", "indices_of_value_in_list", "index_of_first_zero_value_in_list", "index_of_first_nonzero_value_in_list", "load_txt_to_list", "save_list_in_txt", "sort_str_list", "remove_empty_string_from_str_list", "merge_list_of_lists", "merge_lists_in_dictionary", "average_of_surroundings", "compare_items_in_list", "topk_index_of_list", "index_of_closest_value_in_list", "sort_list_by_list", "filter_list", ] def argmax_list( lst: List, ) -> int: return lst.index(max(lst)) def argmin_list( lst: List, ) -> int: return lst.index(min(lst)) def indices_of_value_in_list( lst: List, value: Any, ) -> List[int]: return list(locate(lst, lambda x: x == value)) def index_of_first_zero_value_in_list( lst: List, ) -> int: return next((i for i, x in enumerate(lst) if x == 0), None) def index_of_first_nonzero_value_in_list( lst: List, ) -> int: return next((i for i, x in enumerate(lst) if x), None) def load_txt_to_list( path: str, dtype: type, ) -> List: txt_in_strings = \ [line.rstrip('\n') for line in open(path, 'r')] lst_mapped = map(dtype, txt_in_strings) lst = list(lst_mapped) return lst def save_list_in_txt( lst: List[Any], path: str, save_name: str, ) -> None: from .pathtools import makedir makedir(path) save_path = f"{path}/{save_name}.txt" lst_str = [] for i in range(len(lst)): lst_str.append(str(lst[i]) + '\n') with open(save_path, 'w') as f: f.writelines(lst_str) def sort_str_list( str_list: List[str], ) -> Tuple[List[str], List[int]]: convert = lambda text: int(text) if text.isdigit() else text sorted_str_list = sorted( str_list, key=lambda key: [convert(c) for c in re.split('([0-9]+)', key)], ) indices = sorted( range(len(str_list)), key=lambda key: [convert(c) for c in re.split('([0-9]+)', str_list[key])], ) return sorted_str_list, indices def remove_empty_string_from_str_list( str_list: List[str], ) -> List[str]: return [s for s in str_list if len(s)] def merge_list_of_lists( list_of_lists: List[List], ) -> List[Any]: return [item for sublist in list_of_lists for item in sublist] def merge_lists_in_dictionary( dictionary: Dict[Any, List], ) -> List[Any]: lst = [] for key in dictionary: value: List = dictionary[key] lst.append(value) lst = merge_list_of_lists(lst) return lst def average_of_surroundings( lst: List[Any], ) -> List[Any]: def neighbours(items, fill=None): before = chain([fill], items) after = chain(items, [fill]) next(after) for a, b, c in zip(before, items, after): yield [value for value in (a, b, c) if value is not fill] return [sum(v) / len(v) for v in neighbours(items=lst)] def compare_items_in_list( l1: List[Any], l2: List[Any], ) -> List[bool]: assert len(l1) == len(l2) return [i == j for i, j in zip(l1, l2)] def topk_index_of_list( lst: List[Any], k: int, top: bool = True, ) -> List[int]: sorted_lst = sorted(range(len(lst)), key=lambda i: lst[i], reverse=top) return sorted_lst[:k] def index_of_closest_value_in_list( lst: List[Any], val: Any, ) -> Any: return min(range(len(lst)), key=lambda i: abs(lst[i] - val)) def sort_list_by_list( target_list: List[Any], idx_list: List[int], reverse: bool = False, ) -> List[Any]: assert len(target_list) == len(idx_list) return [x for _, x in sorted(zip(idx_list, target_list), reverse=reverse)] def filter_list( original_list: List[Any], bool_filter: Iterable[bool], reverse_bool: bool = False, ) -> List[Any]: if reverse_bool: bool_filter = [not v for v in bool_filter] return list(compress(original_list, bool_filter))
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/tools/listools.py
listools.py
from typing import Any, Dict, List import copy import pandas as pd import tqdm __all__ = [ "load_csv_dict", "dictionary_to_dataframe", "save_dictionary_in_csv", "copy_dictionary", "merge_list_of_dictionaries", "load_and_merge_csv_dicts_in_dir", "AttrDict", "make_attrdict", ] def load_csv_dict( csv_path: str, index_col: Any = 0, ) -> Dict: data = pd.read_csv(csv_path, index_col=index_col) try: return data.to_dict(orient="list") except: return data def dictionary_to_dataframe( dictionary: Dict, index_col: Any = None, ) -> pd.DataFrame: df = pd.DataFrame(dictionary) if index_col is not None: df.set_index(index_col) return df def save_dictionary_in_csv( dictionary: Dict, save_dir: str, save_name: str, index_col: Any = None, ): from .pathtools import makedir makedir(save_dir) save_path = f"{save_dir}/{save_name}.csv" df = dictionary_to_dataframe(dictionary, index_col) if index_col is not None: df.to_csv(save_path, mode='w', index=False) else: df.to_csv(save_path, mode='w') def copy_dictionary( dictionary: Dict, ) -> Dict: return copy.deepcopy(dictionary) def merge_list_of_dictionaries( list_of_dictionaries: List[Dict], verbose: bool = False, ) -> Dict: from .listools import compare_items_in_list, merge_list_of_lists num_dicts = len(list_of_dictionaries) # keys keys = [key for key in list_of_dictionaries[0]] # initialize merged_dict = {} for key in keys: merged_dict[key] = [] # load for dict_index in tqdm.trange( num_dicts, desc=f"Merging {num_dicts} dictionaries...", disable=not verbose, ): dictionary = list_of_dictionaries[dict_index] assert compare_items_in_list(keys, [key for key in dictionary]) for key in keys: merged_dict[key].append(dictionary[key]) # merge for key in keys: merged_dict[key] = merge_list_of_lists(merged_dict[key]) return merged_dict def load_and_merge_csv_dicts_in_dir( csv_dicts_dir: str, index_col: Any = 0, verbose: bool = False, ) -> Dict: from .pathtools import get_file_list dicts_list = get_file_list(csv_dicts_dir, fext="csv") list_of_dictionaries = [] for csv_dict_index in tqdm.trange( len(dicts_list), desc=f"Loading .csv dictionaries in {csv_dicts_dir}...", disable=not bool(verbose) ): csv_dict_fname = dicts_list[csv_dict_index] dictionary = load_csv_dict(f"{csv_dicts_dir}/{csv_dict_fname}", index_col=index_col) list_of_dictionaries.append(dictionary) merged_dict = merge_list_of_dictionaries(list_of_dictionaries, verbose) return merged_dict class AttrDict(dict): def __getattr__(self, name): if name in self: return self[name] else: raise AttributeError(f"No such attribute: {name}") def __setattr__(self, name, value): self[name] = value def __delattr__(self, name): if name in self: del self[name] else: raise AttributeError(f"No such attribute: {name}") def make_attrdict( dictionary: Dict, ) -> AttrDict: dictionary = AttrDict(dictionary) for key, value in dictionary.items(): if isinstance(value, dict): dictionary[key] = make_attrdict(value) return dictionary
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/tools/dictools.py
dictools.py
from typing import Tuple import matplotlib.pyplot as plt import torch __all__ = [ "best_figsize_for_subplots", "plot_multiple_images", "repeat_tensor", ] def best_figsize_for_subplots( num_figs: int, desired_hw_ratio: Tuple[int, int] = (1, 1), ) -> Tuple[int, int]: from .listools import argmin_list # initialize grow = 1 while True: h, w = desired_hw_ratio h, w = h * grow, w * grow size = h * w if size < num_figs: grow += 1 continue break # optimize best = (h, w) err = size - num_figs while err > 0: candidates = [best] errs = [err] h_reduced_err = (h - 1) * w - num_figs w_reduced_err = h * (w - 1) - num_figs if h_reduced_err >= 0: candidates.append((h - 1, w)) errs.append(h_reduced_err) if w_reduced_err >= 0: candidates.append((h, w - 1)) errs.append(w_reduced_err) min_idx = argmin_list(errs) best = candidates[min_idx] err = errs[min_idx] if best == best: break return best def plot_multiple_images( images, desired_hw_ratio: Tuple[int, int] = (1, 1), dpi: int = 300, pad_inches: float = 0., save_to: str = None, ) -> None: dim = len(images.shape) assert dim in [3, 4] if dim == 3: num_figs, img_h, img_w = images.shape else: num_figs, img_h, img_w, c = images.shape h, w = best_figsize_for_subplots(num_figs, desired_hw_ratio) fig, axes = plt.subplots(figsize=(w*img_w/dpi, h*img_h/dpi), nrows=h, ncols=w, dpi=dpi) axes = axes.ravel() for i in range(num_figs): axes[i].imshow(images[i]) [ax.set_axis_off() for ax in axes] if save_to is not None: plt.savefig(save_to, dpi=dpi, bbox_inches="tight", pad_inches=pad_inches) plt.draw() plt.close("all") else: plt.show() def repeat_tensor( tensor: torch.Tensor, repeat: int, dim: int = 0, ) -> torch.Tensor: return torch.repeat_interleave(tensor[None, ...], repeat, dim=dim)
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/tools/misctools.py
misctools.py
import torch import tqdm __all__ = [ "IFGSM", ] class IFGSM: def __init__( self, model, epsilon: float, iteration: int = 1, aid: bool = False, normalizer: torch.nn.Module = None, clip_per_iter: bool = True, use_cuda: bool = False, ) -> None: assert epsilon >= 0. assert iteration > 0 self.model = model self.epsilon = epsilon self.iteration = iteration self.aid = aid self.normalizer = normalizer self.clip_per_iter = clip_per_iter self.use_cuda = use_cuda self.alpha = epsilon / iteration self.machine = "cuda" if use_cuda else "cpu" def __call__( self, data: torch.Tensor, targets: torch.Tensor, verbose: bool = False, ) -> torch.Tensor: if self.epsilon == 0.: return data _data = data.detach() for _ in tqdm.trange( self.iteration, desc=f"I-FGSM {'aid' if self.aid else 'attack'} (ϵ={self.epsilon})", disable=not verbose, ): _data = self.fgsm(_data, targets, self.alpha) if self.clip_per_iter: _data = _data.clamp(0, 1) return _data def get_data_grad( self, data: torch.Tensor, targets: torch.Tensor, ) -> torch.Tensor: data = getattr(data, self.machine)() targets = getattr(targets, self.machine)() if self.normalizer is not None: data = self.normalizer(data) data = data.detach() data.requires_grad = True out = self.model(data) self.model.zero_grad() loss = torch.nn.CrossEntropyLoss()(out, targets) loss.backward() with torch.no_grad(): data_grad = data.grad.data return data_grad.detach().cpu() def fgsm( self, data: torch.Tensor, targets: torch.Tensor, epsilon: float, ) -> torch.Tensor: if epsilon == 0.: return data sign_data_grad = self.get_data_grad(data, targets).sign() if self.aid: sign_data_grad = -sign_data_grad perturbations = epsilon * sign_data_grad perturbations = perturbations.clamp(-epsilon, epsilon) _data = data + perturbations return _data def generate_universal_perturbation( self, data: torch.Tensor, targets: torch.Tensor, batch_size: int = None, verbose: bool = False, ) -> torch.Tensor: from ..tools.misctools import repeat_tensor num_data = len(data) universal_perturbation = torch.zeros(size=data.shape[1:]) if self.epsilon == 0.: return universal_perturbation if batch_size is None: data_batch = data.unsqueeze(dim=0) targets_batch = targets.unsqueeze(dim=0) else: data_batch = torch.split(data, batch_size, dim=0) targets_batch = torch.split(targets, batch_size, dim=0) num_batch = len(data_batch) for _ in tqdm.trange( self.iteration, desc=f"Universal I-FGSM {'aid' if self.aid else 'attack'} (ϵ={self.epsilon})", disable=not verbose, ): sum_data_grad = torch.zeros_like(universal_perturbation) for i in range(num_batch): data_mini_batch = data_batch[i] targets_mini_batch = targets_batch[i] universal_perturbations = repeat_tensor( universal_perturbation, repeat=len(data_mini_batch), dim=0, ) _data_mini_batch = data_mini_batch + universal_perturbations if self.clip_per_iter: _data_mini_batch = _data_mini_batch.clamp(0, 1) data_grad = self.get_data_grad(_data_mini_batch, targets_mini_batch) sum_data_grad += torch.sum(data_grad, dim=0) sign_data_grad = (sum_data_grad / num_data).sign() if self.aid: sign_data_grad = -sign_data_grad universal_perturbation += self.alpha * sign_data_grad universal_perturbation = universal_perturbation.clamp(-self.epsilon, self.epsilon) return universal_perturbation.detach().cpu()
yupeeee-pytools
/yupeeee-pytools-0.1.23.tar.gz/yupeeee-pytools-0.1.23/src/yupeeee_pytools/attacks/ifgsm.py
ifgsm.py
<p align="center"> <img src="logo.png" alt="Logo"><br> </p> <div align="center"> <a href="https://www.python.org/downloads/release/python-370/"><img src="https://img.shields.io/badge/python-3.7-blue" alt="Python"></a> <a href="https://zenodo.org/badge/latestdoi/304602979"><img src="https://zenodo.org/badge/304602979.svg" alt="DOI"></a> <a href="https://pypi.org/project/yupi/"><img src="https://img.shields.io/pypi/v/yupi" alt="PyPI"></a> <a href="https://yupi.readthedocs.io/en/latest/"><img src="https://img.shields.io/readthedocs/yupi" alt="ReadTheDocs"></a> </div> Standing for *Yet Underused Path Instruments*, **yupi** is a set of tools designed for collecting, generating and processing trajectory data. ## **Main features** - **Convert raw data to trajectories** ... *different input manners* - **I/O operations with trajectories** ... *json and csv serializers* - **Trajectory extraction from video inputs** ... *even with moving camera* - **Artificial trajectory generation** ... *several models implemented* - **Trajectory basic operations** ... *rotation, shift, scaling, ...* - **Trajectory transformations** ... *filters, resamplers, ...* - **Statistical analysis rom trajectories ensembles** ... *turning angles histogram, velocity autocorrelation function, power spectral density, and much more ...* - **Results visualization** ... *each statistical observable has a related plot function* - **Spacial projection of trajectories** ... *for 2D and 3D trajectories* ## Installation Current recommended installation method is via PyPI: ```cmd pip install yupi ``` ## Compatibility - Python 3.7 or later - Ubuntu 18.04 or later - Windows 7 or later - macOS 10.12.6 (Sierra) or later. ## Getting Started In the [official documentation](https://yupi.readthedocs.io/en/latest/) there are some resources to start using the library: Tutorials, Examples and a detailed description of the API. ## Examples Code examples (with additional multimedia resources) can be found in [this repository](https://github.com/yupidevs/yupi_examples). Additionally, in the [Examples section](https://yupi.readthedocs.io/en/latest/examples/examples.html) of the documentation, you can find the same examples with additional comments and expected execution results in order to inspect the examples without actually executing them.
yupi
/yupi-0.12.3.tar.gz/yupi-0.12.3/README.md
README.md
# yupiwrap This repository contains functions to simplify the conversion of Trajectory data among [yupi](https://yupi.readthedocs.io/en/latest/) and other useful software libraries designed for analyzing trajectories. Standing for *Yet Underused Path Instruments*, [yupi](https://yupi.readthedocs.io/en/latest/) is a set of tools designed for collecting, generating and processing trajectory data. The structure of yupi aims to standardize the usage and storage of general purpose trajectories independently of its dimensions. We believe it is useful to be able to convert, when possible, yupi trajectories to the data structures used by other libraries to empower our users with the tools offered by third parties. With the same spirit, we offer the possibility of converting data from other libraries to yupi trajectories. ## Installation Current recommended installation method is via the pypi package: ```cmd pip install yupiwrap ``` It will install required dependencies such as [yupi package](https://pypi.org/project/yupi/) from pypi. ## Compatible libraries ### traja The [Traja Python package](https://traja.readthedocs.io/en/latest/index.html) is a toolkit for the numerical characterization and analysis of the trajectories of moving animals. It provides several machine learning tools that are not yet implemented in yupi. Even when it is limited to two-dimensional trajectories, there are many resources that traja can offer when dealing with 2D Trajectories in [yupi](https://yupi.readthedocs.io/en/latest/). #### Converting a *yupi.Trajectory* into a *traja DataFrame* Let's create a trajectory with yupi: ```python from yupi import Trajectory x = [0, 1.0, 0.63, -0.37, -1.24, -1.5, -1.08, -0.19, 0.82, 1.63, 1.99, 1.85] y = [0, 0, 0.98, 1.24, 0.69, -0.3, -1.23, -1.72, -1.63, -1.01, -0.06, 0.94] track = Trajectory(x=x, y=y, traj_id="Spiral") ``` We can convert it to a traja DataFrame simply by: ```python from yupiwrap import yupi2traja traja_track = yupi2traja(track) ``` ⚠️ Only *yupi.Trajectory* objects with two dimensions can be converted to *traja DataFrame* due to traja limitations. #### Converting a *traja DataFrame* into a *yupi.Trajectory* If you have a *traja DataFrame* you can always convert it to a *yupi.Trajectory* by using: ```python from yupiwrap import traja2yupi yupi_track = traja2yupi(traja_track) ``` ### tracktable [Tracktable](https://github.com/sandialabs/tracktable) provides a set of tools for handling 2D and 3D trajectories as well as Terrain trajectories. The core data structures and algorithms on this package are implemented in C++ for speed and more efficient memory use. #### Converting a *yupi.Trajectory* into a tracktable trajectory Let's create a trajectory with yupi: ```python from yupiwrap.tracktable import yupi2tracktable, tracktable2yupi from yupi import Trajectory # Creating a yupi trajectory representing terrain coordinates points = [[-82.359415, 23.135012],[-82.382116, 23.136252]] track_1 = Trajectory(points=points, traj_id="ter_track") # Creating a 2D yupi trajectory points = [[0, 0], [1.0, 0], [0.63, 0.98], [-0.37, 1.24], [-1.24, 0.69], [-1.5, -0.3], [-1.08, -1.23], [-0.19, -1.72], [0.82, -1.63], [1.63, -1.01], [1.99, -0.06], [1.85, 0.94]] track_2 = Trajectory(points=points, traj_id="2d_track") # Creating a 3D yupi trajectory points = [[0,0,0], [1,1,3], [3,2,5]] track_3 = Trajectory(points=points, traj_id="3d_track") ``` We can convert these tracks to tracktable trajectories simply by: ```python tracktable_track_1 = yupi2tracktable(track_1, is_terrestrial=True) tracktable_track_2 = yupi2tracktable(track_2) tracktable_track_3 = yupi2tracktable(track_3) ``` ⚠️ If a 3D yupi trajectory is converted to a tracktable trajectory with `is_terrestrial=True` then the `z` axis values are stored as a property called `'altitude'` for each point. ⚠️ Only *yupi.Trajectory* objects with two or three dimensions can be converted to tracktable trajectories due to tracktable limitations. #### Converting a tracktable trajectory into a *yupi.Trajectory* If you have a tracktable trajectory you can always convert it to a *yupi.Trajectory* by using: ```python # Converting the trajectory from tracktable to yupi yupi_track_1 = tracktable2yupi(tracktable_track_1) ```
yupiwrap
/yupiwrap-0.1.2.tar.gz/yupiwrap-0.1.2/README.md
README.md
# YupTools YupTools is a Python package based on PyTorch. --- ## Installation Latest version: 0.1.9 <br> **Note: [Manual installation of PyTorch](https://pytorch.org/get-started/locally/) is required.** ``` pip install yuptools==0.1.9 ``` ### Requirements ``` Python >= 3.8 matplotlib numpy pandas Pillow pyyaml pyperclip scipy selenium timm # torch # torchvision tqdm webdriver_manager ``` ## Usage ``` import yuptools ``` ## Structure - attacks - [FGSM](https://github.com/yupeeee/YupTools/blob/main/docs/attacks/FGSM.md) - [IFGSM](https://github.com/yupeeee/YupTools/blob/main/docs/attacks/IFGSM.md) - datasets - [base](https://github.com/yupeeee/YupTools/blob/main/docs/datasets/base.md) - [image_classification](https://github.com/yupeeee/YupTools/blob/main/docs/datasets/image_classification.md) - models - classification - [base](https://github.com/yupeeee/YupTools/blob/main/docs/models/classification/base.md) - [models](https://github.com/yupeeee/YupTools/blob/main/docs/models/classification/models.md) - replace - [Replacer](https://github.com/yupeeee/YupTools/blob/main/docs/models/replace/base/Replacer.md) - test - [AccuracyTest](https://github.com/yupeeee/YupTools/blob/main/docs/models/test/AccuracyTest.md) - [CalibrationTest](https://github.com/yupeeee/YupTools/blob/main/docs/models/test/CalibrationTest.md) - [LinearityTest](https://github.com/yupeeee/YupTools/blob/main/docs/models/test/LinearityTest.md) - [xray (FeatureExtractor)](https://github.com/yupeeee/YupTools/blob/main/docs/models/xray.md) - plotlib - [BarPlot](https://github.com/yupeeee/YupTools/blob/main/docs/plotlib/BarPlot.md) - [common](https://github.com/yupeeee/YupTools/blob/main/docs/plotlib/common.md) - tools - [attrtools](https://github.com/yupeeee/YupTools/blob/main/docs/tools/attrtools.md) - [dictools](https://github.com/yupeeee/YupTools/blob/main/docs/tools/dictools.md) - [imgtools](https://github.com/yupeeee/YupTools/blob/main/docs/tools/imgtools.md) - [linalgtools](https://github.com/yupeeee/YupTools/blob/main/docs/tools/linalgtools.md) - [listools](https://github.com/yupeeee/YupTools/blob/main/docs/tools/listools.md) - [pathtools](https://github.com/yupeeee/YupTools/blob/main/docs/tools/pathtools.md) - [randtools](https://github.com/yupeeee/YupTools/blob/main/docs/tools/randtools.md) - train - [SupervisedLearner](https://github.com/yupeeee/YupTools/blob/main/docs/train/SupervisedLearner.md) - travel - [DirectionGenerator](https://github.com/yupeeee/YupTools/blob/main/docs/travel/DirectionGenerator.md) - [Footprint](https://github.com/yupeeee/YupTools/blob/main/docs/travel/Footprint.md) - [Traveler](https://github.com/yupeeee/YupTools/blob/main/docs/travel/Traveler.md) - web - [ChromeDriver](https://github.com/yupeeee/YupTools/blob/main/docs/web/chrome/driver/ChromeDriver.md)
yuptools
/yuptools-0.1.9.tar.gz/yuptools-0.1.9/README.md
README.md
# yuque-py Python SDK for [yuque](https://www.yuque.com/yuque/developer/api) ## Install ```bash pip install yuque-py ``` ## Usage ```python from yuque_py import Yuque yuque=Yuque(api_host="",user_token="") yuque.docs ``` ## API see [Yuque API Docs](https://www.yuque.com/yuque/developer/api) for more details. ### users see the source. ### groups see the source. ### repos see the source. ### docs see the source. ## TODO - [ ] API docs - [ ] JSDocs definition for result info - [ ] add `d.ts` or refactor to TypeScript
yuque-py
/yuque-py-0.0.4.tar.gz/yuque-py-0.0.4/README.md
README.md
import typing import requests from urllib.parse import urlencode from .abstract_client import AbstractClient from yuque_py.exceptions.request_error import RequestError class Client(AbstractClient): api_host: str user_token: str def __init__(self, api_host: str, user_token: str) -> None: self.api_host = api_host self.user_token = user_token def request( self, api: str, method: str, requests_data: typing.Optional[typing.Dict[str, typing.Any]] = None, user_agent: str = "@yuque/sdk", ) -> typing.Dict: request_url = f"{self.api_host}/{api}" request_header = {"User-Agent": user_agent, "X-Auth-Token": self.user_token} if method == "GET": func = self._get_request elif method == "POST": request_header["Content-Type"] = "application/json" func = self._post_request elif method == "PUT": request_header["Content-Type"] = "application/json" func = self._put_request elif method == "DELETE": func = self._delete_request else: raise ValueError response = func(request_url, requests_data, request_header) if response.status_code != 200: raise RequestError(response.status_code, response.text) return response.json() @staticmethod def _get_request( request_url: str, requests_data: typing.Optional[typing.Dict[str, typing.Any]], request_header: typing.Dict[str, str], ) -> requests.Response: if requests_data: request_url = f"{request_url}?{urlencode(requests_data)}" return requests.get(request_url, headers=request_header) @staticmethod def _post_request( request_url: str, requests_data: typing.Optional[typing.Dict[str, typing.Any]], request_header: typing.Dict[str, str], ) -> requests.Response: return requests.post(request_url, json=requests_data, headers=request_header) @staticmethod def _put_request( request_url: str, requests_data: typing.Optional[typing.Dict[str, typing.Any]], request_header: typing.Dict[str, str], ) -> requests.Response: return requests.put(request_url, json=requests_data, headers=request_header) @staticmethod def _delete_request( request_url: str, requests_data: typing.Optional[typing.Dict[str, typing.Any]], request_header: typing.Dict[str, str], ) -> requests.Response: return requests.delete(request_url, headers=request_header)
yuque-py
/yuque-py-0.0.4.tar.gz/yuque-py-0.0.4/yuque_py/clients/client.py
client.py
yuriko ====== Encrypted notes. DISCLAIMER: use it on your own risk, authors are not responsible for any vulnerability may lead to a leak of sensitive data or loss of data. Please make sure your password is strong enough. Setup ----- .. code-block:: bash pip install yuriko Set environment variable `YURIKO_DB_PATH` to path to where the database will be located (it can be created with `init` if not exist). One way is to use `~/.bash_profile`: .. code-block:: bash vim ~/.bash_profile // add `export YURIKO_DB_PATH=/some/path` source ~/.bash_profile Also there is `YURIKO_PASSWORD_SUFFIX` environment variable. AES key = `(password entered + YURIKO_PASSWORD_SUFFIX)[:16]`, so password to enter can be a bit shorter. Usage ----- .. code-block:: bash yuriko init yuriko search <q prefix> yuriko open <key> yuriko del <key> yuriko password <size> # password generator
yuriko
/yuriko-0.0.4.tar.gz/yuriko-0.0.4/README.rst
README.rst
MIT License Copyright (c) 2017-2018 sho7noka Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The MIT License (MIT) Copyright (c) 2016 Marcus Ottosson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The MIT License (MIT) Copyright (c) <2013-2014> <Colin Duquesnoy> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
yurlungur
/yurlungur-0.9.7-py3-none-any.whl/yurlungur-0.9.7.dist-info/LICENSE.md
LICENSE.md
# yurumikuji [![PyPI version](https://badge.fury.io/py/yurumikuji.svg)](https://badge.fury.io/py/yurumikuji) [![Python Versions](https://img.shields.io/pypi/pyversions/wandbox_api.svg)](https://pypi.org/project/yurumikuji/) [kamidana][] slack additonal ## Usage ```sh $ pip install yurumikuji $ echo "SLACK_TOKEN=<your token>" > .env $ amidana --additionals=yurumikuji.yurumikuji sample/profile.j2 https://secure.gravatar.com/avatar/a7614593f3f6f46b73da348c89beba81.jpg?s=512&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-512.png https://secure.gravatar.com/avatar/a7614593f3f6f46b73da348c89beba81.jpg?s=512&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-512.png active ``` sample/profile.j2 ```j2 {{ ("srz_zumix" | slack_user_id | slack_user_info).profile.image_512 }} {{ ("srz_zumix" | slack_user_id | slack_user_profile).image_512 }} {{ "srz_zumix" | slack_user_id | slack_user_presence }} ``` ## Features ### Filter |name|usage|detail|slack required scope| |:--|:--|:--|:--| |slack_user_id|\<user_name\> \| slack_user_id |user name\|real_name\|display_name to user_id|users:read| |slack_user_presence|\<user_id\> \| slack_user_presence |get user presence|users:read| |slack_user_info|\<user_id\> \| slack_user_info |get user info|users:read| |slack_user_profile|\<user_id\> \| slack_user_profile |get user profile|users.profile:read| |slack_user_info_by_email|\<user_email\> \| slack_user_info_by_email |get user info|users:read.email| |slack_usergroup_id|\<usergroup_name\> \| slack_usergroup_id |usergroup name to usergroup_id|usergroups:read| |slack_usergroup_member_ids|\<usergroup_id\> \| slack_usergroup_member_ids |get usergroup member user ids|usergroups:read| |slack_usergroup_member_infos|\<usergroup_id\> \| slack_usergroup_member_infos |get usergroup member user info|usergroups:read| |slack_usergroup_member_infos|\<usergroup_id\> \| slack_usergroup_member_infos |get usergroup member user info|usergroups:read| |slack_search|\<search_query\> \| slack_search | search message |search:read| [kamidana]:https://github.com/podhmo/kamidana
yurumikuji
/yurumikuji-0.2.0.tar.gz/yurumikuji-0.2.0/README.md
README.md
!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):b(a.RSVP=a.RSVP||{})}(this,function(a){"use strict";function b(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function c(a){var b=a._promiseCallbacks;return b||(b=a._promiseCallbacks={}),b}function d(a,b){if(2!==arguments.length)return wa[a];wa[a]=b}function e(a){var b=typeof a;return null!==a&&("object"===b||"function"===b)}function f(a){return"function"==typeof a}function g(a){return null!==a&&"object"==typeof a}function h(a){return null!==a&&"object"==typeof a}function i(){setTimeout(function(){for(var a=0;a<Aa.length;a++){var b=Aa[a],c=b.payload;c.guid=c.key+c.id,c.childGuid=c.key+c.childId,c.error&&(c.stack=c.error.stack),wa.trigger(b.name,b.payload)}Aa.length=0},50)}function j(a,b,c){1===Aa.push({name:a,payload:{key:b._guidKey,id:b._id,eventName:a,detail:b._result,childId:c&&c._id,label:b._label,timeStamp:za(),error:wa["instrument-with-stack"]?new Error(b._label):null}})&&i()}function k(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(m,b);return s(d,a),d}function l(){return new TypeError("A promises callback cannot return that same promise.")}function m(){}function n(a){try{return a.then}catch(a){return Ea.error=a,Ea}}function o(a,b,c,d){try{a.call(b,c,d)}catch(a){return a}}function p(a,b,c){wa.async(function(a){var d=!1,e=o(c,b,function(c){d||(d=!0,b!==c?s(a,c,void 0):u(a,c))},function(b){d||(d=!0,v(a,b))},"Settle: "+(a._label||" unknown promise"));!d&&e&&(d=!0,v(a,e))},a)}function q(a,b){b._state===Ca?u(a,b._result):b._state===Da?(b._onError=null,v(a,b._result)):w(b,void 0,function(c){b!==c?s(a,c,void 0):u(a,c)},function(b){return v(a,b)})}function r(a,b,c){b.constructor===a.constructor&&c===C&&a.constructor.resolve===k?q(a,b):c===Ea?(v(a,Ea.error),Ea.error=null):f(c)?p(a,b,c):u(a,b)}function s(a,b){a===b?u(a,b):e(b)?r(a,b,n(b)):u(a,b)}function t(a){a._onError&&a._onError(a._result),x(a)}function u(a,b){a._state===Ba&&(a._result=b,a._state=Ca,0===a._subscribers.length?wa.instrument&&j("fulfilled",a):wa.async(x,a))}function v(a,b){a._state===Ba&&(a._state=Da,a._result=b,wa.async(t,a))}function w(a,b,c,d){var e=a._subscribers,f=e.length;a._onError=null,e[f]=b,e[f+Ca]=c,e[f+Da]=d,0===f&&a._state&&wa.async(x,a)}function x(a){var b=a._subscribers,c=a._state;if(wa.instrument&&j(c===Ca?"fulfilled":"rejected",a),0!==b.length){for(var d=void 0,e=void 0,f=a._result,g=0;g<b.length;g+=3)d=b[g],e=b[g+c],d?A(c,d,e,f):e(f);a._subscribers.length=0}}function y(){this.error=null}function z(a,b){try{return a(b)}catch(a){return Fa.error=a,Fa}}function A(a,b,c,d){var e=f(c),g=void 0,h=void 0;if(e){if((g=z(c,d))===Fa)h=g.error,g.error=null;else if(g===b)return void v(b,l())}else g=d;b._state!==Ba||(e&&void 0===h?s(b,g):void 0!==h?v(b,h):a===Ca?u(b,g):a===Da&&v(b,g))}function B(a,b){var c=!1;try{b(function(b){c||(c=!0,s(a,b))},function(b){c||(c=!0,v(a,b))})}catch(b){v(a,b)}}function C(a,b,c){var d=this,e=d._state;if(e===Ca&&!a||e===Da&&!b)return wa.instrument&&j("chained",d,d),d;d._onError=null;var f=new d.constructor(m,c),g=d._result;if(wa.instrument&&j("chained",d,f),e===Ba)w(d,f,a,b);else{var h=e===Ca?a:b;wa.async(function(){return A(e,f,h,g)})}return f}function D(a,b,c){return a===Ca?{state:"fulfilled",value:c}:{state:"rejected",reason:c}}function E(a,b){return ya(a)?new Ga(this,a,!0,b).promise:this.reject(new TypeError("Promise.all must be called with an array"),b)}function F(a,b){var c=this,d=new c(m,b);if(!ya(a))return v(d,new TypeError("Promise.race must be called with an array")),d;for(var e=0;d._state===Ba&&e<a.length;e++)w(c.resolve(a[e]),void 0,function(a){return s(d,a)},function(a){return v(d,a)});return d}function G(a,b){var c=this,d=new c(m,b);return v(d,a),d}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function I(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function J(){this.value=void 0}function K(a){try{return a.then}catch(a){return Ka.value=a,Ka}}function L(a,b,c){try{a.apply(b,c)}catch(a){return Ka.value=a,Ka}}function M(a,b){for(var c={},d=a.length,e=new Array(d),f=0;f<d;f++)e[f]=a[f];for(var g=0;g<b.length;g++){c[b[g]]=e[g+1]}return c}function N(a){for(var b=a.length,c=new Array(b-1),d=1;d<b;d++)c[d-1]=a[d];return c}function O(a,b){return{then:function(c,d){return a.call(b,c,d)}}}function P(a,b){var c=function(){for(var c=this,d=arguments.length,e=new Array(d+1),f=!1,g=0;g<d;++g){var h=arguments[g];if(!f){if((f=S(h))===La){var i=new Ja(m);return v(i,La.value),i}f&&!0!==f&&(h=O(f,h))}e[g]=h}var j=new Ja(m);return e[d]=function(a,c){a?v(j,a):void 0===b?s(j,c):!0===b?s(j,N(arguments)):ya(b)?s(j,M(arguments,b)):s(j,c)},f?R(j,e,a,c):Q(j,e,a,c)};return c.__proto__=a,c}function Q(a,b,c,d){var e=L(c,d,b);return e===Ka&&v(a,e.value),a}function R(a,b,c,d){return Ja.all(b).then(function(b){var e=L(c,d,b);return e===Ka&&v(a,e.value),a})}function S(a){return!(!a||"object"!=typeof a)&&(a.constructor===Ja||K(a))}function T(a,b){return Ja.all(a,b)}function U(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function V(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function W(a,b){return ya(a)?new Ma(Ja,a,b).promise:Ja.reject(new TypeError("Promise.allSettled must be called with an array"),b)}function X(a,b){return Ja.race(a,b)}function Y(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function Z(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function $(a,b){return g(a)?new Oa(Ja,a,b).promise:Ja.reject(new TypeError("Promise.hash must be called with an object"),b)}function _(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function aa(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function ba(a,b){return g(a)?new Pa(Ja,a,!1,b).promise:Ja.reject(new TypeError("RSVP.hashSettled must be called with an object"),b)}function ca(a){throw setTimeout(function(){throw a}),a}function da(a){var b={resolve:void 0,reject:void 0};return b.promise=new Ja(function(a,c){b.resolve=a,b.reject=c},a),b}function ea(a,b,c){return ya(a)?f(b)?Ja.all(a,c).then(function(a){for(var d=a.length,e=new Array(d),f=0;f<d;f++)e[f]=b(a[f]);return Ja.all(e,c)}):Ja.reject(new TypeError("RSVP.map expects a function as a second argument"),c):Ja.reject(new TypeError("RSVP.map must be called with an array"),c)}function fa(a,b){return Ja.resolve(a,b)}function ga(a,b){return Ja.reject(a,b)}function ha(a,b){return Ja.all(a,b)}function ia(a,b){return Ja.resolve(a,b).then(function(a){return ha(a,b)})}function ja(a,b,c){return ya(a)||g(a)&&void 0!==a.then?f(b)?(ya(a)?ha(a,c):ia(a,c)).then(function(a){for(var d=a.length,e=new Array(d),f=0;f<d;f++)e[f]=b(a[f]);return ha(e,c).then(function(b){for(var c=new Array(d),e=0,f=0;f<d;f++)b[f]&&(c[e]=a[f],e++);return c.length=e,c})}):Ja.reject(new TypeError("RSVP.filter expects function as a second argument"),c):Ja.reject(new TypeError("RSVP.filter must be called with an array or promise"),c)}function ka(a,b){Xa[Qa]=a,Xa[Qa+1]=b,2===(Qa+=2)&&Ya()}function la(){var a=process.nextTick,b=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(b)&&"0"===b[1]&&"10"===b[2]&&(a=setImmediate),function(){return a(qa)}}function ma(){return void 0!==Ra?function(){Ra(qa)}:pa()}function na(){var a=0,b=new Ua(qa),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){return c.data=a=++a%2}}function oa(){var a=new MessageChannel;return a.port1.onmessage=qa,function(){return a.port2.postMessage(0)}}function pa(){return function(){return setTimeout(qa,1)}}function qa(){for(var a=0;a<Qa;a+=2){(0,Xa[a])(Xa[a+1]),Xa[a]=void 0,Xa[a+1]=void 0}Qa=0}function ra(){try{var a=require,b=a("vertx");return Ra=b.runOnLoop||b.runOnContext,ma()}catch(a){return pa()}}function sa(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function ta(){wa.on.apply(wa,arguments)}function ua(){wa.off.apply(wa,arguments)}var va={mixin:function(a){return a.on=this.on,a.off=this.off,a.trigger=this.trigger,a._promiseCallbacks=void 0,a},on:function(a,d){if("function"!=typeof d)throw new TypeError("Callback must be a function");var e=c(this),f=void 0;f=e[a],f||(f=e[a]=[]),-1===b(f,d)&&f.push(d)},off:function(a,d){var e=c(this),f=void 0,g=void 0;if(!d)return void(e[a]=[]);f=e[a],-1!==(g=b(f,d))&&f.splice(g,1)},trigger:function(a,b,d){var e=c(this),f=void 0;if(f=e[a])for(var g=0;g<f.length;g++)(0,f[g])(b,d)}},wa={instrument:!1};va.mixin(wa);var xa=void 0;xa=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var ya=xa,za=Date.now||function(){return(new Date).getTime()},Aa=[],Ba=void 0,Ca=1,Da=2,Ea=new y,Fa=new y,Ga=function(){function a(a,b,c,d){this._instanceConstructor=a,this.promise=new a(m,d),this._abortOnReject=c,this._init.apply(this,arguments)}return a.prototype._init=function(a,b){var c=b.length||0;this.length=c,this._remaining=c,this._result=new Array(c),this._enumerate(b),0===this._remaining&&u(this.promise,this._result)},a.prototype._enumerate=function(a){for(var b=this.length,c=this.promise,d=0;c._state===Ba&&d<b;d++)this._eachEntry(a[d],d)},a.prototype._settleMaybeThenable=function(a,b){var c=this._instanceConstructor,d=c.resolve;if(d===k){var e=n(a);if(e===C&&a._state!==Ba)a._onError=null,this._settledAt(a._state,b,a._result);else if("function"!=typeof e)this._remaining--,this._result[b]=this._makeResult(Ca,b,a);else if(c===Ja){var f=new c(m);r(f,a,e),this._willSettleAt(f,b)}else this._willSettleAt(new c(function(b){return b(a)}),b)}else this._willSettleAt(d(a),b)},a.prototype._eachEntry=function(a,b){h(a)?this._settleMaybeThenable(a,b):(this._remaining--,this._result[b]=this._makeResult(Ca,b,a))},a.prototype._settledAt=function(a,b,c){var d=this.promise;d._state===Ba&&(this._abortOnReject&&a===Da?v(d,c):(this._remaining--,this._result[b]=this._makeResult(a,b,c),0===this._remaining&&u(d,this._result)))},a.prototype._makeResult=function(a,b,c){return c},a.prototype._willSettleAt=function(a,b){var c=this;w(a,void 0,function(a){return c._settledAt(Ca,b,a)},function(a){return c._settledAt(Da,b,a)})},a}(),Ha="rsvp_"+za()+"-",Ia=0,Ja=function(){function a(b,c){this._id=Ia++,this._label=c,this._state=void 0,this._result=void 0,this._subscribers=[],wa.instrument&&j("created",this),m!==b&&("function"!=typeof b&&H(),this instanceof a?B(this,b):I())}return a.prototype._onError=function(a){var b=this;wa.after(function(){b._onError&&wa.trigger("error",a,b._label)})},a.prototype.catch=function(a,b){return this.then(void 0,a,b)},a.prototype.finally=function(a,b){var c=this,d=c.constructor;return c.then(function(b){return d.resolve(a()).then(function(){return b})},function(b){return d.resolve(a()).then(function(){throw b})},b)},a}();Ja.cast=k,Ja.all=E,Ja.race=F,Ja.resolve=k,Ja.reject=G,Ja.prototype._guidKey=Ha,Ja.prototype.then=C;var Ka=new J,La=new J,Ma=function(a){function b(b,c,d){return U(this,a.call(this,b,c,!1,d))}return V(b,a),b}(Ga);Ma.prototype._makeResult=D;var Na=Object.prototype.hasOwnProperty,Oa=function(a){function b(b,c){var d=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],e=arguments[3];return Y(this,a.call(this,b,c,d,e))}return Z(b,a),b.prototype._init=function(a,b){this._result={},this._enumerate(b),0===this._remaining&&u(this.promise,this._result)},b.prototype._enumerate=function(a){var b=this.promise,c=[];for(var d in a)Na.call(a,d)&&c.push({position:d,entry:a[d]});var e=c.length;this._remaining=e;for(var f=void 0,g=0;b._state===Ba&&g<e;g++)f=c[g],this._eachEntry(f.entry,f.position)},b}(Ga),Pa=function(a){function b(b,c,d){return _(this,a.call(this,b,c,!1,d))}return aa(b,a),b}(Oa);Pa.prototype._makeResult=D;var Qa=0,Ra=void 0,Sa="undefined"!=typeof window?window:void 0,Ta=Sa||{},Ua=Ta.MutationObserver||Ta.WebKitMutationObserver,Va="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Wa="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Xa=new Array(1e3),Ya=void 0;Ya=Va?la():Ua?na():Wa?oa():void 0===Sa&&"function"==typeof require?ra():pa();if("object"==typeof self)self;else{if("object"!=typeof global)throw new Error("no global: `self` or `global` found");global}var Za;wa.async=ka,wa.after=function(a){return setTimeout(a,0)};var $a=fa,_a=function(a,b){return wa.async(a,b)};if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var ab=window.__PROMISE_INSTRUMENTATION__;d("instrument",!0);for(var bb in ab)ab.hasOwnProperty(bb)&&ta(bb,ab[bb])}var cb=(Za={asap:ka,cast:$a,Promise:Ja,EventTarget:va,all:T,allSettled:W,race:X,hash:$,hashSettled:ba,rethrow:ca,defer:da,denodeify:P,configure:d,on:ta,off:ua,resolve:fa,reject:ga,map:ea},sa(Za,"async",_a),sa(Za,"filter",ja),Za);a.default=cb,a.asap=ka,a.cast=$a,a.Promise=Ja,a.EventTarget=va,a.all=T,a.allSettled=W,a.race=X,a.hash=$,a.hashSettled=ba,a.rethrow=ca,a.defer=da,a.denodeify=P,a.configure=d,a.on=ta,a.off=ua,a.resolve=fa,a.reject=ga,a.map=ea,a.async=_a,a.filter=ja,Object.defineProperty(a,"__esModule",{value:!0})});var EPUBJS=EPUBJS||{};EPUBJS.core={};var ELEMENT_NODE=1,TEXT_NODE=3,COMMENT_NODE=8,DOCUMENT_NODE=9;EPUBJS.core.getEl=function(a){return document.getElementById(a)},EPUBJS.core.getEls=function(a){return document.getElementsByClassName(a)},EPUBJS.core.request=function(a,b,c){var d,e=window.URL,f=e?"blob":"arraybuffer",g=new RSVP.defer,h=new XMLHttpRequest,i=XMLHttpRequest.prototype,j=function(){var a;this.readyState==this.DONE&&(200!==this.status&&0!==this.status||!this.response?g.reject({message:this.response,stack:(new Error).stack}):(a="xml"==b?this.responseXML?this.responseXML:(new DOMParser).parseFromString(this.response,"application/xml"):"xhtml"==b?this.responseXML?this.responseXML:(new DOMParser).parseFromString(this.response,"application/xhtml+xml"):"html"==b?this.responseXML?this.responseXML:(new DOMParser).parseFromString(this.response,"text/html"):"json"==b?JSON.parse(this.response):"blob"==b?e?this.response:new Blob([this.response]):this.response,g.resolve(a)))};return"overrideMimeType"in i||Object.defineProperty(i,"overrideMimeType",{value:function(a){}}),h.onreadystatechange=j,h.open("GET",a,!0),c&&(h.withCredentials=!0),b||(d=EPUBJS.core.uri(a),b=d.extension,b={htm:"html"}[b]||b),"blob"==b&&(h.responseType=f),"json"==b&&h.setRequestHeader("Accept","application/json"),"xml"==b&&(h.responseType="document",h.overrideMimeType("text/xml")),"xhtml"==b&&(h.responseType="document"),"html"==b&&(h.responseType="document"),"binary"==b&&(h.responseType="arraybuffer"),h.send(),g.promise},EPUBJS.core.toArray=function(a){var b=[];for(var c in a){var d;a.hasOwnProperty(c)&&(d=a[c],d.ident=c,b.push(d))}return b},EPUBJS.core.uri=function(a){var b,c,d,e={protocol:"",host:"",path:"",origin:"",directory:"",base:"",filename:"",extension:"",fragment:"",href:a},f=a.indexOf("blob:"),g=a.indexOf("://"),h=a.indexOf("?"),i=a.indexOf("#");return 0===f?(e.protocol="blob",e.base=a.indexOf(0,i),e):(-1!=i&&(e.fragment=a.slice(i+1),a=a.slice(0,i)),-1!=h&&(e.search=a.slice(h+1),a=a.slice(0,h),href=e.href),-1!=g?(e.protocol=a.slice(0,g),b=a.slice(g+3),d=b.indexOf("/"),-1===d?(e.host=e.path,e.path=""):(e.host=b.slice(0,d),e.path=b.slice(d)),e.origin=e.protocol+"://"+e.host,e.directory=EPUBJS.core.folder(e.path),e.base=e.origin+e.directory):(e.path=a,e.directory=EPUBJS.core.folder(a),e.base=e.directory),e.filename=a.replace(e.base,""),c=e.filename.lastIndexOf("."),-1!=c&&(e.extension=e.filename.slice(c+1)),e)},EPUBJS.core.folder=function(a){var b=a.lastIndexOf("/");if(-1==b);return a.slice(0,b+1)},EPUBJS.core.dataURLToBlob=function(a){var b,c,d,e,f,g=";base64,";if(-1==a.indexOf(g))return b=a.split(","),c=b[0].split(":")[1],d=b[1],new Blob([d],{type:c});b=a.split(g),c=b[0].split(":")[1],d=window.atob(b[1]),e=d.length,f=new Uint8Array(e);for(var h=0;h<e;++h)f[h]=d.charCodeAt(h);return new Blob([f],{type:c})},EPUBJS.core.addScript=function(a,b,c){var d,e;e=!1,d=document.createElement("script"),d.type="text/javascript",d.async=!1,d.src=a,d.onload=d.onreadystatechange=function(){e||this.readyState&&"complete"!=this.readyState||(e=!0,b&&b())},c=c||document.body,c.appendChild(d)},EPUBJS.core.addScripts=function(a,b,c){var d=a.length,e=0,f=function(){e++,d==e?b&&b():EPUBJS.core.addScript(a[e],f,c)};EPUBJS.core.addScript(a[e],f,c)},EPUBJS.core.addCss=function(a,b,c){var d,e;e=!1,d=document.createElement("link"),d.type="text/css",d.rel="stylesheet",d.href=a,d.onload=d.onreadystatechange=function(){e||this.readyState&&"complete"!=this.readyState||(e=!0,b&&b())},c=c||document.body,c.appendChild(d)},EPUBJS.core.prefixed=function(a){var b=["Webkit","Moz","O","ms"],c=a[0].toUpperCase()+a.slice(1),d=b.length;if(void 0!==document.documentElement.style[a])return a;for(var e=0;e<d;e++)if(void 0!==document.documentElement.style[b[e]+c])return b[e]+c;return a},EPUBJS.core.resolveUrl=function(a,b){var c,d,e=[],f=EPUBJS.core.uri(b),g=a.split("/");return f.host?b:(g.pop(),d=b.split("/"),d.forEach(function(a){".."===a?g.pop():e.push(a)}),c=g.concat(e),c.join("/"))},EPUBJS.core.uuid=function(){var a=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(b){var c=(a+16*Math.random())%16|0;return a=Math.floor(a/16),("x"==b?c:7&c|8).toString(16)})},EPUBJS.core.insert=function(a,b,c){var d=EPUBJS.core.locationOf(a,b,c);return b.splice(d,0,a),d},EPUBJS.core.locationOf=function(a,b,c,d,e){var f,g=d||0,h=e||b.length,i=parseInt(g+(h-g)/2);return c||(c=function(a,b){return a>b?1:a<b?-1:(a=b)?0:void 0}),h-g<=0?i:(f=c(b[i],a),h-g==1?f>0?i:i+1:0===f?i:-1===f?EPUBJS.core.locationOf(a,b,c,i,h):EPUBJS.core.locationOf(a,b,c,g,i))},EPUBJS.core.indexOfSorted=function(a,b,c,d,e){var f,g=d||0,h=e||b.length,i=parseInt(g+(h-g)/2);return c||(c=function(a,b){return a>b?1:a<b?-1:(a=b)?0:void 0}),h-g<=0?-1:(f=c(b[i],a),h-g==1?0===f?i:-1:0===f?i:-1===f?EPUBJS.core.indexOfSorted(a,b,c,i,h):EPUBJS.core.indexOfSorted(a,b,c,g,i))},EPUBJS.core.queue=function(a){var b=[],c=a,d=function(a,c,d){return b.push({funcName:a,args:c,context:d}),b},e=function(){var a;b.length&&(a=b.shift(),c[a.funcName].apply(a.context||c,a.args))};return{enqueue:d,dequeue:e,flush:function(){for(;b.length;)e()},clear:function(){b=[]},length:function(){return b.length}}},EPUBJS.core.getElementXPath=function(a){return a&&a.id?'//*[@id="'+a.id+'"]':EPUBJS.core.getElementTreeXPath(a)},EPUBJS.core.getElementTreeXPath=function(a){var b,c,d,e,f=[],g="http://www.w3.org/1999/xhtml"===a.ownerDocument.documentElement.getAttribute("xmlns");for(a.nodeType===Node.TEXT_NODE&&(b=EPUBJS.core.indexOfTextNode(a)+1,f.push("text()["+b+"]"),a=a.parentNode);a&&1==a.nodeType;a=a.parentNode){b=0;for(var h=a.previousSibling;h;h=h.previousSibling)h.nodeType!=Node.DOCUMENT_TYPE_NODE&&h.nodeName==a.nodeName&&++b;c=a.nodeName.toLowerCase(),d=g?"xhtml:"+c:c,e=b?"["+(b+1)+"]":"",f.splice(0,0,d+e)}return f.length?"./"+f.join("/"):null},EPUBJS.core.nsResolver=function(a){return{xhtml:"http://www.w3.org/1999/xhtml",epub:"http://www.idpf.org/2007/ops"}[a]||null},EPUBJS.core.cleanStringForXpath=function(a){var b=a.match(/[^'"]+|['"]/g);return b=b.map(function(a){return"'"===a?'"\'"':'"'===a?"'\"'":"'"+a+"'"}),"concat('',"+b.join(",")+")"},EPUBJS.core.indexOfTextNode=function(a){for(var b,c=a.parentNode,d=c.childNodes,e=-1,f=0;f<d.length&&(b=d[f],b.nodeType===Node.TEXT_NODE&&e++,b!=a);f++);return e},EPUBJS.core.defaults=function(a){for(var b=1,c=arguments.length;b<c;b++){var d=arguments[b];for(var e in d)void 0===a[e]&&(a[e]=d[e])}return a},EPUBJS.core.extend=function(a){return[].slice.call(arguments,1).forEach(function(b){b&&Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))})}),a},EPUBJS.core.clone=function(a){return EPUBJS.core.isArray(a)?a.slice():EPUBJS.core.extend({},a)},EPUBJS.core.isElement=function(a){return!(!a||1!=a.nodeType)},EPUBJS.core.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},EPUBJS.core.isString=function(a){return"string"==typeof a||a instanceof String},EPUBJS.core.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},EPUBJS.core.values=function(a){var b,c,d,e=-1;if(!a)return[];for(b=Object.keys(a),c=b.length,d=Array(c);++e<c;)d[e]=a[b[e]];return d},EPUBJS.core.indexOfNode=function(a,b){for(var c,d=a.parentNode,e=d.childNodes,f=-1,g=0;g<e.length&&(c=e[g],c.nodeType===b&&f++,c!=a);g++);return f},EPUBJS.core.indexOfTextNode=function(a){return EPUBJS.core.indexOfNode(a,TEXT_NODE)},EPUBJS.core.indexOfElementNode=function(a){return EPUBJS.core.indexOfNode(a,ELEMENT_NODE)};var EPUBJS=EPUBJS||{};EPUBJS.reader={},EPUBJS.reader.plugins={},function(a,b){var c=(a.ePubReader,a.ePubReader=function(a,b){return new EPUBJS.Reader(a,b)});"function"==typeof define&&define.amd?define(function(){return Reader}):"undefined"!=typeof module&&module.exports&&(module.exports=c)}(window,jQuery),EPUBJS.Reader=function(a,b){var c,d,e,f=this,g=$("#viewer"),h=window.location.search;this.settings=EPUBJS.core.defaults(b||{},{bookPath:a,restore:!1,reload:!1,bookmarks:void 0,annotations:void 0,contained:void 0,bookKey:void 0,styles:void 0,sidebarReflow:!1,generatePagination:!1,history:!0}),h&&(e=h.slice(1).split("&"),e.forEach(function(a){var b=a.split("="),c=b[0],d=b[1]||"";f.settings[c]=decodeURIComponent(d)})),this.setBookKey(this.settings.bookPath),this.settings.restore&&this.isSaved()&&this.applySavedSettings(),this.settings.styles=this.settings.styles||{fontSize:"100%"},this.book=c=new ePub(this.settings.bookPath,this.settings),this.offline=!1,this.sidebarOpen=!1,this.settings.bookmarks||(this.settings.bookmarks=[]),this.settings.annotations||(this.settings.annotations=[]),this.settings.generatePagination&&c.generatePagination(g.width(),g.height()),this.rendition=c.renderTo("viewer",{ignoreClass:"annotator-hl",width:"100%",height:"100%"}),this.settings.previousLocationCfi?this.displayed=this.rendition.display(this.settings.previousLocationCfi):this.displayed=this.rendition.display(),c.ready.then(function(){f.ReaderController=EPUBJS.reader.ReaderController.call(f,c),f.SettingsController=EPUBJS.reader.SettingsController.call(f,c),f.ControlsController=EPUBJS.reader.ControlsController.call(f,c),f.SidebarController=EPUBJS.reader.SidebarController.call(f,c),f.BookmarksController=EPUBJS.reader.BookmarksController.call(f,c),f.NotesController=EPUBJS.reader.NotesController.call(f,c),window.addEventListener("hashchange",this.hashChanged.bind(this),!1),document.addEventListener("keydown",this.adjustFontSize.bind(this),!1),this.rendition.on("keydown",this.adjustFontSize.bind(this)),this.rendition.on("keydown",f.ReaderController.arrowKeys.bind(this)),this.rendition.on("selected",this.selectedRange.bind(this))}.bind(this)).then(function(){f.ReaderController.hideLoader()}.bind(this));for(d in EPUBJS.reader.plugins)EPUBJS.reader.plugins.hasOwnProperty(d)&&(f[d]=EPUBJS.reader.plugins[d].call(f,c));return c.loaded.metadata.then(function(a){f.MetaController=EPUBJS.reader.MetaController.call(f,a)}),c.loaded.navigation.then(function(a){f.TocController=EPUBJS.reader.TocController.call(f,a)}),window.addEventListener("beforeunload",this.unload.bind(this),!1),this},EPUBJS.Reader.prototype.adjustFontSize=function(a){var b,c=2,d=a.ctrlKey||a.metaKey;this.settings.styles&&(this.settings.styles.fontSize||(this.settings.styles.fontSize="100%"),b=parseInt(this.settings.styles.fontSize.slice(0,-1)),d&&187==a.keyCode&&(a.preventDefault(),this.book.setStyle("fontSize",b+c+"%")),d&&189==a.keyCode&&(a.preventDefault(),this.book.setStyle("fontSize",b-c+"%")),d&&48==a.keyCode&&(a.preventDefault(),this.book.setStyle("fontSize","100%")))},EPUBJS.Reader.prototype.addBookmark=function(a){this.isBookmarked(a)>-1||(this.settings.bookmarks.push(a),this.trigger("reader:bookmarked",a))},EPUBJS.Reader.prototype.removeBookmark=function(a){var b=this.isBookmarked(a);-1!==b&&(this.settings.bookmarks.splice(b,1),this.trigger("reader:unbookmarked",b))},EPUBJS.Reader.prototype.isBookmarked=function(a){return this.settings.bookmarks.indexOf(a)},EPUBJS.Reader.prototype.clearBookmarks=function(){this.settings.bookmarks=[]},EPUBJS.Reader.prototype.addNote=function(a){this.settings.annotations.push(a)},EPUBJS.Reader.prototype.removeNote=function(a){var b=this.settings.annotations.indexOf(a);-1!==b&&delete this.settings.annotations[b]},EPUBJS.Reader.prototype.clearNotes=function(){this.settings.annotations=[]},EPUBJS.Reader.prototype.setBookKey=function(a){return this.settings.bookKey||(this.settings.bookKey="epubjsreader:"+EPUBJS.VERSION+":"+window.location.host+":"+a),this.settings.bookKey},EPUBJS.Reader.prototype.isSaved=function(a){return!!localStorage&&null!==localStorage.getItem(this.settings.bookKey)},EPUBJS.Reader.prototype.removeSavedSettings=function(){if(!localStorage)return!1;localStorage.removeItem(this.settings.bookKey)},EPUBJS.Reader.prototype.applySavedSettings=function(){var a;if(!localStorage)return!1;try{a=JSON.parse(localStorage.getItem(this.settings.bookKey))}catch(a){return!1}return!!a&&(a.styles&&(this.settings.styles=EPUBJS.core.defaults(this.settings.styles||{},a.styles)),this.settings=EPUBJS.core.defaults(this.settings,a),!0)},EPUBJS.Reader.prototype.saveSettings=function(){if(this.book&&(this.settings.previousLocationCfi=this.rendition.currentLocation().start.cfi),!localStorage)return!1;localStorage.setItem(this.settings.bookKey,JSON.stringify(this.settings))},EPUBJS.Reader.prototype.unload=function(){this.settings.restore&&localStorage&&this.saveSettings()},EPUBJS.Reader.prototype.hashChanged=function(){var a=window.location.hash.slice(1);this.rendition.display(a)},EPUBJS.Reader.prototype.selectedRange=function(a){var b="#"+a;this.settings.history&&window.location.hash!=b&&(history.pushState({},"",b),this.currentLocationCfi=a)},RSVP.EventTarget.mixin(EPUBJS.Reader.prototype),EPUBJS.reader.BookmarksController=function(){var a=this.book,b=this.rendition,c=$("#bookmarksView"),d=c.find("#bookmarks"),e=document.createDocumentFragment(),f=function(){c.show()},g=function(){c.hide()},h=0,i=function(c){var d=document.createElement("li"),e=document.createElement("a");d.id="bookmark-"+h,d.classList.add("list_item");var f,g=a.spine.get(c);return g.index in a.navigation.toc?(f=a.navigation.toc[g.index],e.textContent=f.label):e.textContent=c,e.href=c,e.classList.add("bookmark_link"),e.addEventListener("click",function(a){var c=this.getAttribute("href");b.display(c),a.preventDefault()},!1),d.appendChild(e),h++,d};return this.settings.bookmarks.forEach(function(a){var b=i(a);e.appendChild(b)}),d.append(e),this.on("reader:bookmarked",function(a){var b=i(a);d.append(b)}),this.on("reader:unbookmarked",function(a){$("#bookmark-"+a).remove()}),{show:f,hide:g}},EPUBJS.reader.ControlsController=function(a){var b=this,c=this.rendition,d=($("#store"),$("#fullscreen")),e=($("#fullscreenicon"),$("#cancelfullscreenicon"),$("#slider")),f=($("#main"),$("#sidebar"),$("#setting")),g=$("#bookmark");return e.on("click",function(){b.sidebarOpen?(b.SidebarController.hide(),e.addClass("icon-menu"),e.removeClass("icon-right")):(b.SidebarController.show(),e.addClass("icon-right"),e.removeClass("icon-menu"))}),"undefined"!=typeof screenfull&&(d.on("click",function(){screenfull.toggle($("#container")[0])}),screenfull.raw&&document.addEventListener(screenfull.raw.fullscreenchange,function(){fullscreen=screenfull.isFullscreen,fullscreen?d.addClass("icon-resize-small").removeClass("icon-resize-full"):d.addClass("icon-resize-full").removeClass("icon-resize-small")})),f.on("click",function(){b.SettingsController.show()}),g.on("click",function(){var a=b.rendition.currentLocation().start.cfi;-1===b.isBookmarked(a)?(b.addBookmark(a),g.addClass("icon-bookmark").removeClass("icon-bookmark-empty")):(b.removeBookmark(a),g.removeClass("icon-bookmark").addClass("icon-bookmark-empty"))}),c.on("relocated",function(a){var c=a.start.cfi,d="#"+c;-1===b.isBookmarked(c)?g.removeClass("icon-bookmark").addClass("icon-bookmark-empty"):g.addClass("icon-bookmark").removeClass("icon-bookmark-empty"),b.currentLocationCfi=c,b.settings.history&&window.location.hash!=d&&history.pushState({},"",d)}),{}},EPUBJS.reader.MetaController=function(a){var b=a.title,c=a.creator,d=$("#book-title"),e=$("#chapter-title"),f=$("#title-seperator");document.title=b+" – "+c,d.html(b),e.html(c),f.show()},EPUBJS.reader.NotesController=function(){var a=this.book,b=this.rendition,c=this,d=$("#notesView"),e=$("#notes"),f=$("#note-text"),g=$("#note-anchor"),h=c.settings.annotations,i=a.renderer,j=[],k=new ePub.CFI,l=function(){d.show()},m=function(){d.hide()},n=function(d){var e,h,i,j,l,m=a.renderer.doc;if(m.caretPositionFromPoint?(e=m.caretPositionFromPoint(d.clientX,d.clientY),h=e.offsetNode,i=e.offset):m.caretRangeFromPoint&&(e=m.caretRangeFromPoint(d.clientX,d.clientY),h=e.startContainer,i=e.startOffset),3!==h.nodeType)for(var q=0;q<h.childNodes.length;q++)if(3==h.childNodes[q].nodeType){h=h.childNodes[q];break}i=h.textContent.indexOf(".",i),-1===i?i=h.length:i+=1,j=k.generateCfiFromTextNode(h,i,a.renderer.currentChapter.cfiBase),l={annotatedAt:new Date,anchor:j,body:f.val()},c.addNote(l),o(l),p(l),f.val(""),g.text("Attach"),f.prop("disabled",!1),b.off("click",n)},o=function(a){var c=document.createElement("li"),d=document.createElement("a");c.innerHTML=a.body,d.innerHTML=" context &#187;",d.href="#"+a.anchor,d.onclick=function(){return b.display(a.anchor),!1},c.appendChild(d),e.append(c)},p=function(b){var c=a.renderer.doc,d=document.createElement("span"),e=document.createElement("a");d.classList.add("footnotesuperscript","reader_generated"),d.style.verticalAlign="super",d.style.fontSize=".75em",d.style.lineHeight="1em",e.style.padding="2px",e.style.backgroundColor="#fffa96",e.style.borderRadius="5px",e.style.cursor="pointer",d.id="note-"+EPUBJS.core.uuid(),e.innerHTML=h.indexOf(b)+1+"[Reader]",d.appendChild(e),k.addMarker(b.anchor,c,d),q(d,b.body)},q=function(a,d){var e=a.id,f=function(){var c,f,l,m,n=i.height,o=i.width,p=225;j[e]||(j[e]=document.createElement("div"),j[e].setAttribute("class","popup"),pop_content=document.createElement("div"),j[e].appendChild(pop_content),pop_content.innerHTML=d,pop_content.setAttribute("class","pop_content"),i.render.document.body.appendChild(j[e]),j[e].addEventListener("mouseover",g,!1),j[e].addEventListener("mouseout",h,!1),b.on("locationChanged",k,this),b.on("locationChanged",h,this)),c=j[e],f=a.getBoundingClientRect(),l=f.left,m=f.top,c.classList.add("show"),popRect=c.getBoundingClientRect(),c.style.left=l-popRect.width/2+"px",c.style.top=m+"px",p>n/2.5&&(p=n/2.5,pop_content.style.maxHeight=p+"px"),popRect.height+m>=n-25?(c.style.top=m-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),l-popRect.width<=0?(c.style.left=l+"px",c.classList.add("left")):c.classList.remove("left"),l+popRect.width/2>=o?(c.style.left=l-300+"px",popRect=c.getBoundingClientRect(),c.style.left=l-popRect.width+"px",popRect.height+m>=n-25?(c.style.top=m-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),c.classList.add("right")):c.classList.remove("right")},g=function(){j[e].classList.add("on")},h=function(){j[e].classList.remove("on")},k=function(){setTimeout(function(){j[e].classList.remove("show")},100)},m=function(){c.ReaderController.slideOut(),l()};a.addEventListener("mouseover",f,!1),a.addEventListener("mouseout",k,!1),a.addEventListener("click",m,!1)};return g.on("click",function(a){g.text("Cancel"),f.prop("disabled","true"),b.on("click",n)}),h.forEach(function(a){o(a)}),{show:l,hide:m}},EPUBJS.reader.ReaderController=function(a){var b=$("#main"),c=$("#divider"),d=$("#loader"),e=$("#next"),f=$("#prev"),g=this,a=this.book,h=this.rendition,i=function(){h.currentLocation().start.cfi;g.settings.sidebarReflow?(b.removeClass("single"),b.one("transitionend",function(){h.resize()})):b.removeClass("closed")},j=function(){var a=h.currentLocation();if(a){a.start.cfi;g.settings.sidebarReflow?(b.addClass("single"),b.one("transitionend",function(){h.resize()})):b.addClass("closed")}},k=function(){d.show(),n()},l=function(){d.hide()},m=function(){c.addClass("show")},n=function(){c.removeClass("show")},o=!1,p=function(b){37==b.keyCode&&("rtl"===a.package.metadata.direction?h.next():h.prev(),f.addClass("active"),o=!0,setTimeout(function(){o=!1,f.removeClass("active")},100),b.preventDefault()),39==b.keyCode&&("rtl"===a.package.metadata.direction?h.prev():h.next(),e.addClass("active"),o=!0,setTimeout(function(){o=!1,e.removeClass("active")},100),b.preventDefault())};return document.addEventListener("keydown",p,!1),e.on("click",function(b){"rtl"===a.package.metadata.direction?h.prev():h.next(),b.preventDefault()}),f.on("click",function(b){"rtl"===a.package.metadata.direction?h.next():h.prev(),b.preventDefault()}),h.on("layout",function(a){!0===a.spread?m():n()}),h.on("relocated",function(a){a.atStart&&f.addClass("disabled"),a.atEnd&&e.addClass("disabled")}),{slideOut:j,slideIn:i,showLoader:k,hideLoader:l,showDivider:m,hideDivider:n,arrowKeys:p}},EPUBJS.reader.SettingsController=function(){var a=(this.book,this),b=$("#settings-modal"),c=$(".overlay"),d=function(){b.addClass("md-show")},e=function(){b.removeClass("md-show")};return $("#sidebarReflow").on("click",function(){a.settings.sidebarReflow=!a.settings.sidebarReflow}),b.find(".closer").on("click",function(){e()}),c.on("click",function(){e()}),{show:d,hide:e}},EPUBJS.reader.SidebarController=function(a){var b=this,c=$("#sidebar"),d=$("#panels"),e="Toc",f=function(a){var c=a+"Controller";e!=a&&void 0!==b[c]&&(b[e+"Controller"].hide(),b[c].show(),e=a,d.find(".active").removeClass("active"),d.find("#show-"+a).addClass("active"))},g=function(){return e},h=function(){b.sidebarOpen=!0,b.ReaderController.slideOut(),c.addClass("open")},i=function(){b.sidebarOpen=!1,b.ReaderController.slideIn(),c.removeClass("open")};return d.find(".show_view").on("click",function(a){var b=$(this).data("view");f(b),a.preventDefault()}),{show:h,hide:i,getActivePanel:g,changePanelTo:f}},EPUBJS.reader.TocController=function(a){var b=(this.book,this.rendition),c=$("#tocView"),d=document.createDocumentFragment(),e=!1,f=function(a,b){var c=document.createElement("ul");return b||(b=1),a.forEach(function(a){var d=document.createElement("li"),e=document.createElement("a");toggle=document.createElement("a");var g;d.id="toc-"+a.id,d.classList.add("list_item"),e.textContent=a.label,e.href=a.href,e.classList.add("toc_link"),d.appendChild(e),a.subitems&&a.subitems.length>0&&(b++,g=f(a.subitems,b),toggle.classList.add("toc_toggle"),d.insertBefore(toggle,e),d.appendChild(g)),c.appendChild(d)}),c},g=function(){c.show()},h=function(){c.hide()},i=function(a){var b=a.id,d=c.find("#toc-"+b),f=c.find(".currentChapter");c.find(".openChapter");d.length&&(d!=f&&d.has(e).length>0&&f.removeClass("currentChapter"),d.addClass("currentChapter"),d.parents("li").addClass("openChapter"))};b.on("renderered",i);var j=f(a);return d.appendChild(j),c.append(d),c.find(".toc_link").on("click",function(a){var d=this.getAttribute("href");a.preventDefault(),b.display(d),c.find(".currentChapter").addClass("openChapter").removeClass("currentChapter"),$(this).parent("li").addClass("currentChapter")}),c.find(".toc_toggle").on("click",function(a){var b=$(this).parent("li"),c=b.hasClass("openChapter");a.preventDefault(),c?b.removeClass("openChapter"):b.addClass("openChapter")}),{show:g,hide:h}};
yushen-duihua-1to5
/yushen_duihua_1to5-2022.10.3.0-py3-none-any.whl/YushenDuihua1to5/js/reader.min.js
reader.min.js
EPUBJS.Hooks.register("beforeChapterDisplay").endnotes=function(a,b){var c=b.contents.querySelectorAll("a[href]"),d=Array.prototype.slice.call(c),e=EPUBJS.core.folder(location.pathname),f=(EPUBJS.cssPath,{});EPUBJS.core.addCss(EPUBJS.cssPath+"popup.css",!1,b.render.document.head),d.forEach(function(a){function c(){var c,h,n=b.height,o=b.width,p=225;m||(c=j.cloneNode(!0),m=c.querySelector("p")),f[i]||(f[i]=document.createElement("div"),f[i].setAttribute("class","popup"),pop_content=document.createElement("div"),f[i].appendChild(pop_content),pop_content.appendChild(m),pop_content.setAttribute("class","pop_content"),b.render.document.body.appendChild(f[i]),f[i].addEventListener("mouseover",d,!1),f[i].addEventListener("mouseout",e,!1),b.on("renderer:pageChanged",g,this),b.on("renderer:pageChanged",e,this)),c=f[i],h=a.getBoundingClientRect(),k=h.left,l=h.top,c.classList.add("show"),popRect=c.getBoundingClientRect(),c.style.left=k-popRect.width/2+"px",c.style.top=l+"px",p>n/2.5&&(p=n/2.5,pop_content.style.maxHeight=p+"px"),popRect.height+l>=n-25?(c.style.top=l-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),k-popRect.width<=0?(c.style.left=k+"px",c.classList.add("left")):c.classList.remove("left"),k+popRect.width/2>=o?(c.style.left=k-300+"px",popRect=c.getBoundingClientRect(),c.style.left=k-popRect.width+"px",popRect.height+l>=n-25?(c.style.top=l-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),c.classList.add("right")):c.classList.remove("right")}function d(){f[i].classList.add("on")}function e(){f[i].classList.remove("on")}function g(){setTimeout(function(){f[i].classList.remove("show")},100)}var h,i,j,k,l,m;"noteref"==a.getAttribute("epub:type")&&(h=a.getAttribute("href"),i=h.replace("#",""),j=b.render.document.getElementById(i),a.addEventListener("mouseover",c,!1),a.addEventListener("mouseout",g,!1))}),a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").mathml=function(a,b){if(b.currentChapter.manifestProperties.indexOf("mathml")!==-1){b.render.iframe.contentWindow.mathmlCallback=a;var c=document.createElement("script");c.type="text/x-mathjax-config",c.innerHTML=' MathJax.Hub.Register.StartupHook("End",function () { window.mathmlCallback(); }); MathJax.Hub.Config({jax: ["input/TeX","input/MathML","output/SVG"],extensions: ["tex2jax.js","mml2jax.js","MathEvents.js"],TeX: {extensions: ["noErrors.js","noUndefined.js","autoload-all.js"]},MathMenu: {showRenderer: false},menuSettings: {zoom: "Click"},messageStyle: "none"}); ',b.doc.body.appendChild(c),EPUBJS.core.addScript("http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",null,b.doc.head)}else a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").smartimages=function(a,b){var c=b.contents.querySelectorAll("img"),d=Array.prototype.slice.call(c),e=b.height;if("reflowable"!=b.layoutSettings.layout)return void a();d.forEach(function(a){var c=function(){var c,d=a.getBoundingClientRect(),f=d.height,g=d.top,h=a.getAttribute("data-height"),i=h||f,j=Number(getComputedStyle(a,"").fontSize.match(/(\d*(\.\d*)?)px/)[1]),k=j?j/2:0;e=b.contents.clientHeight,g<0&&(g=0),a.style.maxWidth="100%",i+g>=e?(g<e/2?(c=e-g-k,a.style.maxHeight=c+"px",a.style.width="auto"):(i>e&&(a.style.maxHeight=e+"px",a.style.width="auto",d=a.getBoundingClientRect(),i=d.height),a.style.display="block",a.style.WebkitColumnBreakBefore="always",a.style.breakBefore="column"),a.setAttribute("data-height",c)):(a.style.removeProperty("max-height"),a.style.removeProperty("margin-top"))},d=function(){b.off("renderer:resized",c),b.off("renderer:chapterUnload",this)};a.addEventListener("load",c,!1),b.on("renderer:resized",c),b.on("renderer:chapterUnload",d),c()}),a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").transculsions=function(a,b){var c=b.contents.querySelectorAll("[transclusion]");Array.prototype.slice.call(c).forEach(function(a){function c(){j=g,k=h,j>chapter.colWidth&&(d=chapter.colWidth/j,j=chapter.colWidth,k*=d),f.width=j,f.height=k}var d,e=a.getAttribute("ref"),f=document.createElement("iframe"),g=a.getAttribute("width"),h=a.getAttribute("height"),i=a.parentNode,j=g,k=h;c(),b.listenUntil("renderer:resized","renderer:chapterUnloaded",c),f.src=e,i.replaceChild(f,a)}),a&&a()};
yushen-duihua-1to5
/yushen_duihua_1to5-2022.10.3.0-py3-none-any.whl/YushenDuihua1to5/js/hooks.min.js
hooks.min.js
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (factory((global.RSVP = global.RSVP || {}))); }(this, (function (exports) { 'use strict'; function indexOf(callbacks, callback) { for (var i = 0, l = callbacks.length; i < l; i++) { if (callbacks[i] === callback) { return i; } } return -1; } function callbacksFor(object) { var callbacks = object._promiseCallbacks; if (!callbacks) { callbacks = object._promiseCallbacks = {}; } return callbacks; } /** @class RSVP.EventTarget */ var EventTarget = { /** `RSVP.EventTarget.mixin` extends an object with EventTarget methods. For Example: ```javascript let object = {}; RSVP.EventTarget.mixin(object); object.on('finished', function(event) { // handle event }); object.trigger('finished', { detail: value }); ``` `EventTarget.mixin` also works with prototypes: ```javascript let Person = function() {}; RSVP.EventTarget.mixin(Person.prototype); let yehuda = new Person(); let tom = new Person(); yehuda.on('poke', function(event) { console.log('Yehuda says OW'); }); tom.on('poke', function(event) { console.log('Tom says OW'); }); yehuda.trigger('poke'); tom.trigger('poke'); ``` @method mixin @for RSVP.EventTarget @private @param {Object} object object to extend with EventTarget methods */ mixin: function (object) { object['on'] = this['on']; object['off'] = this['off']; object['trigger'] = this['trigger']; object._promiseCallbacks = undefined; return object; }, /** Registers a callback to be executed when `eventName` is triggered ```javascript object.on('event', function(eventInfo){ // handle the event }); object.trigger('event'); ``` @method on @for RSVP.EventTarget @private @param {String} eventName name of the event to listen for @param {Function} callback function to be called when the event is triggered. */ on: function (eventName, callback) { if (typeof callback !== 'function') { throw new TypeError('Callback must be a function'); } var allCallbacks = callbacksFor(this), callbacks = void 0; callbacks = allCallbacks[eventName]; if (!callbacks) { callbacks = allCallbacks[eventName] = []; } if (indexOf(callbacks, callback) === -1) { callbacks.push(callback); } }, /** You can use `off` to stop firing a particular callback for an event: ```javascript function doStuff() { // do stuff! } object.on('stuff', doStuff); object.trigger('stuff'); // doStuff will be called // Unregister ONLY the doStuff callback object.off('stuff', doStuff); object.trigger('stuff'); // doStuff will NOT be called ``` If you don't pass a `callback` argument to `off`, ALL callbacks for the event will not be executed when the event fires. For example: ```javascript let callback1 = function(){}; let callback2 = function(){}; object.on('stuff', callback1); object.on('stuff', callback2); object.trigger('stuff'); // callback1 and callback2 will be executed. object.off('stuff'); object.trigger('stuff'); // callback1 and callback2 will not be executed! ``` @method off @for RSVP.EventTarget @private @param {String} eventName event to stop listening to @param {Function} callback optional argument. If given, only the function given will be removed from the event's callback queue. If no `callback` argument is given, all callbacks will be removed from the event's callback queue. */ off: function (eventName, callback) { var allCallbacks = callbacksFor(this), callbacks = void 0, index = void 0; if (!callback) { allCallbacks[eventName] = []; return; } callbacks = allCallbacks[eventName]; index = indexOf(callbacks, callback); if (index !== -1) { callbacks.splice(index, 1); } }, /** Use `trigger` to fire custom events. For example: ```javascript object.on('foo', function(){ console.log('foo event happened!'); }); object.trigger('foo'); // 'foo event happened!' logged to the console ``` You can also pass a value as a second argument to `trigger` that will be passed as an argument to all event listeners for the event: ```javascript object.on('foo', function(value){ console.log(value.name); }); object.trigger('foo', { name: 'bar' }); // 'bar' logged to the console ``` @method trigger @for RSVP.EventTarget @private @param {String} eventName name of the event to be triggered @param {*} options optional value to be passed to any event handlers for the given `eventName` */ trigger: function (eventName, options, label) { var allCallbacks = callbacksFor(this), callbacks = void 0, callback = void 0; if (callbacks = allCallbacks[eventName]) { // Don't cache the callbacks.length since it may grow for (var i = 0; i < callbacks.length; i++) { callback = callbacks[i]; callback(options, label); } } } }; var config = { instrument: false }; EventTarget['mixin'](config); function configure(name, value) { if (arguments.length === 2) { config[name] = value; } else { return config[name]; } } function objectOrFunction(x) { var type = typeof x; return x !== null && (type === 'object' || type === 'function'); } function isFunction(x) { return typeof x === 'function'; } function isObject(x) { return x !== null && typeof x === 'object'; } function isMaybeThenable(x) { return x !== null && typeof x === 'object'; } var _isArray = void 0; if (Array.isArray) { _isArray = Array.isArray; } else { _isArray = function (x) { return Object.prototype.toString.call(x) === '[object Array]'; }; } var isArray = _isArray; // Date.now is not available in browsers < IE9 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility var now = Date.now || function () { return new Date().getTime(); }; var queue = []; function scheduleFlush() { setTimeout(function () { for (var i = 0; i < queue.length; i++) { var entry = queue[i]; var payload = entry.payload; payload.guid = payload.key + payload.id; payload.childGuid = payload.key + payload.childId; if (payload.error) { payload.stack = payload.error.stack; } config['trigger'](entry.name, entry.payload); } queue.length = 0; }, 50); } function instrument(eventName, promise, child) { if (1 === queue.push({ name: eventName, payload: { key: promise._guidKey, id: promise._id, eventName: eventName, detail: promise._result, childId: child && child._id, label: promise._label, timeStamp: now(), error: config["instrument-with-stack"] ? new Error(promise._label) : null } })) { scheduleFlush(); } } /** `RSVP.Promise.resolve` returns a promise that will become resolved with the passed `value`. It is shorthand for the following: ```javascript let promise = new RSVP.Promise(function(resolve, reject){ resolve(1); }); promise.then(function(value){ // value === 1 }); ``` Instead of writing the above, your code now simply becomes the following: ```javascript let promise = RSVP.Promise.resolve(1); promise.then(function(value){ // value === 1 }); ``` @method resolve @static @param {*} object value that the returned promise will be resolved with @param {String} label optional string for identifying the returned promise. Useful for tooling. @return {Promise} a promise that will become fulfilled with the given `value` */ function resolve$1(object, label) { /*jshint validthis:true */ var Constructor = this; if (object && typeof object === 'object' && object.constructor === Constructor) { return object; } var promise = new Constructor(noop, label); resolve(promise, object); return promise; } function withOwnPromise() { return new TypeError('A promises callback cannot return that same promise.'); } function noop() {} var PENDING = void 0; var FULFILLED = 1; var REJECTED = 2; var GET_THEN_ERROR = new ErrorObject(); function getThen(promise) { try { return promise.then; } catch (error) { GET_THEN_ERROR.error = error; return GET_THEN_ERROR; } } function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { try { then$$1.call(value, fulfillmentHandler, rejectionHandler); } catch (e) { return e; } } function handleForeignThenable(promise, thenable, then$$1) { config.async(function (promise) { var sealed = false; var error = tryThen(then$$1, thenable, function (value) { if (sealed) { return; } sealed = true; if (thenable !== value) { resolve(promise, value, undefined); } else { fulfill(promise, value); } }, function (reason) { if (sealed) { return; } sealed = true; reject(promise, reason); }, 'Settle: ' + (promise._label || ' unknown promise')); if (!sealed && error) { sealed = true; reject(promise, error); } }, promise); } function handleOwnThenable(promise, thenable) { if (thenable._state === FULFILLED) { fulfill(promise, thenable._result); } else if (thenable._state === REJECTED) { thenable._onError = null; reject(promise, thenable._result); } else { subscribe(thenable, undefined, function (value) { if (thenable !== value) { resolve(promise, value, undefined); } else { fulfill(promise, value); } }, function (reason) { return reject(promise, reason); }); } } function handleMaybeThenable(promise, maybeThenable, then$$1) { var isOwnThenable = maybeThenable.constructor === promise.constructor && then$$1 === then && promise.constructor.resolve === resolve$1; if (isOwnThenable) { handleOwnThenable(promise, maybeThenable); } else if (then$$1 === GET_THEN_ERROR) { reject(promise, GET_THEN_ERROR.error); GET_THEN_ERROR.error = null; } else if (isFunction(then$$1)) { handleForeignThenable(promise, maybeThenable, then$$1); } else { fulfill(promise, maybeThenable); } } function resolve(promise, value) { if (promise === value) { fulfill(promise, value); } else if (objectOrFunction(value)) { handleMaybeThenable(promise, value, getThen(value)); } else { fulfill(promise, value); } } function publishRejection(promise) { if (promise._onError) { promise._onError(promise._result); } publish(promise); } function fulfill(promise, value) { if (promise._state !== PENDING) { return; } promise._result = value; promise._state = FULFILLED; if (promise._subscribers.length === 0) { if (config.instrument) { instrument('fulfilled', promise); } } else { config.async(publish, promise); } } function reject(promise, reason) { if (promise._state !== PENDING) { return; } promise._state = REJECTED; promise._result = reason; config.async(publishRejection, promise); } function subscribe(parent, child, onFulfillment, onRejection) { var subscribers = parent._subscribers; var length = subscribers.length; parent._onError = null; subscribers[length] = child; subscribers[length + FULFILLED] = onFulfillment; subscribers[length + REJECTED] = onRejection; if (length === 0 && parent._state) { config.async(publish, parent); } } function publish(promise) { var subscribers = promise._subscribers; var settled = promise._state; if (config.instrument) { instrument(settled === FULFILLED ? 'fulfilled' : 'rejected', promise); } if (subscribers.length === 0) { return; } var child = void 0, callback = void 0, result = promise._result; for (var i = 0; i < subscribers.length; i += 3) { child = subscribers[i]; callback = subscribers[i + settled]; if (child) { invokeCallback(settled, child, callback, result); } else { callback(result); } } promise._subscribers.length = 0; } function ErrorObject() { this.error = null; } var TRY_CATCH_ERROR = new ErrorObject(); function tryCatch(callback, result) { try { return callback(result); } catch (e) { TRY_CATCH_ERROR.error = e; return TRY_CATCH_ERROR; } } function invokeCallback(state, promise, callback, result) { var hasCallback = isFunction(callback); var value = void 0, error = void 0; if (hasCallback) { value = tryCatch(callback, result); if (value === TRY_CATCH_ERROR) { error = value.error; value.error = null; // release } else if (value === promise) { reject(promise, withOwnPromise()); return; } } else { value = result; } if (promise._state !== PENDING) { // noop } else if (hasCallback && error === undefined) { resolve(promise, value); } else if (error !== undefined) { reject(promise, error); } else if (state === FULFILLED) { fulfill(promise, value); } else if (state === REJECTED) { reject(promise, value); } } function initializePromise(promise, resolver) { var resolved = false; try { resolver(function (value) { if (resolved) { return; } resolved = true; resolve(promise, value); }, function (reason) { if (resolved) { return; } resolved = true; reject(promise, reason); }); } catch (e) { reject(promise, e); } } function then(onFulfillment, onRejection, label) { var parent = this; var state = parent._state; if (state === FULFILLED && !onFulfillment || state === REJECTED && !onRejection) { config.instrument && instrument('chained', parent, parent); return parent; } parent._onError = null; var child = new parent.constructor(noop, label); var result = parent._result; config.instrument && instrument('chained', parent, child); if (state === PENDING) { subscribe(parent, child, onFulfillment, onRejection); } else { var callback = state === FULFILLED ? onFulfillment : onRejection; config.async(function () { return invokeCallback(state, child, callback, result); }); } return child; } var Enumerator = function () { function Enumerator(Constructor, input, abortOnReject, label) { this._instanceConstructor = Constructor; this.promise = new Constructor(noop, label); this._abortOnReject = abortOnReject; this._init.apply(this, arguments); } Enumerator.prototype._init = function _init(Constructor, input) { var len = input.length || 0; this.length = len; this._remaining = len; this._result = new Array(len); this._enumerate(input); if (this._remaining === 0) { fulfill(this.promise, this._result); } }; Enumerator.prototype._enumerate = function _enumerate(input) { var length = this.length; var promise = this.promise; for (var i = 0; promise._state === PENDING && i < length; i++) { this._eachEntry(input[i], i); } }; Enumerator.prototype._settleMaybeThenable = function _settleMaybeThenable(entry, i) { var c = this._instanceConstructor; var resolve$$1 = c.resolve; if (resolve$$1 === resolve$1) { var then$$1 = getThen(entry); if (then$$1 === then && entry._state !== PENDING) { entry._onError = null; this._settledAt(entry._state, i, entry._result); } else if (typeof then$$1 !== 'function') { this._remaining--; this._result[i] = this._makeResult(FULFILLED, i, entry); } else if (c === Promise) { var promise = new c(noop); handleMaybeThenable(promise, entry, then$$1); this._willSettleAt(promise, i); } else { this._willSettleAt(new c(function (resolve$$1) { return resolve$$1(entry); }), i); } } else { this._willSettleAt(resolve$$1(entry), i); } }; Enumerator.prototype._eachEntry = function _eachEntry(entry, i) { if (isMaybeThenable(entry)) { this._settleMaybeThenable(entry, i); } else { this._remaining--; this._result[i] = this._makeResult(FULFILLED, i, entry); } }; Enumerator.prototype._settledAt = function _settledAt(state, i, value) { var promise = this.promise; if (promise._state === PENDING) { if (this._abortOnReject && state === REJECTED) { reject(promise, value); } else { this._remaining--; this._result[i] = this._makeResult(state, i, value); if (this._remaining === 0) { fulfill(promise, this._result); } } } }; Enumerator.prototype._makeResult = function _makeResult(state, i, value) { return value; }; Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) { var enumerator = this; subscribe(promise, undefined, function (value) { return enumerator._settledAt(FULFILLED, i, value); }, function (reason) { return enumerator._settledAt(REJECTED, i, reason); }); }; return Enumerator; }(); function makeSettledResult(state, position, value) { if (state === FULFILLED) { return { state: 'fulfilled', value: value }; } else { return { state: 'rejected', reason: value }; } } /** `RSVP.Promise.all` accepts an array of promises, and returns a new promise which is fulfilled with an array of fulfillment values for the passed promises, or rejected with the reason of the first passed promise to be rejected. It casts all elements of the passed iterable to promises as it runs this algorithm. Example: ```javascript let promise1 = RSVP.resolve(1); let promise2 = RSVP.resolve(2); let promise3 = RSVP.resolve(3); let promises = [ promise1, promise2, promise3 ]; RSVP.Promise.all(promises).then(function(array){ // The array here would be [ 1, 2, 3 ]; }); ``` If any of the `promises` given to `RSVP.all` are rejected, the first promise that is rejected will be given as an argument to the returned promises's rejection handler. For example: Example: ```javascript let promise1 = RSVP.resolve(1); let promise2 = RSVP.reject(new Error("2")); let promise3 = RSVP.reject(new Error("3")); let promises = [ promise1, promise2, promise3 ]; RSVP.Promise.all(promises).then(function(array){ // Code here never runs because there are rejected promises! }, function(error) { // error.message === "2" }); ``` @method all @static @param {Array} entries array of promises @param {String} label optional string for labeling the promise. Useful for tooling. @return {Promise} promise that is fulfilled when all `promises` have been fulfilled, or rejected if any of them become rejected. @static */ function all(entries, label) { if (!isArray(entries)) { return this.reject(new TypeError("Promise.all must be called with an array"), label); } return new Enumerator(this, entries, true /* abort on reject */, label).promise; } /** `RSVP.Promise.race` returns a new promise which is settled in the same way as the first passed promise to settle. Example: ```javascript let promise1 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ resolve('promise 1'); }, 200); }); let promise2 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ resolve('promise 2'); }, 100); }); RSVP.Promise.race([promise1, promise2]).then(function(result){ // result === 'promise 2' because it was resolved before promise1 // was resolved. }); ``` `RSVP.Promise.race` is deterministic in that only the state of the first settled promise matters. For example, even if other promises given to the `promises` array argument are resolved, but the first settled promise has become rejected before the other promises became fulfilled, the returned promise will become rejected: ```javascript let promise1 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ resolve('promise 1'); }, 200); }); let promise2 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ reject(new Error('promise 2')); }, 100); }); RSVP.Promise.race([promise1, promise2]).then(function(result){ // Code here never runs }, function(reason){ // reason.message === 'promise 2' because promise 2 became rejected before // promise 1 became fulfilled }); ``` An example real-world use case is implementing timeouts: ```javascript RSVP.Promise.race([ajax('foo.json'), timeout(5000)]) ``` @method race @static @param {Array} entries array of promises to observe @param {String} label optional string for describing the promise returned. Useful for tooling. @return {Promise} a promise which settles in the same way as the first passed promise to settle. */ function race(entries, label) { /*jshint validthis:true */ var Constructor = this; var promise = new Constructor(noop, label); if (!isArray(entries)) { reject(promise, new TypeError('Promise.race must be called with an array')); return promise; } for (var i = 0; promise._state === PENDING && i < entries.length; i++) { subscribe(Constructor.resolve(entries[i]), undefined, function (value) { return resolve(promise, value); }, function (reason) { return reject(promise, reason); }); } return promise; } /** `RSVP.Promise.reject` returns a promise rejected with the passed `reason`. It is shorthand for the following: ```javascript let promise = new RSVP.Promise(function(resolve, reject){ reject(new Error('WHOOPS')); }); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` Instead of writing the above, your code now simply becomes the following: ```javascript let promise = RSVP.Promise.reject(new Error('WHOOPS')); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` @method reject @static @param {*} reason value that the returned promise will be rejected with. @param {String} label optional string for identifying the returned promise. Useful for tooling. @return {Promise} a promise rejected with the given `reason`. */ function reject$1(reason, label) { /*jshint validthis:true */ var Constructor = this; var promise = new Constructor(noop, label); reject(promise, reason); return promise; } var guidKey = 'rsvp_' + now() + '-'; var counter = 0; function needsResolver() { throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); } function needsNew() { throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); } /** Promise objects represent the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise’s eventual value or the reason why the promise cannot be fulfilled. Terminology ----------- - `promise` is an object or function with a `then` method whose behavior conforms to this specification. - `thenable` is an object or function that defines a `then` method. - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). - `exception` is a value that is thrown using the throw statement. - `reason` is a value that indicates why a promise was rejected. - `settled` the final resting state of a promise, fulfilled or rejected. A promise can be in one of three states: pending, fulfilled, or rejected. Promises that are fulfilled have a fulfillment value and are in the fulfilled state. Promises that are rejected have a rejection reason and are in the rejected state. A fulfillment value is never a thenable. Promises can also be said to *resolve* a value. If this value is also a promise, then the original promise's settled state will match the value's settled state. So a promise that *resolves* a promise that rejects will itself reject, and a promise that *resolves* a promise that fulfills will itself fulfill. Basic Usage: ------------ ```js let promise = new Promise(function(resolve, reject) { // on success resolve(value); // on failure reject(reason); }); promise.then(function(value) { // on fulfillment }, function(reason) { // on rejection }); ``` Advanced Usage: --------------- Promises shine when abstracting away asynchronous interactions such as `XMLHttpRequest`s. ```js function getJSON(url) { return new Promise(function(resolve, reject){ let xhr = new XMLHttpRequest(); xhr.open('GET', url); xhr.onreadystatechange = handler; xhr.responseType = 'json'; xhr.setRequestHeader('Accept', 'application/json'); xhr.send(); function handler() { if (this.readyState === this.DONE) { if (this.status === 200) { resolve(this.response); } else { reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); } } }; }); } getJSON('/posts.json').then(function(json) { // on fulfillment }, function(reason) { // on rejection }); ``` Unlike callbacks, promises are great composable primitives. ```js Promise.all([ getJSON('/posts'), getJSON('/comments') ]).then(function(values){ values[0] // => postsJSON values[1] // => commentsJSON return values; }); ``` @class RSVP.Promise @param {function} resolver @param {String} label optional string for labeling the promise. Useful for tooling. @constructor */ var Promise = function () { function Promise(resolver, label) { this._id = counter++; this._label = label; this._state = undefined; this._result = undefined; this._subscribers = []; config.instrument && instrument('created', this); if (noop !== resolver) { typeof resolver !== 'function' && needsResolver(); this instanceof Promise ? initializePromise(this, resolver) : needsNew(); } } Promise.prototype._onError = function _onError(reason) { var _this = this; config.after(function () { if (_this._onError) { config.trigger('error', reason, _this._label); } }); }; /** `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same as the catch block of a try/catch statement. ```js function findAuthor(){ throw new Error('couldn\'t find that author'); } // synchronous try { findAuthor(); } catch(reason) { // something went wrong } // async with promises findAuthor().catch(function(reason){ // something went wrong }); ``` @method catch @param {Function} onRejection @param {String} label optional string for labeling the promise. Useful for tooling. @return {Promise} */ Promise.prototype.catch = function _catch(onRejection, label) { return this.then(undefined, onRejection, label); }; /** `finally` will be invoked regardless of the promise's fate just as native try/catch/finally behaves Synchronous example: ```js findAuthor() { if (Math.random() > 0.5) { throw new Error(); } return new Author(); } try { return findAuthor(); // succeed or fail } catch(error) { return findOtherAuthor(); } finally { // always runs // doesn't affect the return value } ``` Asynchronous example: ```js findAuthor().catch(function(reason){ return findOtherAuthor(); }).finally(function(){ // author was either found, or not }); ``` @method finally @param {Function} callback @param {String} label optional string for labeling the promise. Useful for tooling. @return {Promise} */ Promise.prototype.finally = function _finally(callback, label) { var promise = this; var constructor = promise.constructor; return promise.then(function (value) { return constructor.resolve(callback()).then(function () { return value; }); }, function (reason) { return constructor.resolve(callback()).then(function () { throw reason; }); }, label); }; return Promise; }(); Promise.cast = resolve$1; // deprecated Promise.all = all; Promise.race = race; Promise.resolve = resolve$1; Promise.reject = reject$1; Promise.prototype._guidKey = guidKey; /** The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. ```js findUser().then(function(user){ // user is available }, function(reason){ // user is unavailable, and you are given the reason why }); ``` Chaining -------- The return value of `then` is itself a promise. This second, 'downstream' promise is resolved with the return value of the first promise's fulfillment or rejection handler, or rejected if the handler throws an exception. ```js findUser().then(function (user) { return user.name; }, function (reason) { return 'default name'; }).then(function (userName) { // If `findUser` fulfilled, `userName` will be the user's name, otherwise it // will be `'default name'` }); findUser().then(function (user) { throw new Error('Found user, but still unhappy'); }, function (reason) { throw new Error('`findUser` rejected and we\'re unhappy'); }).then(function (value) { // never reached }, function (reason) { // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. // If `findUser` rejected, `reason` will be '`findUser` rejected and we\'re unhappy'. }); ``` If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. ```js findUser().then(function (user) { throw new PedagogicalException('Upstream error'); }).then(function (value) { // never reached }).then(function (value) { // never reached }, function (reason) { // The `PedgagocialException` is propagated all the way down to here }); ``` Assimilation ------------ Sometimes the value you want to propagate to a downstream promise can only be retrieved asynchronously. This can be achieved by returning a promise in the fulfillment or rejection handler. The downstream promise will then be pending until the returned promise is settled. This is called *assimilation*. ```js findUser().then(function (user) { return findCommentsByAuthor(user); }).then(function (comments) { // The user's comments are now available }); ``` If the assimliated promise rejects, then the downstream promise will also reject. ```js findUser().then(function (user) { return findCommentsByAuthor(user); }).then(function (comments) { // If `findCommentsByAuthor` fulfills, we'll have the value here }, function (reason) { // If `findCommentsByAuthor` rejects, we'll have the reason here }); ``` Simple Example -------------- Synchronous Example ```javascript let result; try { result = findResult(); // success } catch(reason) { // failure } ``` Errback Example ```js findResult(function(result, err){ if (err) { // failure } else { // success } }); ``` Promise Example; ```javascript findResult().then(function(result){ // success }, function(reason){ // failure }); ``` Advanced Example -------------- Synchronous Example ```javascript let author, books; try { author = findAuthor(); books = findBooksByAuthor(author); // success } catch(reason) { // failure } ``` Errback Example ```js function foundBooks(books) { } function failure(reason) { } findAuthor(function(author, err){ if (err) { failure(err); // failure } else { try { findBoooksByAuthor(author, function(books, err) { if (err) { failure(err); } else { try { foundBooks(books); } catch(reason) { failure(reason); } } }); } catch(error) { failure(err); } // success } }); ``` Promise Example; ```javascript findAuthor(). then(findBooksByAuthor). then(function(books){ // found books }).catch(function(reason){ // something went wrong }); ``` @method then @param {Function} onFulfillment @param {Function} onRejection @param {String} label optional string for labeling the promise. Useful for tooling. @return {Promise} */ Promise.prototype.then = then; function Result() { this.value = undefined; } var ERROR = new Result(); var GET_THEN_ERROR$1 = new Result(); function getThen$1(obj) { try { return obj.then; } catch (error) { ERROR.value = error; return ERROR; } } function tryApply(f, s, a) { try { f.apply(s, a); } catch (error) { ERROR.value = error; return ERROR; } } function makeObject(_, argumentNames) { var obj = {}; var length = _.length; var args = new Array(length); for (var x = 0; x < length; x++) { args[x] = _[x]; } for (var i = 0; i < argumentNames.length; i++) { var name = argumentNames[i]; obj[name] = args[i + 1]; } return obj; } function arrayResult(_) { var length = _.length; var args = new Array(length - 1); for (var i = 1; i < length; i++) { args[i - 1] = _[i]; } return args; } function wrapThenable(then, promise) { return { then: function (onFulFillment, onRejection) { return then.call(promise, onFulFillment, onRejection); } }; } /** `RSVP.denodeify` takes a 'node-style' function and returns a function that will return an `RSVP.Promise`. You can use `denodeify` in Node.js or the browser when you'd prefer to use promises over using callbacks. For example, `denodeify` transforms the following: ```javascript let fs = require('fs'); fs.readFile('myfile.txt', function(err, data){ if (err) return handleError(err); handleData(data); }); ``` into: ```javascript let fs = require('fs'); let readFile = RSVP.denodeify(fs.readFile); readFile('myfile.txt').then(handleData, handleError); ``` If the node function has multiple success parameters, then `denodeify` just returns the first one: ```javascript let request = RSVP.denodeify(require('request')); request('http://example.com').then(function(res) { // ... }); ``` However, if you need all success parameters, setting `denodeify`'s second parameter to `true` causes it to return all success parameters as an array: ```javascript let request = RSVP.denodeify(require('request'), true); request('http://example.com').then(function(result) { // result[0] -> res // result[1] -> body }); ``` Or if you pass it an array with names it returns the parameters as a hash: ```javascript let request = RSVP.denodeify(require('request'), ['res', 'body']); request('http://example.com').then(function(result) { // result.res // result.body }); ``` Sometimes you need to retain the `this`: ```javascript let app = require('express')(); let render = RSVP.denodeify(app.render.bind(app)); ``` The denodified function inherits from the original function. It works in all environments, except IE 10 and below. Consequently all properties of the original function are available to you. However, any properties you change on the denodeified function won't be changed on the original function. Example: ```javascript let request = RSVP.denodeify(require('request')), cookieJar = request.jar(); // <- Inheritance is used here request('http://example.com', {jar: cookieJar}).then(function(res) { // cookieJar.cookies holds now the cookies returned by example.com }); ``` Using `denodeify` makes it easier to compose asynchronous operations instead of using callbacks. For example, instead of: ```javascript let fs = require('fs'); fs.readFile('myfile.txt', function(err, data){ if (err) { ... } // Handle error fs.writeFile('myfile2.txt', data, function(err){ if (err) { ... } // Handle error console.log('done') }); }); ``` you can chain the operations together using `then` from the returned promise: ```javascript let fs = require('fs'); let readFile = RSVP.denodeify(fs.readFile); let writeFile = RSVP.denodeify(fs.writeFile); readFile('myfile.txt').then(function(data){ return writeFile('myfile2.txt', data); }).then(function(){ console.log('done') }).catch(function(error){ // Handle error }); ``` @method denodeify @static @for RSVP @param {Function} nodeFunc a 'node-style' function that takes a callback as its last argument. The callback expects an error to be passed as its first argument (if an error occurred, otherwise null), and the value from the operation as its second argument ('function(err, value){ }'). @param {Boolean|Array} [options] An optional paramter that if set to `true` causes the promise to fulfill with the callback's success arguments as an array. This is useful if the node function has multiple success paramters. If you set this paramter to an array with names, the promise will fulfill with a hash with these names as keys and the success parameters as values. @return {Function} a function that wraps `nodeFunc` to return an `RSVP.Promise` @static */ function denodeify(nodeFunc, options) { var fn = function () { var self = this; var l = arguments.length; var args = new Array(l + 1); var promiseInput = false; for (var i = 0; i < l; ++i) { var arg = arguments[i]; if (!promiseInput) { // TODO: clean this up promiseInput = needsPromiseInput(arg); if (promiseInput === GET_THEN_ERROR$1) { var p = new Promise(noop); reject(p, GET_THEN_ERROR$1.value); return p; } else if (promiseInput && promiseInput !== true) { arg = wrapThenable(promiseInput, arg); } } args[i] = arg; } var promise = new Promise(noop); args[l] = function (err, val) { if (err) reject(promise, err);else if (options === undefined) resolve(promise, val);else if (options === true) resolve(promise, arrayResult(arguments));else if (isArray(options)) resolve(promise, makeObject(arguments, options));else resolve(promise, val); }; if (promiseInput) { return handlePromiseInput(promise, args, nodeFunc, self); } else { return handleValueInput(promise, args, nodeFunc, self); } }; fn.__proto__ = nodeFunc; return fn; } function handleValueInput(promise, args, nodeFunc, self) { var result = tryApply(nodeFunc, self, args); if (result === ERROR) { reject(promise, result.value); } return promise; } function handlePromiseInput(promise, args, nodeFunc, self) { return Promise.all(args).then(function (args) { var result = tryApply(nodeFunc, self, args); if (result === ERROR) { reject(promise, result.value); } return promise; }); } function needsPromiseInput(arg) { if (arg && typeof arg === 'object') { if (arg.constructor === Promise) { return true; } else { return getThen$1(arg); } } else { return false; } } /** This is a convenient alias for `RSVP.Promise.all`. @method all @static @for RSVP @param {Array} array Array of promises. @param {String} label An optional label. This is useful for tooling. */ function all$1(array, label) { return Promise.all(array, label); } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var AllSettled = function (_Enumerator) { _inherits(AllSettled, _Enumerator); function AllSettled(Constructor, entries, label) { return _possibleConstructorReturn(this, _Enumerator.call(this, Constructor, entries, false /* don't abort on reject */, label)); } return AllSettled; }(Enumerator); AllSettled.prototype._makeResult = makeSettledResult; /** `RSVP.allSettled` is similar to `RSVP.all`, but instead of implementing a fail-fast method, it waits until all the promises have returned and shows you all the results. This is useful if you want to handle multiple promises' failure states together as a set. Returns a promise that is fulfilled when all the given promises have been settled. The return promise is fulfilled with an array of the states of the promises passed into the `promises` array argument. Each state object will either indicate fulfillment or rejection, and provide the corresponding value or reason. The states will take one of the following formats: ```javascript { state: 'fulfilled', value: value } or { state: 'rejected', reason: reason } ``` Example: ```javascript let promise1 = RSVP.Promise.resolve(1); let promise2 = RSVP.Promise.reject(new Error('2')); let promise3 = RSVP.Promise.reject(new Error('3')); let promises = [ promise1, promise2, promise3 ]; RSVP.allSettled(promises).then(function(array){ // array == [ // { state: 'fulfilled', value: 1 }, // { state: 'rejected', reason: Error }, // { state: 'rejected', reason: Error } // ] // Note that for the second item, reason.message will be '2', and for the // third item, reason.message will be '3'. }, function(error) { // Not run. (This block would only be called if allSettled had failed, // for instance if passed an incorrect argument type.) }); ``` @method allSettled @static @for RSVP @param {Array} entries @param {String} label - optional string that describes the promise. Useful for tooling. @return {Promise} promise that is fulfilled with an array of the settled states of the constituent promises. */ function allSettled(entries, label) { if (!isArray(entries)) { return Promise.reject(new TypeError("Promise.allSettled must be called with an array"), label); } return new AllSettled(Promise, entries, label).promise; } /** This is a convenient alias for `RSVP.Promise.race`. @method race @static @for RSVP @param {Array} array Array of promises. @param {String} label An optional label. This is useful for tooling. */ function race$1(array, label) { return Promise.race(array, label); } function _possibleConstructorReturn$1(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var hasOwnProperty = Object.prototype.hasOwnProperty; var PromiseHash = function (_Enumerator) { _inherits$1(PromiseHash, _Enumerator); function PromiseHash(Constructor, object) { var abortOnReject = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; var label = arguments[3]; return _possibleConstructorReturn$1(this, _Enumerator.call(this, Constructor, object, abortOnReject, label)); } PromiseHash.prototype._init = function _init(Constructor, object) { this._result = {}; this._enumerate(object); if (this._remaining === 0) { fulfill(this.promise, this._result); } }; PromiseHash.prototype._enumerate = function _enumerate(input) { var promise = this.promise; var results = []; for (var key in input) { if (hasOwnProperty.call(input, key)) { results.push({ position: key, entry: input[key] }); } } var length = results.length; this._remaining = length; var result = void 0; for (var i = 0; promise._state === PENDING && i < length; i++) { result = results[i]; this._eachEntry(result.entry, result.position); } }; return PromiseHash; }(Enumerator); /** `RSVP.hash` is similar to `RSVP.all`, but takes an object instead of an array for its `promises` argument. Returns a promise that is fulfilled when all the given promises have been fulfilled, or rejected if any of them become rejected. The returned promise is fulfilled with a hash that has the same key names as the `promises` object argument. If any of the values in the object are not promises, they will simply be copied over to the fulfilled object. Example: ```javascript let promises = { myPromise: RSVP.resolve(1), yourPromise: RSVP.resolve(2), theirPromise: RSVP.resolve(3), notAPromise: 4 }; RSVP.hash(promises).then(function(hash){ // hash here is an object that looks like: // { // myPromise: 1, // yourPromise: 2, // theirPromise: 3, // notAPromise: 4 // } }); ```` If any of the `promises` given to `RSVP.hash` are rejected, the first promise that is rejected will be given as the reason to the rejection handler. Example: ```javascript let promises = { myPromise: RSVP.resolve(1), rejectedPromise: RSVP.reject(new Error('rejectedPromise')), anotherRejectedPromise: RSVP.reject(new Error('anotherRejectedPromise')), }; RSVP.hash(promises).then(function(hash){ // Code here never runs because there are rejected promises! }, function(reason) { // reason.message === 'rejectedPromise' }); ``` An important note: `RSVP.hash` is intended for plain JavaScript objects that are just a set of keys and values. `RSVP.hash` will NOT preserve prototype chains. Example: ```javascript function MyConstructor(){ this.example = RSVP.resolve('Example'); } MyConstructor.prototype = { protoProperty: RSVP.resolve('Proto Property') }; let myObject = new MyConstructor(); RSVP.hash(myObject).then(function(hash){ // protoProperty will not be present, instead you will just have an // object that looks like: // { // example: 'Example' // } // // hash.hasOwnProperty('protoProperty'); // false // 'undefined' === typeof hash.protoProperty }); ``` @method hash @static @for RSVP @param {Object} object @param {String} label optional string that describes the promise. Useful for tooling. @return {Promise} promise that is fulfilled when all properties of `promises` have been fulfilled, or rejected if any of them become rejected. */ function hash(object, label) { if (!isObject(object)) { return Promise.reject(new TypeError("Promise.hash must be called with an object"), label); } return new PromiseHash(Promise, object, label).promise; } function _possibleConstructorReturn$2(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits$2(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var HashSettled = function (_PromiseHash) { _inherits$2(HashSettled, _PromiseHash); function HashSettled(Constructor, object, label) { return _possibleConstructorReturn$2(this, _PromiseHash.call(this, Constructor, object, false, label)); } return HashSettled; }(PromiseHash); HashSettled.prototype._makeResult = makeSettledResult; /** `RSVP.hashSettled` is similar to `RSVP.allSettled`, but takes an object instead of an array for its `promises` argument. Unlike `RSVP.all` or `RSVP.hash`, which implement a fail-fast method, but like `RSVP.allSettled`, `hashSettled` waits until all the constituent promises have returned and then shows you all the results with their states and values/reasons. This is useful if you want to handle multiple promises' failure states together as a set. Returns a promise that is fulfilled when all the given promises have been settled, or rejected if the passed parameters are invalid. The returned promise is fulfilled with a hash that has the same key names as the `promises` object argument. If any of the values in the object are not promises, they will be copied over to the fulfilled object and marked with state 'fulfilled'. Example: ```javascript let promises = { myPromise: RSVP.Promise.resolve(1), yourPromise: RSVP.Promise.resolve(2), theirPromise: RSVP.Promise.resolve(3), notAPromise: 4 }; RSVP.hashSettled(promises).then(function(hash){ // hash here is an object that looks like: // { // myPromise: { state: 'fulfilled', value: 1 }, // yourPromise: { state: 'fulfilled', value: 2 }, // theirPromise: { state: 'fulfilled', value: 3 }, // notAPromise: { state: 'fulfilled', value: 4 } // } }); ``` If any of the `promises` given to `RSVP.hash` are rejected, the state will be set to 'rejected' and the reason for rejection provided. Example: ```javascript let promises = { myPromise: RSVP.Promise.resolve(1), rejectedPromise: RSVP.Promise.reject(new Error('rejection')), anotherRejectedPromise: RSVP.Promise.reject(new Error('more rejection')), }; RSVP.hashSettled(promises).then(function(hash){ // hash here is an object that looks like: // { // myPromise: { state: 'fulfilled', value: 1 }, // rejectedPromise: { state: 'rejected', reason: Error }, // anotherRejectedPromise: { state: 'rejected', reason: Error }, // } // Note that for rejectedPromise, reason.message == 'rejection', // and for anotherRejectedPromise, reason.message == 'more rejection'. }); ``` An important note: `RSVP.hashSettled` is intended for plain JavaScript objects that are just a set of keys and values. `RSVP.hashSettled` will NOT preserve prototype chains. Example: ```javascript function MyConstructor(){ this.example = RSVP.Promise.resolve('Example'); } MyConstructor.prototype = { protoProperty: RSVP.Promise.resolve('Proto Property') }; let myObject = new MyConstructor(); RSVP.hashSettled(myObject).then(function(hash){ // protoProperty will not be present, instead you will just have an // object that looks like: // { // example: { state: 'fulfilled', value: 'Example' } // } // // hash.hasOwnProperty('protoProperty'); // false // 'undefined' === typeof hash.protoProperty }); ``` @method hashSettled @for RSVP @param {Object} object @param {String} label optional string that describes the promise. Useful for tooling. @return {Promise} promise that is fulfilled when when all properties of `promises` have been settled. @static */ function hashSettled(object, label) { if (!isObject(object)) { return Promise.reject(new TypeError("RSVP.hashSettled must be called with an object"), label); } return new HashSettled(Promise, object, false, label).promise; } /** `RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event loop in order to aid debugging. Promises A+ specifies that any exceptions that occur with a promise must be caught by the promises implementation and bubbled to the last handler. For this reason, it is recommended that you always specify a second rejection handler function to `then`. However, `RSVP.rethrow` will throw the exception outside of the promise, so it bubbles up to your console if in the browser, or domain/cause uncaught exception in Node. `rethrow` will also throw the error again so the error can be handled by the promise per the spec. ```javascript function throws(){ throw new Error('Whoops!'); } let promise = new RSVP.Promise(function(resolve, reject){ throws(); }); promise.catch(RSVP.rethrow).then(function(){ // Code here doesn't run because the promise became rejected due to an // error! }, function (err){ // handle the error here }); ``` The 'Whoops' error will be thrown on the next turn of the event loop and you can watch for it in your console. You can also handle it using a rejection handler given to `.then` or `.catch` on the returned promise. @method rethrow @static @for RSVP @param {Error} reason reason the promise became rejected. @throws Error @static */ function rethrow(reason) { setTimeout(function () { throw reason; }); throw reason; } /** `RSVP.defer` returns an object similar to jQuery's `$.Deferred`. `RSVP.defer` should be used when porting over code reliant on `$.Deferred`'s interface. New code should use the `RSVP.Promise` constructor instead. The object returned from `RSVP.defer` is a plain object with three properties: * promise - an `RSVP.Promise`. * reject - a function that causes the `promise` property on this object to become rejected * resolve - a function that causes the `promise` property on this object to become fulfilled. Example: ```javascript let deferred = RSVP.defer(); deferred.resolve("Success!"); deferred.promise.then(function(value){ // value here is "Success!" }); ``` @method defer @static @for RSVP @param {String} label optional string for labeling the promise. Useful for tooling. @return {Object} */ function defer(label) { var deferred = { resolve: undefined, reject: undefined }; deferred.promise = new Promise(function (resolve, reject) { deferred.resolve = resolve; deferred.reject = reject; }, label); return deferred; } /** `RSVP.map` is similar to JavaScript's native `map` method, except that it waits for all promises to become fulfilled before running the `mapFn` on each item in given to `promises`. `RSVP.map` returns a promise that will become fulfilled with the result of running `mapFn` on the values the promises become fulfilled with. For example: ```javascript let promise1 = RSVP.resolve(1); let promise2 = RSVP.resolve(2); let promise3 = RSVP.resolve(3); let promises = [ promise1, promise2, promise3 ]; let mapFn = function(item){ return item + 1; }; RSVP.map(promises, mapFn).then(function(result){ // result is [ 2, 3, 4 ] }); ``` If any of the `promises` given to `RSVP.map` are rejected, the first promise that is rejected will be given as an argument to the returned promise's rejection handler. For example: ```javascript let promise1 = RSVP.resolve(1); let promise2 = RSVP.reject(new Error('2')); let promise3 = RSVP.reject(new Error('3')); let promises = [ promise1, promise2, promise3 ]; let mapFn = function(item){ return item + 1; }; RSVP.map(promises, mapFn).then(function(array){ // Code here never runs because there are rejected promises! }, function(reason) { // reason.message === '2' }); ``` `RSVP.map` will also wait if a promise is returned from `mapFn`. For example, say you want to get all comments from a set of blog posts, but you need the blog posts first because they contain a url to those comments. ```javscript let mapFn = function(blogPost){ // getComments does some ajax and returns an RSVP.Promise that is fulfilled // with some comments data return getComments(blogPost.comments_url); }; // getBlogPosts does some ajax and returns an RSVP.Promise that is fulfilled // with some blog post data RSVP.map(getBlogPosts(), mapFn).then(function(comments){ // comments is the result of asking the server for the comments // of all blog posts returned from getBlogPosts() }); ``` @method map @static @for RSVP @param {Array} promises @param {Function} mapFn function to be called on each fulfilled promise. @param {String} label optional string for labeling the promise. Useful for tooling. @return {Promise} promise that is fulfilled with the result of calling `mapFn` on each fulfilled promise or value when they become fulfilled. The promise will be rejected if any of the given `promises` become rejected. @static */ function map(promises, mapFn, label) { if (!isArray(promises)) { return Promise.reject(new TypeError("RSVP.map must be called with an array"), label); } if (!isFunction(mapFn)) { return Promise.reject(new TypeError("RSVP.map expects a function as a second argument"), label); } return Promise.all(promises, label).then(function (values) { var length = values.length; var results = new Array(length); for (var i = 0; i < length; i++) { results[i] = mapFn(values[i]); } return Promise.all(results, label); }); } /** This is a convenient alias for `RSVP.Promise.resolve`. @method resolve @static @for RSVP @param {*} value value that the returned promise will be resolved with @param {String} label optional string for identifying the returned promise. Useful for tooling. @return {Promise} a promise that will become fulfilled with the given `value` */ function resolve$2(value, label) { return Promise.resolve(value, label); } /** This is a convenient alias for `RSVP.Promise.reject`. @method reject @static @for RSVP @param {*} reason value that the returned promise will be rejected with. @param {String} label optional string for identifying the returned promise. Useful for tooling. @return {Promise} a promise rejected with the given `reason`. */ function reject$2(reason, label) { return Promise.reject(reason, label); } /** `RSVP.filter` is similar to JavaScript's native `filter` method, except that it waits for all promises to become fulfilled before running the `filterFn` on each item in given to `promises`. `RSVP.filter` returns a promise that will become fulfilled with the result of running `filterFn` on the values the promises become fulfilled with. For example: ```javascript let promise1 = RSVP.resolve(1); let promise2 = RSVP.resolve(2); let promise3 = RSVP.resolve(3); let promises = [promise1, promise2, promise3]; let filterFn = function(item){ return item > 1; }; RSVP.filter(promises, filterFn).then(function(result){ // result is [ 2, 3 ] }); ``` If any of the `promises` given to `RSVP.filter` are rejected, the first promise that is rejected will be given as an argument to the returned promise's rejection handler. For example: ```javascript let promise1 = RSVP.resolve(1); let promise2 = RSVP.reject(new Error('2')); let promise3 = RSVP.reject(new Error('3')); let promises = [ promise1, promise2, promise3 ]; let filterFn = function(item){ return item > 1; }; RSVP.filter(promises, filterFn).then(function(array){ // Code here never runs because there are rejected promises! }, function(reason) { // reason.message === '2' }); ``` `RSVP.filter` will also wait for any promises returned from `filterFn`. For instance, you may want to fetch a list of users then return a subset of those users based on some asynchronous operation: ```javascript let alice = { name: 'alice' }; let bob = { name: 'bob' }; let users = [ alice, bob ]; let promises = users.map(function(user){ return RSVP.resolve(user); }); let filterFn = function(user){ // Here, Alice has permissions to create a blog post, but Bob does not. return getPrivilegesForUser(user).then(function(privs){ return privs.can_create_blog_post === true; }); }; RSVP.filter(promises, filterFn).then(function(users){ // true, because the server told us only Alice can create a blog post. users.length === 1; // false, because Alice is the only user present in `users` users[0] === bob; }); ``` @method filter @static @for RSVP @param {Array} promises @param {Function} filterFn - function to be called on each resolved value to filter the final results. @param {String} label optional string describing the promise. Useful for tooling. @return {Promise} */ function resolveAll(promises, label) { return Promise.all(promises, label); } function resolveSingle(promise, label) { return Promise.resolve(promise, label).then(function (promises) { return resolveAll(promises, label); }); } function filter(promises, filterFn, label) { if (!isArray(promises) && !(isObject(promises) && promises.then !== undefined)) { return Promise.reject(new TypeError("RSVP.filter must be called with an array or promise"), label); } if (!isFunction(filterFn)) { return Promise.reject(new TypeError("RSVP.filter expects function as a second argument"), label); } var promise = isArray(promises) ? resolveAll(promises, label) : resolveSingle(promises, label); return promise.then(function (values) { var length = values.length; var filtered = new Array(length); for (var i = 0; i < length; i++) { filtered[i] = filterFn(values[i]); } return resolveAll(filtered, label).then(function (filtered) { var results = new Array(length); var newLength = 0; for (var _i = 0; _i < length; _i++) { if (filtered[_i]) { results[newLength] = values[_i]; newLength++; } } results.length = newLength; return results; }); }); } var len = 0; var vertxNext = void 0; function asap(callback, arg) { queue$1[len] = callback; queue$1[len + 1] = arg; len += 2; if (len === 2) { // If len is 1, that means that we need to schedule an async flush. // If additional callbacks are queued before the queue is flushed, they // will be processed by this flush that we are scheduling. scheduleFlush$1(); } } var browserWindow = typeof window !== 'undefined' ? window : undefined; var browserGlobal = browserWindow || {}; var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; // test for web worker but not in IE10 var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; // node function useNextTick() { var nextTick = process.nextTick; // node version 0.10.x displays a deprecation warning when nextTick is used recursively // setImmediate should be used instead instead var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { nextTick = setImmediate; } return function () { return nextTick(flush); }; } // vertx function useVertxTimer() { if (typeof vertxNext !== 'undefined') { return function () { vertxNext(flush); }; } return useSetTimeout(); } function useMutationObserver() { var iterations = 0; var observer = new BrowserMutationObserver(flush); var node = document.createTextNode(''); observer.observe(node, { characterData: true }); return function () { return node.data = iterations = ++iterations % 2; }; } // web worker function useMessageChannel() { var channel = new MessageChannel(); channel.port1.onmessage = flush; return function () { return channel.port2.postMessage(0); }; } function useSetTimeout() { return function () { return setTimeout(flush, 1); }; } var queue$1 = new Array(1000); function flush() { for (var i = 0; i < len; i += 2) { var callback = queue$1[i]; var arg = queue$1[i + 1]; callback(arg); queue$1[i] = undefined; queue$1[i + 1] = undefined; } len = 0; } function attemptVertex() { try { var r = require; var vertx = r('vertx'); vertxNext = vertx.runOnLoop || vertx.runOnContext; return useVertxTimer(); } catch (e) { return useSetTimeout(); } } var scheduleFlush$1 = void 0; // Decide what async method to use to triggering processing of queued callbacks: if (isNode) { scheduleFlush$1 = useNextTick(); } else if (BrowserMutationObserver) { scheduleFlush$1 = useMutationObserver(); } else if (isWorker) { scheduleFlush$1 = useMessageChannel(); } else if (browserWindow === undefined && typeof require === 'function') { scheduleFlush$1 = attemptVertex(); } else { scheduleFlush$1 = useSetTimeout(); } var platform = void 0; /* global self */ if (typeof self === 'object') { platform = self; /* global global */ } else if (typeof global === 'object') { platform = global; } else { throw new Error('no global: `self` or `global` found'); } var _asap$cast$Promise$Ev; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } // defaults config.async = asap; config.after = function (cb) { return setTimeout(cb, 0); }; var cast = resolve$2; var async = function (callback, arg) { return config.async(callback, arg); }; function on() { config['on'].apply(config, arguments); } function off() { config['off'].apply(config, arguments); } // Set up instrumentation through `window.__PROMISE_INTRUMENTATION__` if (typeof window !== 'undefined' && typeof window['__PROMISE_INSTRUMENTATION__'] === 'object') { var callbacks = window['__PROMISE_INSTRUMENTATION__']; configure('instrument', true); for (var eventName in callbacks) { if (callbacks.hasOwnProperty(eventName)) { on(eventName, callbacks[eventName]); } } } // the default export here is for backwards compat: // https://github.com/tildeio/rsvp.js/issues/434 var rsvp = (_asap$cast$Promise$Ev = { asap: asap, cast: cast, Promise: Promise, EventTarget: EventTarget, all: all$1, allSettled: allSettled, race: race$1, hash: hash, hashSettled: hashSettled, rethrow: rethrow, defer: defer, denodeify: denodeify, configure: configure, on: on, off: off, resolve: resolve$2, reject: reject$2, map: map }, _defineProperty(_asap$cast$Promise$Ev, 'async', async), _defineProperty(_asap$cast$Promise$Ev, 'filter', filter), _asap$cast$Promise$Ev); exports['default'] = rsvp; exports.asap = asap; exports.cast = cast; exports.Promise = Promise; exports.EventTarget = EventTarget; exports.all = all$1; exports.allSettled = allSettled; exports.race = race$1; exports.hash = hash; exports.hashSettled = hashSettled; exports.rethrow = rethrow; exports.defer = defer; exports.denodeify = denodeify; exports.configure = configure; exports.on = on; exports.off = off; exports.resolve = resolve$2; exports.reject = reject$2; exports.map = map; exports.async = async; exports.filter = filter; Object.defineProperty(exports, '__esModule', { value: true }); }))); // var EPUBJS = EPUBJS || {}; EPUBJS.core = {}; var ELEMENT_NODE = 1; var TEXT_NODE = 3; var COMMENT_NODE = 8; var DOCUMENT_NODE = 9; //-- Get a element for an id EPUBJS.core.getEl = function(elem) { return document.getElementById(elem); }; //-- Get all elements for a class EPUBJS.core.getEls = function(classes) { return document.getElementsByClassName(classes); }; EPUBJS.core.request = function(url, type, withCredentials) { var supportsURL = window.URL; var BLOB_RESPONSE = supportsURL ? "blob" : "arraybuffer"; var deferred = new RSVP.defer(); var xhr = new XMLHttpRequest(); var uri; //-- Check from PDF.js: // https://github.com/mozilla/pdf.js/blob/master/web/compatibility.js var xhrPrototype = XMLHttpRequest.prototype; var handler = function() { var r; if (this.readyState != this.DONE) return; if ((this.status === 200 || this.status === 0) && this.response) { // Android & Firefox reporting 0 for local & blob urls if (type == 'xml'){ // If this.responseXML wasn't set, try to parse using a DOMParser from text if(!this.responseXML) { r = new DOMParser().parseFromString(this.response, "application/xml"); } else { r = this.responseXML; } } else if (type == 'xhtml') { if (!this.responseXML){ r = new DOMParser().parseFromString(this.response, "application/xhtml+xml"); } else { r = this.responseXML; } } else if (type == 'html') { if (!this.responseXML){ r = new DOMParser().parseFromString(this.response, "text/html"); } else { r = this.responseXML; } } else if (type == 'json') { r = JSON.parse(this.response); } else if (type == 'blob') { if (supportsURL) { r = this.response; } else { //-- Safari doesn't support responseType blob, so create a blob from arraybuffer r = new Blob([this.response]); } } else { r = this.response; } deferred.resolve(r); } else { deferred.reject({ message : this.response, stack : new Error().stack }); } }; if (!('overrideMimeType' in xhrPrototype)) { // IE10 might have response, but not overrideMimeType Object.defineProperty(xhrPrototype, 'overrideMimeType', { value: function xmlHttpRequestOverrideMimeType(mimeType) {} }); } xhr.onreadystatechange = handler; xhr.open("GET", url, true); if(withCredentials) { xhr.withCredentials = true; } // If type isn't set, determine it from the file extension if(!type) { uri = EPUBJS.core.uri(url); type = uri.extension; type = { 'htm': 'html' }[type] || type; } if(type == 'blob'){ xhr.responseType = BLOB_RESPONSE; } if(type == "json") { xhr.setRequestHeader("Accept", "application/json"); } if(type == 'xml') { xhr.responseType = "document"; xhr.overrideMimeType('text/xml'); // for OPF parsing } if(type == 'xhtml') { xhr.responseType = "document"; } if(type == 'html') { xhr.responseType = "document"; } if(type == "binary") { xhr.responseType = "arraybuffer"; } xhr.send(); return deferred.promise; }; EPUBJS.core.toArray = function(obj) { var arr = []; for (var member in obj) { var newitm; if ( obj.hasOwnProperty(member) ) { newitm = obj[member]; newitm.ident = member; arr.push(newitm); } } return arr; }; //-- Parse the different parts of a url, returning a object EPUBJS.core.uri = function(url){ var uri = { protocol : '', host : '', path : '', origin : '', directory : '', base : '', filename : '', extension : '', fragment : '', href : url }, blob = url.indexOf('blob:'), doubleSlash = url.indexOf('://'), search = url.indexOf('?'), fragment = url.indexOf("#"), withoutProtocol, dot, firstSlash; if(blob === 0) { uri.protocol = "blob"; uri.base = url.indexOf(0, fragment); return uri; } if(fragment != -1) { uri.fragment = url.slice(fragment + 1); url = url.slice(0, fragment); } if(search != -1) { uri.search = url.slice(search + 1); url = url.slice(0, search); href = uri.href; } if(doubleSlash != -1) { uri.protocol = url.slice(0, doubleSlash); withoutProtocol = url.slice(doubleSlash+3); firstSlash = withoutProtocol.indexOf('/'); if(firstSlash === -1) { uri.host = uri.path; uri.path = ""; } else { uri.host = withoutProtocol.slice(0, firstSlash); uri.path = withoutProtocol.slice(firstSlash); } uri.origin = uri.protocol + "://" + uri.host; uri.directory = EPUBJS.core.folder(uri.path); uri.base = uri.origin + uri.directory; // return origin; } else { uri.path = url; uri.directory = EPUBJS.core.folder(url); uri.base = uri.directory; } //-- Filename uri.filename = url.replace(uri.base, ''); dot = uri.filename.lastIndexOf('.'); if(dot != -1) { uri.extension = uri.filename.slice(dot+1); } return uri; }; //-- Parse out the folder, will return everything before the last slash EPUBJS.core.folder = function(url){ var lastSlash = url.lastIndexOf('/'); if(lastSlash == -1) var folder = ''; folder = url.slice(0, lastSlash + 1); return folder; }; //-- https://github.com/ebidel/filer.js/blob/master/src/filer.js#L128 EPUBJS.core.dataURLToBlob = function(dataURL) { var BASE64_MARKER = ';base64,', parts, contentType, raw, rawLength, uInt8Array; if (dataURL.indexOf(BASE64_MARKER) == -1) { parts = dataURL.split(','); contentType = parts[0].split(':')[1]; raw = parts[1]; return new Blob([raw], {type: contentType}); } parts = dataURL.split(BASE64_MARKER); contentType = parts[0].split(':')[1]; raw = window.atob(parts[1]); rawLength = raw.length; uInt8Array = new Uint8Array(rawLength); for (var i = 0; i < rawLength; ++i) { uInt8Array[i] = raw.charCodeAt(i); } return new Blob([uInt8Array], {type: contentType}); }; //-- Load scripts async: http://stackoverflow.com/questions/7718935/load-scripts-asynchronously EPUBJS.core.addScript = function(src, callback, target) { var s, r; r = false; s = document.createElement('script'); s.type = 'text/javascript'; s.async = false; s.src = src; s.onload = s.onreadystatechange = function() { if ( !r && (!this.readyState || this.readyState == 'complete') ) { r = true; if(callback) callback(); } }; target = target || document.body; target.appendChild(s); }; EPUBJS.core.addScripts = function(srcArr, callback, target) { var total = srcArr.length, curr = 0, cb = function(){ curr++; if(total == curr){ if(callback) callback(); }else{ EPUBJS.core.addScript(srcArr[curr], cb, target); } }; EPUBJS.core.addScript(srcArr[curr], cb, target); }; EPUBJS.core.addCss = function(src, callback, target) { var s, r; r = false; s = document.createElement('link'); s.type = 'text/css'; s.rel = "stylesheet"; s.href = src; s.onload = s.onreadystatechange = function() { if ( !r && (!this.readyState || this.readyState == 'complete') ) { r = true; if(callback) callback(); } }; target = target || document.body; target.appendChild(s); }; EPUBJS.core.prefixed = function(unprefixed) { var vendors = ["Webkit", "Moz", "O", "ms" ], prefixes = ['-Webkit-', '-moz-', '-o-', '-ms-'], upper = unprefixed[0].toUpperCase() + unprefixed.slice(1), length = vendors.length; if (typeof(document.documentElement.style[unprefixed]) != 'undefined') { return unprefixed; } for ( var i=0; i < length; i++ ) { if (typeof(document.documentElement.style[vendors[i] + upper]) != 'undefined') { return vendors[i] + upper; } } return unprefixed; }; EPUBJS.core.resolveUrl = function(base, path) { var url, segments = [], uri = EPUBJS.core.uri(path), folders = base.split("/"), paths; if(uri.host) { return path; } folders.pop(); paths = path.split("/"); paths.forEach(function(p){ if(p === ".."){ folders.pop(); }else{ segments.push(p); } }); url = folders.concat(segments); return url.join("/"); }; // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript EPUBJS.core.uuid = function() { var d = new Date().getTime(); var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = (d + Math.random()*16)%16 | 0; d = Math.floor(d/16); return (c=='x' ? r : (r&0x7|0x8)).toString(16); }); return uuid; }; // Fast quicksort insert for sorted array -- based on: // http://stackoverflow.com/questions/1344500/efficient-way-to-insert-a-number-into-a-sorted-array-of-numbers EPUBJS.core.insert = function(item, array, compareFunction) { var location = EPUBJS.core.locationOf(item, array, compareFunction); array.splice(location, 0, item); return location; }; EPUBJS.core.locationOf = function(item, array, compareFunction, _start, _end) { var start = _start || 0; var end = _end || array.length; var pivot = parseInt(start + (end - start) / 2); var compared; if(!compareFunction){ compareFunction = function(a, b) { if(a > b) return 1; if(a < b) return -1; if(a = b) return 0; }; } if(end-start <= 0) { return pivot; } compared = compareFunction(array[pivot], item); if(end-start === 1) { return compared > 0 ? pivot : pivot + 1; } if(compared === 0) { return pivot; } if(compared === -1) { return EPUBJS.core.locationOf(item, array, compareFunction, pivot, end); } else{ return EPUBJS.core.locationOf(item, array, compareFunction, start, pivot); } }; EPUBJS.core.indexOfSorted = function(item, array, compareFunction, _start, _end) { var start = _start || 0; var end = _end || array.length; var pivot = parseInt(start + (end - start) / 2); var compared; if(!compareFunction){ compareFunction = function(a, b) { if(a > b) return 1; if(a < b) return -1; if(a = b) return 0; }; } if(end-start <= 0) { return -1; // Not found } compared = compareFunction(array[pivot], item); if(end-start === 1) { return compared === 0 ? pivot : -1; } if(compared === 0) { return pivot; // Found } if(compared === -1) { return EPUBJS.core.indexOfSorted(item, array, compareFunction, pivot, end); } else{ return EPUBJS.core.indexOfSorted(item, array, compareFunction, start, pivot); } }; EPUBJS.core.queue = function(_scope){ var _q = []; var scope = _scope; // Add an item to the queue var enqueue = function(funcName, args, context) { _q.push({ "funcName" : funcName, "args" : args, "context" : context }); return _q; }; // Run one item var dequeue = function(){ var inwait; if(_q.length) { inwait = _q.shift(); // Defer to any current tasks // setTimeout(function(){ scope[inwait.funcName].apply(inwait.context || scope, inwait.args); // }, 0); } }; // Run All var flush = function(){ while(_q.length) { dequeue(); } }; // Clear all items in wait var clear = function(){ _q = []; }; var length = function(){ return _q.length; }; return { "enqueue" : enqueue, "dequeue" : dequeue, "flush" : flush, "clear" : clear, "length" : length }; }; // From: https://code.google.com/p/fbug/source/browse/branches/firebug1.10/content/firebug/lib/xpath.js /** * Gets an XPath for an element which describes its hierarchical location. */ EPUBJS.core.getElementXPath = function(element) { if (element && element.id) { return '//*[@id="' + element.id + '"]'; } else { return EPUBJS.core.getElementTreeXPath(element); } }; EPUBJS.core.getElementTreeXPath = function(element) { var paths = []; var isXhtml = (element.ownerDocument.documentElement.getAttribute('xmlns') === "http://www.w3.org/1999/xhtml"); var index, nodeName, tagName, pathIndex; if(element.nodeType === Node.TEXT_NODE){ // index = Array.prototype.indexOf.call(element.parentNode.childNodes, element) + 1; index = EPUBJS.core.indexOfTextNode(element) + 1; paths.push("text()["+index+"]"); element = element.parentNode; } // Use nodeName (instead of localName) so namespace prefix is included (if any). for (; element && element.nodeType == 1; element = element.parentNode) { index = 0; for (var sibling = element.previousSibling; sibling; sibling = sibling.previousSibling) { // Ignore document type declaration. if (sibling.nodeType == Node.DOCUMENT_TYPE_NODE) { continue; } if (sibling.nodeName == element.nodeName) { ++index; } } nodeName = element.nodeName.toLowerCase(); tagName = (isXhtml ? "xhtml:" + nodeName : nodeName); pathIndex = (index ? "[" + (index+1) + "]" : ""); paths.splice(0, 0, tagName + pathIndex); } return paths.length ? "./" + paths.join("/") : null; }; EPUBJS.core.nsResolver = function(prefix) { var ns = { 'xhtml' : 'http://www.w3.org/1999/xhtml', 'epub': 'http://www.idpf.org/2007/ops' }; return ns[prefix] || null; }; //https://stackoverflow.com/questions/13482352/xquery-looking-for-text-with-single-quote/13483496#13483496 EPUBJS.core.cleanStringForXpath = function(str) { var parts = str.match(/[^'"]+|['"]/g); parts = parts.map(function(part){ if (part === "'") { return '\"\'\"'; // output "'" } if (part === '"') { return "\'\"\'"; // output '"' } return "\'" + part + "\'"; }); return "concat(\'\'," + parts.join(",") + ")"; }; EPUBJS.core.indexOfTextNode = function(textNode){ var parent = textNode.parentNode; var children = parent.childNodes; var sib; var index = -1; for (var i = 0; i < children.length; i++) { sib = children[i]; if(sib.nodeType === Node.TEXT_NODE){ index++; } if(sib == textNode) break; } return index; }; // Underscore EPUBJS.core.defaults = function(obj) { for (var i = 1, length = arguments.length; i < length; i++) { var source = arguments[i]; for (var prop in source) { if (obj[prop] === void 0) obj[prop] = source[prop]; } } return obj; }; EPUBJS.core.extend = function(target) { var sources = [].slice.call(arguments, 1); sources.forEach(function (source) { if(!source) return; Object.getOwnPropertyNames(source).forEach(function(propName) { Object.defineProperty(target, propName, Object.getOwnPropertyDescriptor(source, propName)); }); }); return target; }; EPUBJS.core.clone = function(obj) { return EPUBJS.core.isArray(obj) ? obj.slice() : EPUBJS.core.extend({}, obj); }; EPUBJS.core.isElement = function(obj) { return !!(obj && obj.nodeType == 1); }; EPUBJS.core.isNumber = function(n) { return !isNaN(parseFloat(n)) && isFinite(n); }; EPUBJS.core.isString = function(str) { return (typeof str === 'string' || str instanceof String); }; EPUBJS.core.isArray = Array.isArray || function(obj) { return Object.prototype.toString.call(obj) === '[object Array]'; }; // Lodash EPUBJS.core.values = function(object) { var index = -1; var props, length, result; if(!object) return []; props = Object.keys(object); length = props.length; result = Array(length); while (++index < length) { result[index] = object[props[index]]; } return result; }; EPUBJS.core.indexOfNode = function(node, typeId) { var parent = node.parentNode; var children = parent.childNodes; var sib; var index = -1; for (var i = 0; i < children.length; i++) { sib = children[i]; if (sib.nodeType === typeId) { index++; } if (sib == node) break; } return index; } EPUBJS.core.indexOfTextNode = function(textNode) { return EPUBJS.core.indexOfNode(textNode, TEXT_NODE); } EPUBJS.core.indexOfElementNode = function(elementNode) { return EPUBJS.core.indexOfNode(elementNode, ELEMENT_NODE); } var EPUBJS = EPUBJS || {}; EPUBJS.reader = {}; EPUBJS.reader.plugins = {}; //-- Attach extra Controllers as plugins (like search?) (function(root, $) { var previousReader = root.ePubReader || {}; var ePubReader = root.ePubReader = function(path, options) { return new EPUBJS.Reader(path, options); }; //exports to multiple environments if (typeof define === 'function' && define.amd) { //AMD define(function(){ return Reader; }); } else if (typeof module != "undefined" && module.exports) { //Node module.exports = ePubReader; } })(window, jQuery); EPUBJS.Reader = function(bookPath, _options) { var reader = this; var book; var plugin; var $viewer = $("#viewer"); var search = window.location.search; var parameters; this.settings = EPUBJS.core.defaults(_options || {}, { bookPath : bookPath, restore : false, reload : false, bookmarks : undefined, annotations : undefined, contained : undefined, bookKey : undefined, styles : undefined, sidebarReflow: false, generatePagination: false, history: true }); // Overide options with search parameters if(search) { parameters = search.slice(1).split("&"); parameters.forEach(function(p){ var split = p.split("="); var name = split[0]; var value = split[1] || ''; reader.settings[name] = decodeURIComponent(value); }); } this.setBookKey(this.settings.bookPath); //-- This could be username + path or any unique string if(this.settings.restore && this.isSaved()) { this.applySavedSettings(); } this.settings.styles = this.settings.styles || { fontSize : "100%" }; this.book = book = new ePub(this.settings.bookPath, this.settings); this.offline = false; this.sidebarOpen = false; if(!this.settings.bookmarks) { this.settings.bookmarks = []; } if(!this.settings.annotations) { this.settings.annotations = []; } if(this.settings.generatePagination) { book.generatePagination($viewer.width(), $viewer.height()); } this.rendition = book.renderTo("viewer", { ignoreClass: "annotator-hl", width: "100%", height: "100%" }); if(this.settings.previousLocationCfi) { this.displayed = this.rendition.display(this.settings.previousLocationCfi); } else { this.displayed = this.rendition.display(); } book.ready.then(function () { reader.ReaderController = EPUBJS.reader.ReaderController.call(reader, book); reader.SettingsController = EPUBJS.reader.SettingsController.call(reader, book); reader.ControlsController = EPUBJS.reader.ControlsController.call(reader, book); reader.SidebarController = EPUBJS.reader.SidebarController.call(reader, book); reader.BookmarksController = EPUBJS.reader.BookmarksController.call(reader, book); reader.NotesController = EPUBJS.reader.NotesController.call(reader, book); window.addEventListener("hashchange", this.hashChanged.bind(this), false); document.addEventListener('keydown', this.adjustFontSize.bind(this), false); this.rendition.on("keydown", this.adjustFontSize.bind(this)); this.rendition.on("keydown", reader.ReaderController.arrowKeys.bind(this)); this.rendition.on("selected", this.selectedRange.bind(this)); }.bind(this)).then(function() { reader.ReaderController.hideLoader(); }.bind(this)); // Call Plugins for(plugin in EPUBJS.reader.plugins) { if(EPUBJS.reader.plugins.hasOwnProperty(plugin)) { reader[plugin] = EPUBJS.reader.plugins[plugin].call(reader, book); } } book.loaded.metadata.then(function(meta) { reader.MetaController = EPUBJS.reader.MetaController.call(reader, meta); }); book.loaded.navigation.then(function(navigation) { reader.TocController = EPUBJS.reader.TocController.call(reader, navigation); }); window.addEventListener("beforeunload", this.unload.bind(this), false); return this; }; EPUBJS.Reader.prototype.adjustFontSize = function(e) { var fontSize; var interval = 2; var PLUS = 187; var MINUS = 189; var ZERO = 48; var MOD = (e.ctrlKey || e.metaKey ); if(!this.settings.styles) return; if(!this.settings.styles.fontSize) { this.settings.styles.fontSize = "100%"; } fontSize = parseInt(this.settings.styles.fontSize.slice(0, -1)); if(MOD && e.keyCode == PLUS) { e.preventDefault(); this.book.setStyle("fontSize", (fontSize + interval) + "%"); } if(MOD && e.keyCode == MINUS){ e.preventDefault(); this.book.setStyle("fontSize", (fontSize - interval) + "%"); } if(MOD && e.keyCode == ZERO){ e.preventDefault(); this.book.setStyle("fontSize", "100%"); } }; EPUBJS.Reader.prototype.addBookmark = function(cfi) { var present = this.isBookmarked(cfi); if(present > -1 ) return; this.settings.bookmarks.push(cfi); this.trigger("reader:bookmarked", cfi); }; EPUBJS.Reader.prototype.removeBookmark = function(cfi) { var bookmark = this.isBookmarked(cfi); if( bookmark === -1 ) return; this.settings.bookmarks.splice(bookmark, 1); this.trigger("reader:unbookmarked", bookmark); }; EPUBJS.Reader.prototype.isBookmarked = function(cfi) { var bookmarks = this.settings.bookmarks; return bookmarks.indexOf(cfi); }; /* EPUBJS.Reader.prototype.searchBookmarked = function(cfi) { var bookmarks = this.settings.bookmarks, len = bookmarks.length, i; for(i = 0; i < len; i++) { if (bookmarks[i]['cfi'] === cfi) return i; } return -1; }; */ EPUBJS.Reader.prototype.clearBookmarks = function() { this.settings.bookmarks = []; }; //-- Notes EPUBJS.Reader.prototype.addNote = function(note) { this.settings.annotations.push(note); }; EPUBJS.Reader.prototype.removeNote = function(note) { var index = this.settings.annotations.indexOf(note); if( index === -1 ) return; delete this.settings.annotations[index]; }; EPUBJS.Reader.prototype.clearNotes = function() { this.settings.annotations = []; }; //-- Settings EPUBJS.Reader.prototype.setBookKey = function(identifier){ if(!this.settings.bookKey) { this.settings.bookKey = "epubjsreader:" + EPUBJS.VERSION + ":" + window.location.host + ":" + identifier; } return this.settings.bookKey; }; //-- Checks if the book setting can be retrieved from localStorage EPUBJS.Reader.prototype.isSaved = function(bookPath) { var storedSettings; if(!localStorage) { return false; } storedSettings = localStorage.getItem(this.settings.bookKey); if(storedSettings === null) { return false; } else { return true; } }; EPUBJS.Reader.prototype.removeSavedSettings = function() { if(!localStorage) { return false; } localStorage.removeItem(this.settings.bookKey); }; EPUBJS.Reader.prototype.applySavedSettings = function() { var stored; if(!localStorage) { return false; } try { stored = JSON.parse(localStorage.getItem(this.settings.bookKey)); } catch (e) { // parsing error of localStorage return false; } if(stored) { // Merge styles if(stored.styles) { this.settings.styles = EPUBJS.core.defaults(this.settings.styles || {}, stored.styles); } // Merge the rest this.settings = EPUBJS.core.defaults(this.settings, stored); return true; } else { return false; } }; EPUBJS.Reader.prototype.saveSettings = function(){ if(this.book) { this.settings.previousLocationCfi = this.rendition.currentLocation().start.cfi; } if(!localStorage) { return false; } localStorage.setItem(this.settings.bookKey, JSON.stringify(this.settings)); }; EPUBJS.Reader.prototype.unload = function(){ if(this.settings.restore && localStorage) { this.saveSettings(); } }; EPUBJS.Reader.prototype.hashChanged = function(){ var hash = window.location.hash.slice(1); this.rendition.display(hash); }; EPUBJS.Reader.prototype.selectedRange = function(cfiRange){ var cfiFragment = "#"+cfiRange; // Update the History Location if(this.settings.history && window.location.hash != cfiFragment) { // Add CFI fragment to the history history.pushState({}, '', cfiFragment); this.currentLocationCfi = cfiRange; } }; //-- Enable binding events to reader RSVP.EventTarget.mixin(EPUBJS.Reader.prototype); EPUBJS.reader.BookmarksController = function() { var reader = this; var book = this.book; var rendition = this.rendition; var $bookmarks = $("#bookmarksView"), $list = $bookmarks.find("#bookmarks"); var docfrag = document.createDocumentFragment(); var show = function() { $bookmarks.show(); }; var hide = function() { $bookmarks.hide(); }; var counter = 0; var createBookmarkItem = function(cfi) { var listitem = document.createElement("li"), link = document.createElement("a"); listitem.id = "bookmark-"+counter; listitem.classList.add('list_item'); var spineItem = book.spine.get(cfi); var tocItem; if (spineItem.index in book.navigation.toc) { tocItem = book.navigation.toc[spineItem.index]; link.textContent = tocItem.label; } else { link.textContent = cfi; } link.href = cfi; link.classList.add('bookmark_link'); link.addEventListener("click", function(event){ var cfi = this.getAttribute('href'); rendition.display(cfi); event.preventDefault(); }, false); listitem.appendChild(link); counter++; return listitem; }; this.settings.bookmarks.forEach(function(cfi) { var bookmark = createBookmarkItem(cfi); docfrag.appendChild(bookmark); }); $list.append(docfrag); this.on("reader:bookmarked", function(cfi) { var item = createBookmarkItem(cfi); $list.append(item); }); this.on("reader:unbookmarked", function(index) { var $item = $("#bookmark-"+index); $item.remove(); }); return { "show" : show, "hide" : hide }; }; EPUBJS.reader.ControlsController = function(book) { var reader = this; var rendition = this.rendition; var $store = $("#store"), $fullscreen = $("#fullscreen"), $fullscreenicon = $("#fullscreenicon"), $cancelfullscreenicon = $("#cancelfullscreenicon"), $slider = $("#slider"), $main = $("#main"), $sidebar = $("#sidebar"), $settings = $("#setting"), $bookmark = $("#bookmark"); /* var goOnline = function() { reader.offline = false; // $store.attr("src", $icon.data("save")); }; var goOffline = function() { reader.offline = true; // $store.attr("src", $icon.data("saved")); }; var fullscreen = false; book.on("book:online", goOnline); book.on("book:offline", goOffline); */ $slider.on("click", function () { if(reader.sidebarOpen) { reader.SidebarController.hide(); $slider.addClass("icon-menu"); $slider.removeClass("icon-right"); } else { reader.SidebarController.show(); $slider.addClass("icon-right"); $slider.removeClass("icon-menu"); } }); if(typeof screenfull !== 'undefined') { $fullscreen.on("click", function() { screenfull.toggle($('#container')[0]); }); if(screenfull.raw) { document.addEventListener(screenfull.raw.fullscreenchange, function() { fullscreen = screenfull.isFullscreen; if(fullscreen) { $fullscreen .addClass("icon-resize-small") .removeClass("icon-resize-full"); } else { $fullscreen .addClass("icon-resize-full") .removeClass("icon-resize-small"); } }); } } $settings.on("click", function() { reader.SettingsController.show(); }); $bookmark.on("click", function() { var cfi = reader.rendition.currentLocation().start.cfi; var bookmarked = reader.isBookmarked(cfi); if(bookmarked === -1) { //-- Add bookmark reader.addBookmark(cfi); $bookmark .addClass("icon-bookmark") .removeClass("icon-bookmark-empty"); } else { //-- Remove Bookmark reader.removeBookmark(cfi); $bookmark .removeClass("icon-bookmark") .addClass("icon-bookmark-empty"); } }); rendition.on('relocated', function(location){ var cfi = location.start.cfi; var cfiFragment = "#" + cfi; //-- Check if bookmarked var bookmarked = reader.isBookmarked(cfi); if(bookmarked === -1) { //-- Not bookmarked $bookmark .removeClass("icon-bookmark") .addClass("icon-bookmark-empty"); } else { //-- Bookmarked $bookmark .addClass("icon-bookmark") .removeClass("icon-bookmark-empty"); } reader.currentLocationCfi = cfi; // Update the History Location if(reader.settings.history && window.location.hash != cfiFragment) { // Add CFI fragment to the history history.pushState({}, '', cfiFragment); } }); return { }; }; EPUBJS.reader.MetaController = function(meta) { var title = meta.title, author = meta.creator; var $title = $("#book-title"), $author = $("#chapter-title"), $dash = $("#title-seperator"); document.title = title+" – "+author; $title.html(title); $author.html(author); $dash.show(); }; EPUBJS.reader.NotesController = function() { var book = this.book; var rendition = this.rendition; var reader = this; var $notesView = $("#notesView"); var $notes = $("#notes"); var $text = $("#note-text"); var $anchor = $("#note-anchor"); var annotations = reader.settings.annotations; var renderer = book.renderer; var popups = []; var epubcfi = new ePub.CFI(); var show = function() { $notesView.show(); }; var hide = function() { $notesView.hide(); } var insertAtPoint = function(e) { var range; var textNode; var offset; var doc = book.renderer.doc; var cfi; var annotation; // standard if (doc.caretPositionFromPoint) { range = doc.caretPositionFromPoint(e.clientX, e.clientY); textNode = range.offsetNode; offset = range.offset; // WebKit } else if (doc.caretRangeFromPoint) { range = doc.caretRangeFromPoint(e.clientX, e.clientY); textNode = range.startContainer; offset = range.startOffset; } if (textNode.nodeType !== 3) { for (var i=0; i < textNode.childNodes.length; i++) { if (textNode.childNodes[i].nodeType == 3) { textNode = textNode.childNodes[i]; break; } } } // Find the end of the sentance offset = textNode.textContent.indexOf(".", offset); if(offset === -1){ offset = textNode.length; // Last item } else { offset += 1; // After the period } cfi = epubcfi.generateCfiFromTextNode(textNode, offset, book.renderer.currentChapter.cfiBase); annotation = { annotatedAt: new Date(), anchor: cfi, body: $text.val() } // add to list reader.addNote(annotation); // attach addAnnotation(annotation); placeMarker(annotation); // clear $text.val(''); $anchor.text("Attach"); $text.prop("disabled", false); rendition.off("click", insertAtPoint); }; var addAnnotation = function(annotation){ var note = document.createElement("li"); var link = document.createElement("a"); note.innerHTML = annotation.body; // note.setAttribute("ref", annotation.anchor); link.innerHTML = " context &#187;"; link.href = "#"+annotation.anchor; link.onclick = function(){ rendition.display(annotation.anchor); return false; }; note.appendChild(link); $notes.append(note); }; var placeMarker = function(annotation){ var doc = book.renderer.doc; var marker = document.createElement("span"); var mark = document.createElement("a"); marker.classList.add("footnotesuperscript", "reader_generated"); marker.style.verticalAlign = "super"; marker.style.fontSize = ".75em"; // marker.style.position = "relative"; marker.style.lineHeight = "1em"; // mark.style.display = "inline-block"; mark.style.padding = "2px"; mark.style.backgroundColor = "#fffa96"; mark.style.borderRadius = "5px"; mark.style.cursor = "pointer"; marker.id = "note-"+EPUBJS.core.uuid(); mark.innerHTML = annotations.indexOf(annotation) + 1 + "[Reader]"; marker.appendChild(mark); epubcfi.addMarker(annotation.anchor, doc, marker); markerEvents(marker, annotation.body); } var markerEvents = function(item, txt){ var id = item.id; var showPop = function(){ var poppos, iheight = renderer.height, iwidth = renderer.width, tip, pop, maxHeight = 225, itemRect, left, top, pos; //-- create a popup with endnote inside of it if(!popups[id]) { popups[id] = document.createElement("div"); popups[id].setAttribute("class", "popup"); pop_content = document.createElement("div"); popups[id].appendChild(pop_content); pop_content.innerHTML = txt; pop_content.setAttribute("class", "pop_content"); renderer.render.document.body.appendChild(popups[id]); //-- TODO: will these leak memory? - Fred popups[id].addEventListener("mouseover", onPop, false); popups[id].addEventListener("mouseout", offPop, false); //-- Add hide on page change rendition.on("locationChanged", hidePop, this); rendition.on("locationChanged", offPop, this); // chapter.book.on("renderer:chapterDestroy", hidePop, this); } pop = popups[id]; //-- get location of item itemRect = item.getBoundingClientRect(); left = itemRect.left; top = itemRect.top; //-- show the popup pop.classList.add("show"); //-- locations of popup popRect = pop.getBoundingClientRect(); //-- position the popup pop.style.left = left - popRect.width / 2 + "px"; pop.style.top = top + "px"; //-- Adjust max height if(maxHeight > iheight / 2.5) { maxHeight = iheight / 2.5; pop_content.style.maxHeight = maxHeight + "px"; } //-- switch above / below if(popRect.height + top >= iheight - 25) { pop.style.top = top - popRect.height + "px"; pop.classList.add("above"); }else{ pop.classList.remove("above"); } //-- switch left if(left - popRect.width <= 0) { pop.style.left = left + "px"; pop.classList.add("left"); }else{ pop.classList.remove("left"); } //-- switch right if(left + popRect.width / 2 >= iwidth) { //-- TEMP MOVE: 300 pop.style.left = left - 300 + "px"; popRect = pop.getBoundingClientRect(); pop.style.left = left - popRect.width + "px"; //-- switch above / below again if(popRect.height + top >= iheight - 25) { pop.style.top = top - popRect.height + "px"; pop.classList.add("above"); }else{ pop.classList.remove("above"); } pop.classList.add("right"); }else{ pop.classList.remove("right"); } } var onPop = function(){ popups[id].classList.add("on"); } var offPop = function(){ popups[id].classList.remove("on"); } var hidePop = function(){ setTimeout(function(){ popups[id].classList.remove("show"); }, 100); } var openSidebar = function(){ reader.ReaderController.slideOut(); show(); }; item.addEventListener("mouseover", showPop, false); item.addEventListener("mouseout", hidePop, false); item.addEventListener("click", openSidebar, false); } $anchor.on("click", function(e){ $anchor.text("Cancel"); $text.prop("disabled", "true"); // listen for selection rendition.on("click", insertAtPoint); }); annotations.forEach(function(note) { addAnnotation(note); }); /* renderer.registerHook("beforeChapterDisplay", function(callback, renderer){ var chapter = renderer.currentChapter; annotations.forEach(function(note) { var cfi = epubcfi.parse(note.anchor); if(cfi.spinePos === chapter.spinePos) { try { placeMarker(note); } catch(e) { console.log("anchoring failed", note.anchor); } } }); callback(); }, true); */ return { "show" : show, "hide" : hide }; }; EPUBJS.reader.ReaderController = function(book) { var $main = $("#main"), $divider = $("#divider"), $loader = $("#loader"), $next = $("#next"), $prev = $("#prev"); var reader = this; var book = this.book; var rendition = this.rendition; var slideIn = function() { var currentPosition = rendition.currentLocation().start.cfi; if (reader.settings.sidebarReflow){ $main.removeClass('single'); $main.one("transitionend", function(){ rendition.resize(); }); } else { $main.removeClass("closed"); } }; var slideOut = function() { var location = rendition.currentLocation(); if (!location) { return; } var currentPosition = location.start.cfi; if (reader.settings.sidebarReflow){ $main.addClass('single'); $main.one("transitionend", function(){ rendition.resize(); }); } else { $main.addClass("closed"); } }; var showLoader = function() { $loader.show(); hideDivider(); }; var hideLoader = function() { $loader.hide(); //-- If the book is using spreads, show the divider // if(book.settings.spreads) { // showDivider(); // } }; var showDivider = function() { $divider.addClass("show"); }; var hideDivider = function() { $divider.removeClass("show"); }; var keylock = false; var arrowKeys = function(e) { if(e.keyCode == 37) { if(book.package.metadata.direction === "rtl") { rendition.next(); } else { rendition.prev(); } $prev.addClass("active"); keylock = true; setTimeout(function(){ keylock = false; $prev.removeClass("active"); }, 100); e.preventDefault(); } if(e.keyCode == 39) { if(book.package.metadata.direction === "rtl") { rendition.prev(); } else { rendition.next(); } $next.addClass("active"); keylock = true; setTimeout(function(){ keylock = false; $next.removeClass("active"); }, 100); e.preventDefault(); } } document.addEventListener('keydown', arrowKeys, false); $next.on("click", function(e){ if(book.package.metadata.direction === "rtl") { rendition.prev(); } else { rendition.next(); } e.preventDefault(); }); $prev.on("click", function(e){ if(book.package.metadata.direction === "rtl") { rendition.next(); } else { rendition.prev(); } e.preventDefault(); }); rendition.on("layout", function(props){ if(props.spread === true) { showDivider(); } else { hideDivider(); } }); rendition.on('relocated', function(location){ if (location.atStart) { $prev.addClass("disabled"); } if (location.atEnd) { $next.addClass("disabled"); } }); return { "slideOut" : slideOut, "slideIn" : slideIn, "showLoader" : showLoader, "hideLoader" : hideLoader, "showDivider" : showDivider, "hideDivider" : hideDivider, "arrowKeys" : arrowKeys }; }; EPUBJS.reader.SettingsController = function() { var book = this.book; var reader = this; var $settings = $("#settings-modal"), $overlay = $(".overlay"); var show = function() { $settings.addClass("md-show"); }; var hide = function() { $settings.removeClass("md-show"); }; var $sidebarReflowSetting = $('#sidebarReflow'); $sidebarReflowSetting.on('click', function() { reader.settings.sidebarReflow = !reader.settings.sidebarReflow; }); $settings.find(".closer").on("click", function() { hide(); }); $overlay.on("click", function() { hide(); }); return { "show" : show, "hide" : hide }; }; EPUBJS.reader.SidebarController = function(book) { var reader = this; var $sidebar = $("#sidebar"), $panels = $("#panels"); var activePanel = "Toc"; var changePanelTo = function(viewName) { var controllerName = viewName + "Controller"; if(activePanel == viewName || typeof reader[controllerName] === 'undefined' ) return; reader[activePanel+ "Controller"].hide(); reader[controllerName].show(); activePanel = viewName; $panels.find('.active').removeClass("active"); $panels.find("#show-" + viewName ).addClass("active"); }; var getActivePanel = function() { return activePanel; }; var show = function() { reader.sidebarOpen = true; reader.ReaderController.slideOut(); $sidebar.addClass("open"); } var hide = function() { reader.sidebarOpen = false; reader.ReaderController.slideIn(); $sidebar.removeClass("open"); } $panels.find(".show_view").on("click", function(event) { var view = $(this).data("view"); changePanelTo(view); event.preventDefault(); }); return { 'show' : show, 'hide' : hide, 'getActivePanel' : getActivePanel, 'changePanelTo' : changePanelTo }; }; EPUBJS.reader.TocController = function(toc) { var book = this.book; var rendition = this.rendition; var $list = $("#tocView"), docfrag = document.createDocumentFragment(); var currentChapter = false; var generateTocItems = function(toc, level) { var container = document.createElement("ul"); if(!level) level = 1; toc.forEach(function(chapter) { var listitem = document.createElement("li"), link = document.createElement("a"); toggle = document.createElement("a"); var subitems; listitem.id = "toc-"+chapter.id; listitem.classList.add('list_item'); link.textContent = chapter.label; link.href = chapter.href; link.classList.add('toc_link'); listitem.appendChild(link); if(chapter.subitems && chapter.subitems.length > 0) { level++; subitems = generateTocItems(chapter.subitems, level); toggle.classList.add('toc_toggle'); listitem.insertBefore(toggle, link); listitem.appendChild(subitems); } container.appendChild(listitem); }); return container; }; var onShow = function() { $list.show(); }; var onHide = function() { $list.hide(); }; var chapterChange = function(e) { var id = e.id, $item = $list.find("#toc-"+id), $current = $list.find(".currentChapter"), $open = $list.find('.openChapter'); if($item.length){ if($item != $current && $item.has(currentChapter).length > 0) { $current.removeClass("currentChapter"); } $item.addClass("currentChapter"); // $open.removeClass("openChapter"); $item.parents('li').addClass("openChapter"); } }; rendition.on('renderered', chapterChange); var tocitems = generateTocItems(toc); docfrag.appendChild(tocitems); $list.append(docfrag); $list.find(".toc_link").on("click", function(event){ var url = this.getAttribute('href'); event.preventDefault(); //-- Provide the Book with the url to show // The Url must be found in the books manifest rendition.display(url); $list.find(".currentChapter") .addClass("openChapter") .removeClass("currentChapter"); $(this).parent('li').addClass("currentChapter"); }); $list.find(".toc_toggle").on("click", function(event){ var $el = $(this).parent('li'), open = $el.hasClass("openChapter"); event.preventDefault(); if(open){ $el.removeClass("openChapter"); } else { $el.addClass("openChapter"); } }); return { "show" : onShow, "hide" : onHide }; }; //# sourceMappingURL=reader.js.map
yushen-duihua-1to5
/yushen_duihua_1to5-2022.10.3.0-py3-none-any.whl/YushenDuihua1to5/js/reader.js
reader.js
window.hypothesisConfig = function() { var Annotator = window.Annotator; var $main = $("#main"); function EpubAnnotationSidebar(elem, options) { options = { server: true, origin: true, showHighlights: true, Toolbar: {container: '#annotation-controls'} } Annotator.Host.call(this, elem, options); } EpubAnnotationSidebar.prototype = Object.create(Annotator.Host.prototype); EpubAnnotationSidebar.prototype.show = function() { this.frame.css({ 'margin-left': (-1 * this.frame.width()) + "px" }); this.frame.removeClass('annotator-collapsed'); if (!$main.hasClass('single')) { $main.addClass("single"); this.toolbar.find('[name=sidebar-toggle]').removeClass('h-icon-chevron-left').addClass('h-icon-chevron-right'); this.setVisibleHighlights(true); } }; EpubAnnotationSidebar.prototype.hide = function() { this.frame.css({ 'margin-left': '' }); this.frame.addClass('annotator-collapsed'); if ($main.hasClass('single')) { $main.removeClass("single"); this.toolbar.find('[name=sidebar-toggle]').removeClass('h-icon-chevron-right').addClass('h-icon-chevron-left'); this.setVisibleHighlights(false); } }; return { constructor: EpubAnnotationSidebar, } }; // This is the Epub.js plugin. Annotations are updated on location change. EPUBJS.reader.plugins.HypothesisController = function (Book) { var reader = this; var $main = $("#main"); var updateAnnotations = function () { var annotator = Book.renderer.render.window.annotator; if (annotator && annotator.constructor.$) { var annotations = getVisibleAnnotations(annotator.constructor.$); annotator.showAnnotations(annotations) } }; var getVisibleAnnotations = function ($) { var width = Book.renderer.render.iframe.clientWidth; return $('.annotator-hl').map(function() { var $this = $(this), left = this.getBoundingClientRect().left; if (left >= 0 && left <= width) { return $this.data('annotation'); } }).get(); }; Book.on("renderer:locationChanged", updateAnnotations); return {} };
yushen-duihua-1to5
/yushen_duihua_1to5-2022.10.3.0-py3-none-any.whl/YushenDuihua1to5/js/plugins/hypothesis.js
hypothesis.js
EPUBJS.reader.search = {}; // Search Server -- https://github.com/futurepress/epubjs-search EPUBJS.reader.search.SERVER = "https://pacific-cliffs-3579.herokuapp.com"; EPUBJS.reader.search.request = function(q, callback) { var fetch = $.ajax({ dataType: "json", url: EPUBJS.reader.search.SERVER + "/search?q=" + encodeURIComponent(q) }); fetch.fail(function(err) { console.error(err); }); fetch.done(function(results) { callback(results); }); }; EPUBJS.reader.plugins.SearchController = function(Book) { var reader = this; var $searchBox = $("#searchBox"), $searchResults = $("#searchResults"), $searchView = $("#searchView"), iframeDoc; var searchShown = false; var onShow = function() { query(); searchShown = true; $searchView.addClass("shown"); }; var onHide = function() { searchShown = false; $searchView.removeClass("shown"); }; var query = function() { var q = $searchBox.val(); if(q == '') { return; } $searchResults.empty(); $searchResults.append("<li><p>Searching...</p></li>"); EPUBJS.reader.search.request(q, function(data) { var results = data.results; $searchResults.empty(); if(iframeDoc) { $(iframeDoc).find('body').unhighlight(); } if(results.length == 0) { $searchResults.append("<li><p>No Results Found</p></li>"); return; } iframeDoc = $("#viewer iframe")[0].contentDocument; $(iframeDoc).find('body').highlight(q, { element: 'span' }); results.forEach(function(result) { var $li = $("<li></li>"); var $item = $("<a href='"+result.href+"' data-cfi='"+result.cfi+"'><span>"+result.title+"</span><p>"+result.highlight+"</p></a>"); $item.on("click", function(e) { var $this = $(this), cfi = $this.data("cfi"); e.preventDefault(); Book.gotoCfi(cfi+"/1:0"); Book.on("renderer:chapterDisplayed", function() { iframeDoc = $("#viewer iframe")[0].contentDocument; $(iframeDoc).find('body').highlight(q, { element: 'span' }); }) }); $li.append($item); $searchResults.append($li); }); }); }; $searchBox.on("search", function(e) { var q = $searchBox.val(); //-- SearchBox is empty or cleared if(q == '') { $searchResults.empty(); if(reader.SidebarController.getActivePanel() == "Search") { reader.SidebarController.changePanelTo("Toc"); } $(iframeDoc).find('body').unhighlight(); iframeDoc = false; return; } reader.SidebarController.changePanelTo("Search"); e.preventDefault(); }); return { "show" : onShow, "hide" : onHide }; };
yushen-duihua-1to5
/yushen_duihua_1to5-2022.10.3.0-py3-none-any.whl/YushenDuihua1to5/js/plugins/search.js
search.js
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d=a("./utils"),e=a("./support"),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a){for(var b,c,e,g,h,i,j,k=[],l=0,m=a.length,n=m,o="string"!==d.getTypeOf(a);l<a.length;)n=m-l,o?(b=a[l++],c=l<m?a[l++]:0,e=l<m?a[l++]:0):(b=a.charCodeAt(l++),c=l<m?a.charCodeAt(l++):0,e=l<m?a.charCodeAt(l++):0),g=b>>2,h=(3&b)<<4|c>>4,i=n>1?(15&c)<<2|e>>6:64,j=n>2?63&e:64,k.push(f.charAt(g)+f.charAt(h)+f.charAt(i)+f.charAt(j));return k.join("")},c.decode=function(a){var b,c,d,g,h,i,j,k=0,l=0,m="data:";if(a.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");var n=3*a.length/4;if(a.charAt(a.length-1)===f.charAt(64)&&n--,a.charAt(a.length-2)===f.charAt(64)&&n--,n%1!==0)throw new Error("Invalid base64 input, bad content length.");var o;for(o=e.uint8array?new Uint8Array(0|n):new Array(0|n);k<a.length;)g=f.indexOf(a.charAt(k++)),h=f.indexOf(a.charAt(k++)),i=f.indexOf(a.charAt(k++)),j=f.indexOf(a.charAt(k++)),b=g<<2|h>>4,c=(15&h)<<4|i>>2,d=(3&i)<<6|j,o[l++]=b,64!==i&&(o[l++]=c),64!==j&&(o[l++]=d);return o}},{"./support":30,"./utils":32}],2:[function(a,b,c){"use strict";function d(a,b,c,d,e){this.compressedSize=a,this.uncompressedSize=b,this.crc32=c,this.compression=d,this.compressedContent=e}var e=a("./external"),f=a("./stream/DataWorker"),g=a("./stream/DataLengthProbe"),h=a("./stream/Crc32Probe"),g=a("./stream/DataLengthProbe");d.prototype={getContentWorker:function(){var a=new f(e.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new g("data_length")),b=this;return a.on("end",function(){if(this.streamInfo.data_length!==b.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),a},getCompressedWorker:function(){return new f(e.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(a,b,c){return a.pipe(new h).pipe(new g("uncompressedSize")).pipe(b.compressWorker(c)).pipe(new g("compressedSize")).withStreamInfo("compression",b)},b.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(a,b,c){"use strict";var d=a("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(a){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},c.DEFLATE=a("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=h,f=d+c;a^=-1;for(var g=d;g<f;g++)a=a>>>8^e[255&(a^b[g])];return a^-1}function f(a,b,c,d){var e=h,f=d+c;a^=-1;for(var g=d;g<f;g++)a=a>>>8^e[255&(a^b.charCodeAt(g))];return a^-1}var g=a("./utils"),h=d();b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var c="string"!==g.getTypeOf(a);return c?e(0|b,a,a.length,0):f(0|b,a,a.length,0)}},{"./utils":32}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(a,b,c){"use strict";var d=null;d="undefined"!=typeof Promise?Promise:a("lie"),b.exports={Promise:d}},{lie:58}],7:[function(a,b,c){"use strict";function d(a,b){h.call(this,"FlateWorker/"+a),this._pako=null,this._pakoAction=a,this._pakoOptions=b,this.meta={}}var e="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,f=a("pako"),g=a("./utils"),h=a("./stream/GenericWorker"),i=e?"uint8array":"array";c.magic="\b\0",g.inherits(d,h),d.prototype.processChunk=function(a){this.meta=a.meta,null===this._pako&&this._createPako(),this._pako.push(g.transformTo(i,a.data),!1)},d.prototype.flush=function(){h.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){h.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var a=this;this._pako.onData=function(b){a.push({data:b,meta:a.meta})}},c.compressWorker=function(a){return new d("Deflate",a)},c.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:59}],8:[function(a,b,c){"use strict";function d(a,b,c,d){f.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=c,this.encodeFileName=d,this.streamFiles=a,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}var e=a("../utils"),f=a("../stream/GenericWorker"),g=a("../utf8"),h=a("../crc32"),i=a("../signature"),j=function(a,b){var c,d="";for(c=0;c<b;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},k=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},l=function(a,b){return 63&(a||0)},m=function(a,b,c,d,f,m){var n,o,p=a.file,q=a.compression,r=m!==g.utf8encode,s=e.transformTo("string",m(p.name)),t=e.transformTo("string",g.utf8encode(p.name)),u=p.comment,v=e.transformTo("string",m(u)),w=e.transformTo("string",g.utf8encode(u)),x=t.length!==p.name.length,y=w.length!==u.length,z="",A="",B="",C=p.dir,D=p.date,E={crc32:0,compressedSize:0,uncompressedSize:0};b&&!c||(E.crc32=a.crc32,E.compressedSize=a.compressedSize,E.uncompressedSize=a.uncompressedSize);var F=0;b&&(F|=8),r||!x&&!y||(F|=2048);var G=0,H=0;C&&(G|=16),"UNIX"===f?(H=798,G|=k(p.unixPermissions,C)):(H=20,G|=l(p.dosPermissions,C)),n=D.getUTCHours(),n<<=6,n|=D.getUTCMinutes(),n<<=5,n|=D.getUTCSeconds()/2,o=D.getUTCFullYear()-1980,o<<=4,o|=D.getUTCMonth()+1,o<<=5,o|=D.getUTCDate(),x&&(A=j(1,1)+j(h(s),4)+t,z+="up"+j(A.length,2)+A),y&&(B=j(1,1)+j(h(v),4)+w,z+="uc"+j(B.length,2)+B);var I="";I+="\n\0",I+=j(F,2),I+=q.magic,I+=j(n,2),I+=j(o,2),I+=j(E.crc32,4),I+=j(E.compressedSize,4),I+=j(E.uncompressedSize,4),I+=j(s.length,2),I+=j(z.length,2);var J=i.LOCAL_FILE_HEADER+I+s+z,K=i.CENTRAL_FILE_HEADER+j(H,2)+I+j(v.length,2)+"\0\0\0\0"+j(G,4)+j(d,4)+s+z+v;return{fileRecord:J,dirRecord:K}},n=function(a,b,c,d,f){var g="",h=e.transformTo("string",f(d));return g=i.CENTRAL_DIRECTORY_END+"\0\0\0\0"+j(a,2)+j(a,2)+j(b,4)+j(c,4)+j(h.length,2)+h},o=function(a){var b="";return b=i.DATA_DESCRIPTOR+j(a.crc32,4)+j(a.compressedSize,4)+j(a.uncompressedSize,4)};e.inherits(d,f),d.prototype.push=function(a){var b=a.meta.percent||0,c=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(a):(this.bytesWritten+=a.data.length,f.prototype.push.call(this,{data:a.data,meta:{currentFile:this.currentFile,percent:c?(b+100*(c-d-1))/c:100}}))},d.prototype.openedSource=function(a){this.currentSourceOffset=this.bytesWritten,this.currentFile=a.file.name;var b=this.streamFiles&&!a.file.dir;if(b){var c=m(a,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:c.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(a){this.accumulate=!1;var b=this.streamFiles&&!a.file.dir,c=m(a,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(c.dirRecord),b)this.push({data:o(a),meta:{percent:100}});else for(this.push({data:c.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var a=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var c=this.bytesWritten-a,d=n(this.dirRecords.length,c,a,this.zipComment,this.encodeFileName);this.push({data:d,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(a){this._sources.push(a);var b=this;return a.on("data",function(a){b.processChunk(a)}),a.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),a.on("error",function(a){b.error(a)}),this},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(a){var b=this._sources;if(!f.prototype.error.call(this,a))return!1;for(var c=0;c<b.length;c++)try{b[c].error(a)}catch(a){}return!0},d.prototype.lock=function(){f.prototype.lock.call(this);for(var a=this._sources,b=0;b<a.length;b++)a[b].lock()},b.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(a,b,c){"use strict";var d=a("../compressions"),e=a("./ZipFileWorker"),f=function(a,b){var c=a||b,e=d[c];if(!e)throw new Error(c+" is not a valid compression method !");return e};c.generateWorker=function(a,b,c){var d=new e(b.streamFiles,c,b.platform,b.encodeFileName),g=0;try{a.forEach(function(a,c){g++;var e=f(c.options.compression,b.compression),h=c.options.compressionOptions||b.compressionOptions||{},i=c.dir,j=c.date;c._compressWorker(e,h).withStreamInfo("file",{name:a,dir:i,date:j,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(d)}),d.entriesCount=g}catch(h){d.error(h)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(a,b,c){"use strict";function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}d.prototype=a("./object"),d.prototype.loadAsync=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.version="3.1.5",d.loadAsync=function(a,b){return(new d).loadAsync(a,b)},d.external=a("./external"),b.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(a,b,c){"use strict";function d(a){return new f.Promise(function(b,c){var d=a.decompressed.getContentWorker().pipe(new i);d.on("error",function(a){c(a)}).on("end",function(){d.streamInfo.crc32!==a.decompressed.crc32?c(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}var e=a("./utils"),f=a("./external"),g=a("./utf8"),e=a("./utils"),h=a("./zipEntries"),i=a("./stream/Crc32Probe"),j=a("./nodejsUtils");b.exports=function(a,b){var c=this;return b=e.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),j.isNode&&j.isStream(a)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):e.prepareContent("the loaded zip file",a,!0,b.optimizedBinaryString,b.base64).then(function(a){var c=new h(b);return c.load(a),c}).then(function(a){var c=[f.Promise.resolve(a)],e=a.files;if(b.checkCRC32)for(var g=0;g<e.length;g++)c.push(d(e[g]));return f.Promise.all(c)}).then(function(a){for(var d=a.shift(),e=d.files,f=0;f<e.length;f++){var g=e[f];c.file(g.fileNameStr,g.decompressed,{binary:!0,optimizedBinaryString:!0,date:g.date,dir:g.dir,comment:g.fileCommentStr.length?g.fileCommentStr:null,unixPermissions:g.unixPermissions,dosPermissions:g.dosPermissions,createFolders:b.createFolders})}return d.zipComment.length&&(c.comment=d.zipComment),c})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(a,b,c){"use strict";function d(a,b){f.call(this,"Nodejs stream input adapter for "+a),this._upstreamEnded=!1,this._bindStream(b)}var e=a("../utils"),f=a("../stream/GenericWorker");e.inherits(d,f),d.prototype._bindStream=function(a){var b=this;this._stream=a,a.pause(),a.on("data",function(a){b.push({data:a,meta:{percent:0}})}).on("error",function(a){b.isPaused?this.generatedError=a:b.error(a)}).on("end",function(){b.isPaused?b._upstreamEnded=!0:b.end()})},d.prototype.pause=function(){return!!f.prototype.pause.call(this)&&(this._stream.pause(),!0)},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},b.exports=d},{"../stream/GenericWorker":28,"../utils":32}],13:[function(a,b,c){"use strict";function d(a,b,c){e.call(this,b),this._helper=a;var d=this;a.on("data",function(a,b){d.push(a)||d._helper.pause(),c&&c(b)}).on("error",function(a){d.emit("error",a)}).on("end",function(){d.push(null)})}var e=a("readable-stream").Readable,f=a("../utils");f.inherits(d,e),d.prototype._read=function(){this._helper.resume()},b.exports=d},{"../utils":32,"readable-stream":16}],14:[function(a,b,c){"use strict";b.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(a,b){return new Buffer(a,b)},allocBuffer:function(a){return Buffer.alloc?Buffer.alloc(a):new Buffer(a)},isBuffer:function(a){return Buffer.isBuffer(a)},isStream:function(a){return a&&"function"==typeof a.on&&"function"==typeof a.pause&&"function"==typeof a.resume}}},{}],15:[function(a,b,c){"use strict";function d(a){return"[object RegExp]"===Object.prototype.toString.call(a)}var e=a("./utf8"),f=a("./utils"),g=a("./stream/GenericWorker"),h=a("./stream/StreamHelper"),i=a("./defaults"),j=a("./compressedObject"),k=a("./zipObject"),l=a("./generate"),m=a("./nodejsUtils"),n=a("./nodejs/NodejsStreamInputAdapter"),o=function(a,b,c){var d,e=f.getTypeOf(b),h=f.extend(c||{},i);h.date=h.date||new Date,null!==h.compression&&(h.compression=h.compression.toUpperCase()),"string"==typeof h.unixPermissions&&(h.unixPermissions=parseInt(h.unixPermissions,8)),h.unixPermissions&&16384&h.unixPermissions&&(h.dir=!0),h.dosPermissions&&16&h.dosPermissions&&(h.dir=!0),h.dir&&(a=q(a)),h.createFolders&&(d=p(a))&&r.call(this,d,!0);var l="string"===e&&h.binary===!1&&h.base64===!1;c&&"undefined"!=typeof c.binary||(h.binary=!l);var o=b instanceof j&&0===b.uncompressedSize;(o||h.dir||!b||0===b.length)&&(h.base64=!1,h.binary=!0,b="",h.compression="STORE",e="string");var s=null;s=b instanceof j||b instanceof g?b:m.isNode&&m.isStream(b)?new n(a,b):f.prepareContent(a,b,h.binary,h.optimizedBinaryString,h.base64);var t=new k(a,s,h);this.files[a]=t},p=function(a){"/"===a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},q=function(a){return"/"!==a.slice(-1)&&(a+="/"),a},r=function(a,b){return b="undefined"!=typeof b?b:i.createFolders,a=q(a),this.files[a]||o.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},s={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(a){var b,c,d;for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],c=b.slice(this.root.length,b.length),c&&b.slice(0,this.root.length)===this.root&&a(c,d))},filter:function(a){var b=[];return this.forEach(function(c,d){a(c,d)&&b.push(d)}),b},file:function(a,b,c){if(1===arguments.length){if(d(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}var f=this.files[this.root+a];return f&&!f.dir?f:null}return a=this.root+a,o.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=r.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!==a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(a){var b,c={};try{if(c=f.extend(a||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:e.utf8encode}),c.type=c.type.toLowerCase(),c.compression=c.compression.toUpperCase(),"binarystring"===c.type&&(c.type="string"),!c.type)throw new Error("No output type specified.");f.checkSupport(c.type),"darwin"!==c.platform&&"freebsd"!==c.platform&&"linux"!==c.platform&&"sunos"!==c.platform||(c.platform="UNIX"),"win32"===c.platform&&(c.platform="DOS");var d=c.comment||this.comment||"";b=l.generateWorker(this,c,d)}catch(i){b=new g("error"),b.error(i)}return new h(b,c.type||"string",c.mimeType)},generateAsync:function(a,b){return this.generateInternalStream(a).accumulate(b)},generateNodeStream:function(a,b){return a=a||{},a.type||(a.type="nodebuffer"),this.generateInternalStream(a).toNodejsStream(b)}};b.exports=s},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(a,b,c){b.exports=a("stream")},{stream:void 0}],17:[function(a,b,c){"use strict";function d(a){e.call(this,a);for(var b=0;b<this.data.length;b++)a[b]=255&a[b]}var e=a("./DataReader"),f=a("../utils");f.inherits(d,e),d.prototype.byteAt=function(a){return this.data[this.zero+a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f-this.zero;return-1},d.prototype.readAndCheckSignature=function(a){var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.readData(4);return b===f[0]&&c===f[1]&&d===f[2]&&e===f[3]},d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return[];var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./DataReader":18}],18:[function(a,b,c){"use strict";function d(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}var e=a("../utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readAndCheckSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},b.exports=d},{"../utils":32}],19:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./Uint8ArrayReader"),f=a("../utils");f.inherits(d,e),d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./DataReader"),f=a("../utils");f.inherits(d,e),d.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},d.prototype.readAndCheckSignature=function(a){var b=this.readData(4);return a===b},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./DataReader":18}],21:[function(a,b,c){"use strict";function d(a){e.call(this,a)}var e=a("./ArrayReader"),f=a("../utils");f.inherits(d,e),d.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,b},b.exports=d},{"../utils":32,"./ArrayReader":17}],22:[function(a,b,c){"use strict";var d=a("../utils"),e=a("../support"),f=a("./ArrayReader"),g=a("./StringReader"),h=a("./NodeBufferReader"),i=a("./Uint8ArrayReader");b.exports=function(a){var b=d.getTypeOf(a);return d.checkSupport(b),"string"!==b||e.uint8array?"nodebuffer"===b?new h(a):e.uint8array?new i(d.transformTo("uint8array",a)):new f(d.transformTo("array",a)):new g(a)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],24:[function(a,b,c){"use strict";function d(a){e.call(this,"ConvertWorker to "+a),this.destType=a}var e=a("./GenericWorker"),f=a("../utils");f.inherits(d,e),d.prototype.processChunk=function(a){this.push({data:f.transformTo(this.destType,a.data),meta:a.meta})},b.exports=d},{"../utils":32,"./GenericWorker":28}],25:[function(a,b,c){"use strict";function d(){e.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var e=a("./GenericWorker"),f=a("../crc32"),g=a("../utils");g.inherits(d,e),d.prototype.processChunk=function(a){this.streamInfo.crc32=f(a.data,this.streamInfo.crc32||0),this.push(a)},b.exports=d},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(a,b,c){"use strict";function d(a){f.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}var e=a("../utils"),f=a("./GenericWorker");e.inherits(d,f),d.prototype.processChunk=function(a){if(a){var b=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=b+a.data.length}f.prototype.processChunk.call(this,a)},b.exports=d},{"../utils":32,"./GenericWorker":28}],27:[function(a,b,c){"use strict";function d(a){f.call(this,"DataWorker");var b=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(a){b.dataIsReady=!0,b.data=a,b.max=a&&a.length||0,b.type=e.getTypeOf(a),b.isPaused||b._tickAndRepeat()},function(a){b.error(a)})}var e=a("../utils"),f=a("./GenericWorker"),g=16384;e.inherits(d,f),d.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},d.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,e.delay(this._tickAndRepeat,[],this)),!0)},d.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(e.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},d.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=g,b=null,c=Math.min(this.max,this.index+a);if(this.index>=this.max)return this.end();switch(this.type){case"string":b=this.data.substring(this.index,c);break;case"uint8array":b=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":b=this.data.slice(this.index,c)}return this.index=c,this.push({data:b,meta:{percent:this.max?this.index/this.max*100:0}})},b.exports=d},{"../utils":32,"./GenericWorker":28}],28:[function(a,b,c){"use strict";function d(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,b){return this._listeners[a].push(b),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,b){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,b)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var b=this;return a.on("data",function(a){b.processChunk(a)}),a.on("end",function(){b.end()}),a.on("error",function(a){b.error(a)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var a=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,b){return this.extraStreamInfo[a]=b,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},b.exports=d},{}],29:[function(a,b,c){"use strict";function d(a,b,c){switch(a){case"blob":return h.newBlob(h.transformTo("arraybuffer",b),c);case"base64":return k.encode(b);default:return h.transformTo(a,b)}}function e(a,b){var c,d=0,e=null,f=0;for(c=0;c<b.length;c++)f+=b[c].length;switch(a){case"string":return b.join("");case"array":return Array.prototype.concat.apply([],b);case"uint8array":for(e=new Uint8Array(f),c=0;c<b.length;c++)e.set(b[c],d),d+=b[c].length;return e;case"nodebuffer":return Buffer.concat(b);default:throw new Error("concat : unsupported type '"+a+"'")}}function f(a,b){return new m.Promise(function(c,f){var g=[],h=a._internalType,i=a._outputType,j=a._mimeType;a.on("data",function(a,c){g.push(a),b&&b(c)}).on("error",function(a){g=[],f(a)}).on("end",function(){try{var a=d(i,e(h,g),j);c(a)}catch(b){f(b)}g=[]}).resume()})}function g(a,b,c){var d=b;switch(b){case"blob":case"arraybuffer":d="uint8array";break;case"base64":d="string"}try{this._internalType=d,this._outputType=b,this._mimeType=c,h.checkSupport(d),this._worker=a.pipe(new i(d)),a.lock()}catch(e){this._worker=new j("error"),this._worker.error(e)}}var h=a("../utils"),i=a("./ConvertWorker"),j=a("./GenericWorker"),k=a("../base64"),l=a("../support"),m=a("../external"),n=null;if(l.nodestream)try{n=a("../nodejs/NodejsStreamOutputAdapter")}catch(o){}g.prototype={accumulate:function(a){return f(this,a)},on:function(a,b){var c=this;return"data"===a?this._worker.on(a,function(a){b.call(c,a.data,a.meta)}):this._worker.on(a,function(){h.delay(b,arguments,c)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(a){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new n(this,{objectMode:"nodebuffer"!==this._outputType},a)}},b.exports=g},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(a,b,c){"use strict";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer="undefined"!=typeof Buffer,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var d=new ArrayBuffer(0);try{c.blob=0===new Blob([d],{type:"application/zip"}).size}catch(e){try{var f=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,g=new f;g.append(d),c.blob=0===g.getBlob("application/zip").size}catch(e){c.blob=!1}}}try{c.nodestream=!!a("readable-stream").Readable}catch(e){c.nodestream=!1}},{"readable-stream":16}],31:[function(a,b,c){"use strict";function d(){i.call(this,"utf-8 decode"),this.leftOver=null}function e(){i.call(this,"utf-8 encode")}for(var f=a("./utils"),g=a("./support"),h=a("./nodejsUtils"),i=a("./stream/GenericWorker"),j=new Array(256),k=0;k<256;k++)j[k]=k>=252?6:k>=248?5:k>=240?4:k>=224?3:k>=192?2:1;j[254]=j[254]=1;var l=function(a){var b,c,d,e,f,h=a.length,i=0;for(e=0;e<h;e++)c=a.charCodeAt(e),55296===(64512&c)&&e+1<h&&(d=a.charCodeAt(e+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),e++)),i+=c<128?1:c<2048?2:c<65536?3:4;for(b=g.uint8array?new Uint8Array(i):new Array(i),f=0,e=0;f<i;e++)c=a.charCodeAt(e),55296===(64512&c)&&e+1<h&&(d=a.charCodeAt(e+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),e++)),c<128?b[f++]=c:c<2048?(b[f++]=192|c>>>6,b[f++]=128|63&c):c<65536?(b[f++]=224|c>>>12,b[f++]=128|c>>>6&63,b[f++]=128|63&c):(b[f++]=240|c>>>18,b[f++]=128|c>>>12&63,b[f++]=128|c>>>6&63,b[f++]=128|63&c);return b},m=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return c<0?b:0===c?b:c+j[a[c]]>b?c:b},n=function(a){var b,c,d,e,g=a.length,h=new Array(2*g);for(c=0,b=0;b<g;)if(d=a[b++],d<128)h[c++]=d;else if(e=j[d],e>4)h[c++]=65533,b+=e-1;else{for(d&=2===e?31:3===e?15:7;e>1&&b<g;)d=d<<6|63&a[b++],e--;e>1?h[c++]=65533:d<65536?h[c++]=d:(d-=65536,h[c++]=55296|d>>10&1023,h[c++]=56320|1023&d)}return h.length!==c&&(h.subarray?h=h.subarray(0,c):h.length=c),f.applyFromCharCode(h)};c.utf8encode=function(a){return g.nodebuffer?h.newBufferFrom(a,"utf-8"):l(a)},c.utf8decode=function(a){return g.nodebuffer?f.transformTo("nodebuffer",a).toString("utf-8"):(a=f.transformTo(g.uint8array?"uint8array":"array",a),n(a))},f.inherits(d,i),d.prototype.processChunk=function(a){var b=f.transformTo(g.uint8array?"uint8array":"array",a.data);if(this.leftOver&&this.leftOver.length){if(g.uint8array){var d=b;b=new Uint8Array(d.length+this.leftOver.length),b.set(this.leftOver,0),b.set(d,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var e=m(b),h=b;e!==b.length&&(g.uint8array?(h=b.subarray(0,e),this.leftOver=b.subarray(e,b.length)):(h=b.slice(0,e),this.leftOver=b.slice(e,b.length))),this.push({data:c.utf8decode(h),meta:a.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=d,f.inherits(e,i),e.prototype.processChunk=function(a){this.push({data:c.utf8encode(a.data),meta:a.meta})},c.Utf8EncodeWorker=e},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(a,b,c){"use strict";function d(a){var b=null;return b=i.uint8array?new Uint8Array(a.length):new Array(a.length),f(a,b)}function e(a){return a}function f(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function g(a){var b=65536,d=c.getTypeOf(a),e=!0;if("uint8array"===d?e=n.applyCanBeUsed.uint8array:"nodebuffer"===d&&(e=n.applyCanBeUsed.nodebuffer),e)for(;b>1;)try{return n.stringifyByChunk(a,d,b)}catch(f){b=Math.floor(b/2)}return n.stringifyByChar(a)}function h(a,b){for(var c=0;c<a.length;c++)b[c]=a[c]; return b}var i=a("./support"),j=a("./base64"),k=a("./nodejsUtils"),l=a("core-js/library/fn/set-immediate"),m=a("./external");c.newBlob=function(a,b){c.checkSupport("blob");try{return new Blob([a],{type:b})}catch(d){try{var e=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,f=new e;return f.append(a),f.getBlob(b)}catch(d){throw new Error("Bug : can't construct the Blob.")}}};var n={stringifyByChunk:function(a,b,c){var d=[],e=0,f=a.length;if(f<=c)return String.fromCharCode.apply(null,a);for(;e<f;)"array"===b||"nodebuffer"===b?d.push(String.fromCharCode.apply(null,a.slice(e,Math.min(e+c,f)))):d.push(String.fromCharCode.apply(null,a.subarray(e,Math.min(e+c,f)))),e+=c;return d.join("")},stringifyByChar:function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(a[c]);return b},applyCanBeUsed:{uint8array:function(){try{return i.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(a){return!1}}(),nodebuffer:function(){try{return i.nodebuffer&&1===String.fromCharCode.apply(null,k.allocBuffer(1)).length}catch(a){return!1}}()}};c.applyFromCharCode=g;var o={};o.string={string:e,array:function(a){return f(a,new Array(a.length))},arraybuffer:function(a){return o.string.uint8array(a).buffer},uint8array:function(a){return f(a,new Uint8Array(a.length))},nodebuffer:function(a){return f(a,k.allocBuffer(a.length))}},o.array={string:g,array:e,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return k.newBufferFrom(a)}},o.arraybuffer={string:function(a){return g(new Uint8Array(a))},array:function(a){return h(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:e,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return k.newBufferFrom(new Uint8Array(a))}},o.uint8array={string:g,array:function(a){return h(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:e,nodebuffer:function(a){return k.newBufferFrom(a)}},o.nodebuffer={string:g,array:function(a){return h(a,new Array(a.length))},arraybuffer:function(a){return o.nodebuffer.uint8array(a).buffer},uint8array:function(a){return h(a,new Uint8Array(a.length))},nodebuffer:e},c.transformTo=function(a,b){if(b||(b=""),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=o[d][a](b);return e},c.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":i.nodebuffer&&k.isBuffer(a)?"nodebuffer":i.uint8array&&a instanceof Uint8Array?"uint8array":i.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(a){var b=i[a.toLowerCase()];if(!b)throw new Error(a+" is not supported by this platform")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d="";for(c=0;c<(a||"").length;c++)b=a.charCodeAt(c),d+="\\x"+(b<16?"0":"")+b.toString(16).toUpperCase();return d},c.delay=function(a,b,c){l(function(){a.apply(c||null,b||[])})},c.inherits=function(a,b){var c=function(){};c.prototype=b.prototype,a.prototype=new c},c.extend=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&"undefined"==typeof c[b]&&(c[b]=arguments[a][b]);return c},c.prepareContent=function(a,b,e,f,g){var h=m.Promise.resolve(b).then(function(a){var b=i.blob&&(a instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(a))!==-1);return b&&"undefined"!=typeof FileReader?new m.Promise(function(b,c){var d=new FileReader;d.onload=function(a){b(a.target.result)},d.onerror=function(a){c(a.target.error)},d.readAsArrayBuffer(a)}):a});return h.then(function(b){var h=c.getTypeOf(b);return h?("arraybuffer"===h?b=c.transformTo("uint8array",b):"string"===h&&(g?b=j.decode(b):e&&f!==!0&&(b=d(b))),b):m.Promise.reject(new Error("Can't read the data of '"+a+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"core-js/library/fn/set-immediate":36}],33:[function(a,b,c){"use strict";function d(a){this.files=[],this.loadOptions=a}var e=a("./reader/readerFor"),f=a("./utils"),g=a("./signature"),h=a("./zipEntry"),i=(a("./utf8"),a("./support"));d.prototype={checkSignature:function(a){if(!this.reader.readAndCheckSignature(a)){this.reader.index-=4;var b=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+f.pretty(b)+", expected "+f.pretty(a)+")")}},isSignature:function(a,b){var c=this.reader.index;this.reader.setIndex(a);var d=this.reader.readString(4),e=d===b;return this.reader.setIndex(c),e},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var a=this.reader.readData(this.zipCommentLength),b=i.uint8array?"uint8array":"array",c=f.transformTo(b,a);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;e<d;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readData(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8(),b.processAttributes()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)a=new h({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(a<0){var b=!this.isSignature(0,g.LOCAL_FILE_HEADER);throw b?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(a);var c=a;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===f.MAX_VALUE_16BITS||this.diskWithCentralDirStart===f.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===f.MAX_VALUE_16BITS||this.centralDirRecords===f.MAX_VALUE_16BITS||this.centralDirSize===f.MAX_VALUE_32BITS||this.centralDirOffset===f.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),a<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(a),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var e=c-d;if(e>0)this.isSignature(c,g.CENTRAL_FILE_HEADER)||(this.reader.zero=e);else if(e<0)throw new Error("Corrupted zip: missing "+Math.abs(e)+" bytes.")},prepareReader:function(a){this.reader=e(a)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(a,b,c){"use strict";function d(a,b){this.options=a,this.loadOptions=b}var e=a("./reader/readerFor"),f=a("./utils"),g=a("./compressedObject"),h=a("./crc32"),i=a("./utf8"),j=a("./compressions"),k=a("./support"),l=0,m=3,n=function(a){for(var b in j)if(j.hasOwnProperty(b)&&j[b].magic===a)return j[b];return null};d.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readData(this.fileNameLength),a.skip(c),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(b=n(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,b,a.readData(this.compressedSize))},readCentralPart:function(a){this.versionMadeBy=a.readInt(2),a.skip(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4);var b=a.readInt(2);if(this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");a.skip(b),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var a=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),a===l&&(this.dosPermissions=63&this.externalFileAttributes),a===m&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(a){if(this.extraFields[1]){var b=e(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});a.index<e;)b=a.readInt(2),c=a.readInt(2),d=a.readData(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){var a=k.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=i.utf8decode(this.fileName),this.fileCommentStr=i.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(null!==b)this.fileNameStr=b;else{var c=f.transformTo(a,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(c)}var d=this.findExtraFieldUnicodeComment();if(null!==d)this.fileCommentStr=d;else{var e=f.transformTo(a,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(e)}}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=e(a.value);return 1!==b.readInt(1)?null:h(this.fileName)!==b.readInt(4)?null:i.utf8decode(b.readData(a.length-5))}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=e(a.value);return 1!==b.readInt(1)?null:h(this.fileComment)!==b.readInt(4)?null:i.utf8decode(b.readData(a.length-5))}return null}},b.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(a,b,c){"use strict";var d=a("./stream/StreamHelper"),e=a("./stream/DataWorker"),f=a("./utf8"),g=a("./compressedObject"),h=a("./stream/GenericWorker"),i=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this.unixPermissions=c.unixPermissions,this.dosPermissions=c.dosPermissions,this._data=b,this._dataBinary=c.binary,this.options={compression:c.compression,compressionOptions:c.compressionOptions}};i.prototype={internalStream:function(a){var b=null,c="string";try{if(!a)throw new Error("No output type specified.");c=a.toLowerCase();var e="string"===c||"text"===c;"binarystring"!==c&&"text"!==c||(c="string"),b=this._decompressWorker();var g=!this._dataBinary;g&&!e&&(b=b.pipe(new f.Utf8EncodeWorker)),!g&&e&&(b=b.pipe(new f.Utf8DecodeWorker))}catch(i){b=new h("error"),b.error(i)}return new d(b,c,"")},async:function(a,b){return this.internalStream(a).accumulate(b)},nodeStream:function(a,b){return this.internalStream(a||"nodebuffer").toNodejsStream(b)},_compressWorker:function(a,b){if(this._data instanceof g&&this._data.compression.magic===a.magic)return this._data.getCompressedWorker();var c=this._decompressWorker();return this._dataBinary||(c=c.pipe(new f.Utf8EncodeWorker)),g.createWorkerFrom(c,a,b)},_decompressWorker:function(){return this._data instanceof g?this._data.getContentWorker():this._data instanceof h?this._data:new e(this._data)}};for(var j=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},l=0;l<j.length;l++)i.prototype[j[l]]=k;b.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(a,b,c){a("../modules/web.immediate"),b.exports=a("../modules/_core").setImmediate},{"../modules/_core":40,"../modules/web.immediate":56}],37:[function(a,b,c){b.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},{}],38:[function(a,b,c){var d=a("./_is-object");b.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},{"./_is-object":51}],39:[function(a,b,c){var d={}.toString;b.exports=function(a){return d.call(a).slice(8,-1)}},{}],40:[function(a,b,c){var d=b.exports={version:"2.3.0"};"number"==typeof __e&&(__e=d)},{}],41:[function(a,b,c){var d=a("./_a-function");b.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},{"./_a-function":37}],42:[function(a,b,c){b.exports=!a("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":45}],43:[function(a,b,c){var d=a("./_is-object"),e=a("./_global").document,f=d(e)&&d(e.createElement);b.exports=function(a){return f?e.createElement(a):{}}},{"./_global":46,"./_is-object":51}],44:[function(a,b,c){var d=a("./_global"),e=a("./_core"),f=a("./_ctx"),g=a("./_hide"),h="prototype",i=function(a,b,c){var j,k,l,m=a&i.F,n=a&i.G,o=a&i.S,p=a&i.P,q=a&i.B,r=a&i.W,s=n?e:e[b]||(e[b]={}),t=s[h],u=n?d:o?d[b]:(d[b]||{})[h];n&&(c=b);for(j in c)k=!m&&u&&void 0!==u[j],k&&j in s||(l=k?u[j]:c[j],s[j]=n&&"function"!=typeof u[j]?c[j]:q&&k?f(l,d):r&&u[j]==l?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[h]=a[h],b}(l):p&&"function"==typeof l?f(Function.call,l):l,p&&((s.virtual||(s.virtual={}))[j]=l,a&i.R&&t&&!t[j]&&g(t,j,l)))};i.F=1,i.G=2,i.S=4,i.P=8,i.B=16,i.W=32,i.U=64,i.R=128,b.exports=i},{"./_core":40,"./_ctx":41,"./_global":46,"./_hide":47}],45:[function(a,b,c){b.exports=function(a){try{return!!a()}catch(b){return!0}}},{}],46:[function(a,b,c){var d=b.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=d)},{}],47:[function(a,b,c){var d=a("./_object-dp"),e=a("./_property-desc");b.exports=a("./_descriptors")?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},{"./_descriptors":42,"./_object-dp":52,"./_property-desc":53}],48:[function(a,b,c){b.exports=a("./_global").document&&document.documentElement},{"./_global":46}],49:[function(a,b,c){b.exports=!a("./_descriptors")&&!a("./_fails")(function(){return 7!=Object.defineProperty(a("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":42,"./_dom-create":43,"./_fails":45}],50:[function(a,b,c){b.exports=function(a,b,c){var d=void 0===c;switch(b.length){case 0:return d?a():a.call(c);case 1:return d?a(b[0]):a.call(c,b[0]);case 2:return d?a(b[0],b[1]):a.call(c,b[0],b[1]);case 3:return d?a(b[0],b[1],b[2]):a.call(c,b[0],b[1],b[2]);case 4:return d?a(b[0],b[1],b[2],b[3]):a.call(c,b[0],b[1],b[2],b[3])}return a.apply(c,b)}},{}],51:[function(a,b,c){b.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},{}],52:[function(a,b,c){var d=a("./_an-object"),e=a("./_ie8-dom-define"),f=a("./_to-primitive"),g=Object.defineProperty;c.f=a("./_descriptors")?Object.defineProperty:function(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},{"./_an-object":38,"./_descriptors":42,"./_ie8-dom-define":49,"./_to-primitive":55}],53:[function(a,b,c){b.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},{}],54:[function(a,b,c){var d,e,f,g=a("./_ctx"),h=a("./_invoke"),i=a("./_html"),j=a("./_dom-create"),k=a("./_global"),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function(a){delete q[a]},"process"==a("./_cof")(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),b.exports={set:m,clear:n}},{"./_cof":39,"./_ctx":41,"./_dom-create":43,"./_global":46,"./_html":48,"./_invoke":50}],55:[function(a,b,c){var d=a("./_is-object");b.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":51}],56:[function(a,b,c){var d=a("./_export"),e=a("./_task");d(d.G+d.B,{setImmediate:e.set,clearImmediate:e.clear})},{"./_export":44,"./_task":54}],57:[function(a,b,c){(function(a){"use strict";function c(){k=!0;for(var a,b,c=l.length;c;){for(b=l,l=[],a=-1;++a<c;)b[a]();c=l.length}k=!1}function d(a){1!==l.push(a)||k||e()}var e,f=a.MutationObserver||a.WebKitMutationObserver;if(f){var g=0,h=new f(c),i=a.document.createTextNode("");h.observe(i,{characterData:!0}),e=function(){i.data=g=++g%2}}else if(a.setImmediate||"undefined"==typeof a.MessageChannel)e="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var b=a.document.createElement("script");b.onreadystatechange=function(){c(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},a.document.documentElement.appendChild(b)}:function(){setTimeout(c,0)};else{var j=new a.MessageChannel;j.port1.onmessage=c,e=function(){j.port2.postMessage(0)}}var k,l=[];b.exports=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],58:[function(a,b,c){"use strict";function d(){}function e(a){if("function"!=typeof a)throw new TypeError("resolver must be a function");this.state=s,this.queue=[],this.outcome=void 0,a!==d&&i(this,a)}function f(a,b,c){this.promise=a,"function"==typeof b&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),"function"==typeof c&&(this.onRejected=c,this.callRejected=this.otherCallRejected)}function g(a,b,c){o(function(){var d;try{d=b(c)}catch(e){return p.reject(a,e)}d===a?p.reject(a,new TypeError("Cannot resolve promise with itself")):p.resolve(a,d)})}function h(a){var b=a&&a.then;if(a&&("object"==typeof a||"function"==typeof a)&&"function"==typeof b)return function(){b.apply(a,arguments)}}function i(a,b){function c(b){f||(f=!0,p.reject(a,b))}function d(b){f||(f=!0,p.resolve(a,b))}function e(){b(d,c)}var f=!1,g=j(e);"error"===g.status&&c(g.value)}function j(a,b){var c={};try{c.value=a(b),c.status="success"}catch(d){c.status="error",c.value=d}return c}function k(a){return a instanceof this?a:p.resolve(new this(d),a)}function l(a){var b=new this(d);return p.reject(b,a)}function m(a){function b(a,b){function d(a){g[b]=a,++h!==e||f||(f=!0,p.resolve(j,g))}c.resolve(a).then(d,function(a){f||(f=!0,p.reject(j,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=new Array(e),h=0,i=-1,j=new this(d);++i<e;)b(a[i],i);return j}function n(a){function b(a){c.resolve(a).then(function(a){f||(f=!0,p.resolve(h,a))},function(a){f||(f=!0,p.reject(h,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=-1,h=new this(d);++g<e;)b(a[g]);return h}var o=a("immediate"),p={},q=["REJECTED"],r=["FULFILLED"],s=["PENDING"];b.exports=e,e.prototype["catch"]=function(a){return this.then(null,a)},e.prototype.then=function(a,b){if("function"!=typeof a&&this.state===r||"function"!=typeof b&&this.state===q)return this;var c=new this.constructor(d);if(this.state!==s){var e=this.state===r?a:b;g(c,e,this.outcome)}else this.queue.push(new f(c,a,b));return c},f.prototype.callFulfilled=function(a){p.resolve(this.promise,a)},f.prototype.otherCallFulfilled=function(a){g(this.promise,this.onFulfilled,a)},f.prototype.callRejected=function(a){p.reject(this.promise,a)},f.prototype.otherCallRejected=function(a){g(this.promise,this.onRejected,a)},p.resolve=function(a,b){var c=j(h,b);if("error"===c.status)return p.reject(a,c.value);var d=c.value;if(d)i(a,d);else{a.state=r,a.outcome=b;for(var e=-1,f=a.queue.length;++e<f;)a.queue[e].callFulfilled(b)}return a},p.reject=function(a,b){a.state=q,a.outcome=b;for(var c=-1,d=a.queue.length;++c<d;)a.queue[c].callRejected(b);return a},e.resolve=k,e.reject=l,e.all=m,e.race=n},{immediate:57}],59:[function(a,b,c){"use strict";var d=a("./lib/utils/common").assign,e=a("./lib/deflate"),f=a("./lib/inflate"),g=a("./lib/zlib/constants"),h={};d(h,e,f,g),b.exports=h},{"./lib/deflate":60,"./lib/inflate":61,"./lib/utils/common":62,"./lib/zlib/constants":65}],60:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=i.assign({level:s,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:t,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=h.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==p)throw new Error(k[c]);if(b.header&&h.deflateSetHeader(this.strm,b.header),b.dictionary){var e;if(e="string"==typeof b.dictionary?j.string2buf(b.dictionary):"[object ArrayBuffer]"===m.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary,c=h.deflateSetDictionary(this.strm,e),c!==p)throw new Error(k[c]);this._dict_set=!0}}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg||k[c.err];return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}function g(a,b){return b=b||{},b.gzip=!0,e(a,b)}var h=a("./zlib/deflate"),i=a("./utils/common"),j=a("./utils/strings"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=Object.prototype.toString,n=0,o=4,p=0,q=1,r=2,s=-1,t=0,u=8;d.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?o:n,"string"==typeof a?e.input=j.string2buf(a):"[object ArrayBuffer]"===m.call(a)?e.input=new Uint8Array(a):e.input=a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new i.Buf8(f),e.next_out=0,e.avail_out=f),c=h.deflate(e,d),c!==q&&c!==p)return this.onEnd(c),this.ended=!0,!1;0!==e.avail_out&&(0!==e.avail_in||d!==o&&d!==r)||("string"===this.options.to?this.onData(j.buf2binstring(i.shrinkBuf(e.output,e.next_out))):this.onData(i.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||0===e.avail_out)&&c!==q);return d===o?(c=h.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===p):d!==r||(this.onEnd(p),e.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=d,c.deflate=e,c.deflateRaw=f,c.gzip=g},{"./utils/common":62,"./utils/strings":63,"./zlib/deflate":67,"./zlib/messages":72,"./zlib/zstream":74}],61:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=g.inflateInit2(this.strm,b.windowBits);if(c!==j.Z_OK)throw new Error(k[c]);this.header=new m,g.inflateGetHeader(this.strm,this.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg||k[c.err];return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}var g=a("./zlib/inflate"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/constants"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=a("./zlib/gzheader"),n=Object.prototype.toString;d.prototype.push=function(a,b){var c,d,e,f,k,l,m=this.strm,o=this.options.chunkSize,p=this.options.dictionary,q=!1;if(this.ended)return!1;d=b===~~b?b:b===!0?j.Z_FINISH:j.Z_NO_FLUSH,"string"==typeof a?m.input=i.binstring2buf(a):"[object ArrayBuffer]"===n.call(a)?m.input=new Uint8Array(a):m.input=a,m.next_in=0,m.avail_in=m.input.length;do{if(0===m.avail_out&&(m.output=new h.Buf8(o),m.next_out=0,m.avail_out=o),c=g.inflate(m,j.Z_NO_FLUSH),c===j.Z_NEED_DICT&&p&&(l="string"==typeof p?i.string2buf(p):"[object ArrayBuffer]"===n.call(p)?new Uint8Array(p):p,c=g.inflateSetDictionary(this.strm,l)),c===j.Z_BUF_ERROR&&q===!0&&(c=j.Z_OK,q=!1),c!==j.Z_STREAM_END&&c!==j.Z_OK)return this.onEnd(c),this.ended=!0,!1;m.next_out&&(0!==m.avail_out&&c!==j.Z_STREAM_END&&(0!==m.avail_in||d!==j.Z_FINISH&&d!==j.Z_SYNC_FLUSH)||("string"===this.options.to?(e=i.utf8border(m.output,m.next_out),f=m.next_out-e,k=i.buf2string(m.output,e),m.next_out=f,m.avail_out=o-f,f&&h.arraySet(m.output,m.output,e,f,0),this.onData(k)):this.onData(h.shrinkBuf(m.output,m.next_out)))),0===m.avail_in&&0===m.avail_out&&(q=!0)}while((m.avail_in>0||0===m.avail_out)&&c!==j.Z_STREAM_END);return c===j.Z_STREAM_END&&(d=j.Z_FINISH),d===j.Z_FINISH?(c=g.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===j.Z_OK):d!==j.Z_SYNC_FLUSH||(this.onEnd(j.Z_OK),m.avail_out=0,!0)},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===j.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=d,c.inflate=e,c.inflateRaw=f,c.ungzip=e},{"./utils/common":62,"./utils/strings":63,"./zlib/constants":65,"./zlib/gzheader":68,"./zlib/inflate":70,"./zlib/messages":72,"./zlib/zstream":74}],62:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;f<d;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;b<c;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;b<c;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;f<d;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],63:[function(a,b,c){"use strict";function d(a,b){if(b<65537&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;d<b;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;j<256;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;f<h;f++)c=a.charCodeAt(f),55296===(64512&c)&&f+1<h&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=c<128?1:c<2048?2:c<65536?3:4;for(b=new e.Buf8(i),g=0,f=0;g<i;f++)c=a.charCodeAt(f),55296===(64512&c)&&f+1<h&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),c<128?b[g++]=c:c<2048?(b[g++]=192|c>>>6,b[g++]=128|63&c):c<65536?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;c<d;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;c<h;)if(f=a[c++],f<128)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&c<h;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:f<65536?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return c<0?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":62}],64:[function(a,b,c){"use strict";function d(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0; }b.exports=d},{}],65:[function(a,b,c){"use strict";b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],66:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;c<256;c++){a=c;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=f,g=d+c;a^=-1;for(var h=d;h<g;h++)a=a>>>8^e[255&(a^b[h])];return a^-1}var f=d();b.exports=e},{}],67:[function(a,b,c){"use strict";function d(a,b){return a.msg=I[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(E.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){F._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,E.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=G(a.adler,b,e,c):2===a.state.wrap&&(a.adler=H(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-la?a.strstart-(a.w_size-la):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ka,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&f<m);if(d=ka-(m-f),f=m-ka,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-la)){E.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ja)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+ja-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<ja)););}while(a.lookahead<la&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===J)return ua;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return ua;if(a.strstart-a.block_start>=a.w_size-la&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?ua:ua}function o(a,b){for(var c,d;;){if(a.lookahead<la){if(m(a),a.lookahead<la&&b===J)return ua;if(0===a.lookahead)break}if(c=0,a.lookahead>=ja&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-la&&(a.match_length=l(a,c)),a.match_length>=ja)if(d=F._tr_tally(a,a.strstart-a.match_start,a.match_length-ja),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ja){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=a.strstart<ja-1?a.strstart:ja-1,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function p(a,b){for(var c,d,e;;){if(a.lookahead<la){if(m(a),a.lookahead<la&&b===J)return ua;if(0===a.lookahead)break}if(c=0,a.lookahead>=ja&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=ja-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-la&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===U||a.match_length===ja&&a.strstart-a.match_start>4096)&&(a.match_length=ja-1)),a.prev_length>=ja&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ja,d=F._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ja),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ja-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=ja-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return ua}else if(a.match_available){if(d=F._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return ua}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=F._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<ja-1?a.strstart:ja-1,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ka){if(m(a),a.lookahead<=ka&&b===J)return ua;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=ja&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ka;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&e<f);a.match_length=ka-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ja?(c=F._tr_tally(a,1,a.match_length-ja),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===J)return ua;break}if(a.match_length=0,c=F._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return ua}return a.insert=0,b===M?(h(a,!0),0===a.strm.avail_out?wa:xa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ua:va}function s(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e}function t(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=D[a.level].max_lazy,a.good_match=D[a.level].good_length,a.nice_match=D[a.level].nice_length,a.max_chain_length=D[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ja-1,a.match_available=0,a.ins_h=0}function u(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=$,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new E.Buf16(2*ha),this.dyn_dtree=new E.Buf16(2*(2*fa+1)),this.bl_tree=new E.Buf16(2*(2*ga+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new E.Buf16(ia+1),this.heap=new E.Buf16(2*ea+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new E.Buf16(2*ea+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=Z,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?na:sa,a.adler=2===b.wrap?0:1,b.last_flush=J,F._tr_init(b),O):d(a,Q)}function w(a){var b=v(a);return b===O&&t(a.state),b}function x(a,b){return a&&a.state?2!==a.state.wrap?Q:(a.state.gzhead=b,O):Q}function y(a,b,c,e,f,g){if(!a)return Q;var h=1;if(b===T&&(b=6),e<0?(h=0,e=-e):e>15&&(h=2,e-=16),f<1||f>_||c!==$||e<8||e>15||b<0||b>9||g<0||g>X)return d(a,Q);8===e&&(e=9);var i=new u;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+ja-1)/ja),i.window=new E.Buf8(2*i.w_size),i.head=new E.Buf16(i.hash_size),i.prev=new E.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new E.Buf8(i.pending_buf_size),i.d_buf=1*i.lit_bufsize,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,w(a)}function z(a,b){return y(a,b,$,aa,ba,Y)}function A(a,b){var c,h,k,l;if(!a||!a.state||b>N||b<0)return a?d(a,Q):Q;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ta&&b!==M)return d(a,0===a.avail_out?S:Q);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===na)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=H(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=oa):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=V||h.level<2?4:0),i(h,ya),h.status=sa);else{var m=$+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=V||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ma),m+=31-m%31,h.status=sa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===oa)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=pa)}else h.status=pa;if(h.status===pa)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=qa)}else h.status=qa;if(h.status===qa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=H(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=ra)}else h.status=ra;if(h.status===ra&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=sa)):h.status=sa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,O}else if(0===a.avail_in&&e(b)<=e(c)&&b!==M)return d(a,S);if(h.status===ta&&0!==a.avail_in)return d(a,S);if(0!==a.avail_in||0!==h.lookahead||b!==J&&h.status!==ta){var o=h.strategy===V?r(h,b):h.strategy===W?q(h,b):D[h.level].func(h,b);if(o!==wa&&o!==xa||(h.status=ta),o===ua||o===wa)return 0===a.avail_out&&(h.last_flush=-1),O;if(o===va&&(b===K?F._tr_align(h):b!==N&&(F._tr_stored_block(h,0,0,!1),b===L&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,O}return b!==M?O:h.wrap<=0?P:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?O:P)}function B(a){var b;return a&&a.state?(b=a.state.status,b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra&&b!==sa&&b!==ta?d(a,Q):(a.state=null,b===sa?d(a,R):O)):Q}function C(a,b){var c,d,e,g,h,i,j,k,l=b.length;if(!a||!a.state)return Q;if(c=a.state,g=c.wrap,2===g||1===g&&c.status!==na||c.lookahead)return Q;for(1===g&&(a.adler=G(a.adler,b,l,0)),c.wrap=0,l>=c.w_size&&(0===g&&(f(c.head),c.strstart=0,c.block_start=0,c.insert=0),k=new E.Buf8(c.w_size),E.arraySet(k,b,l-c.w_size,c.w_size,0),b=k,l=c.w_size),h=a.avail_in,i=a.next_in,j=a.input,a.avail_in=l,a.next_in=0,a.input=b,m(c);c.lookahead>=ja;){d=c.strstart,e=c.lookahead-(ja-1);do c.ins_h=(c.ins_h<<c.hash_shift^c.window[d+ja-1])&c.hash_mask,c.prev[d&c.w_mask]=c.head[c.ins_h],c.head[c.ins_h]=d,d++;while(--e);c.strstart=d,c.lookahead=ja-1,m(c)}return c.strstart+=c.lookahead,c.block_start=c.strstart,c.insert=c.lookahead,c.lookahead=0,c.match_length=c.prev_length=ja-1,c.match_available=0,a.next_in=i,a.input=j,a.avail_in=h,c.wrap=g,O}var D,E=a("../utils/common"),F=a("./trees"),G=a("./adler32"),H=a("./crc32"),I=a("./messages"),J=0,K=1,L=3,M=4,N=5,O=0,P=1,Q=-2,R=-3,S=-5,T=-1,U=1,V=2,W=3,X=4,Y=0,Z=2,$=8,_=9,aa=15,ba=8,ca=29,da=256,ea=da+1+ca,fa=30,ga=19,ha=2*ea+1,ia=15,ja=3,ka=258,la=ka+ja+1,ma=32,na=42,oa=69,pa=73,qa=91,ra=103,sa=113,ta=666,ua=1,va=2,wa=3,xa=4,ya=3;D=[new s(0,0,0,0,n),new s(4,4,8,4,o),new s(4,5,16,8,o),new s(4,6,32,32,o),new s(4,4,16,16,p),new s(8,16,32,32,p),new s(8,16,128,128,p),new s(8,32,128,256,p),new s(32,128,258,1024,p),new s(32,258,258,4096,p)],c.deflateInit=z,c.deflateInit2=y,c.deflateReset=w,c.deflateResetKeep=v,c.deflateSetHeader=x,c.deflate=A,c.deflateEnd=B,c.deflateSetDictionary=C,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":62,"./adler32":64,"./crc32":66,"./messages":72,"./trees":73}],68:[function(a,b,c){"use strict";function d(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=d},{}],69:[function(a,b,c){"use strict";var d=30,e=12;b.exports=function(a,b){var c,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;c=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=c.dmax,l=c.wsize,m=c.whave,n=c.wnext,o=c.window,p=c.hold,q=c.bits,r=c.lencode,s=c.distcode,t=(1<<c.lenbits)-1,u=(1<<c.distbits)-1;a:do{q<15&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){c.mode=e;break a}a.msg="invalid literal/length code",c.mode=d;break a}x=65535&v,w&=15,w&&(q<w&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),q<15&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",c.mode=d;break a}if(y=65535&v,w&=15,q<w&&(p+=B[f++]<<q,q+=8,q<w&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",c.mode=d;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&c.sane){a.msg="invalid distance too far back",c.mode=d;break a}if(z=0,A=o,0===n){if(z+=l-w,w<x){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(n<w){if(z+=l+n-w,w-=n,w<x){x-=w;do C[h++]=o[z++];while(--w);if(z=0,n<x){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,w<x){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(f<g&&h<j);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=f<g?5+(g-f):5-(f-g),a.avail_out=h<j?257+(j-h):257-(h-j),c.hold=p,c.bits=q}},{}],70:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=L,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new s.Buf32(pa),b.distcode=b.distdyn=new s.Buf32(qa),b.sane=1,b.back=-1,D):G}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):G}function h(a,b){var c,d;return a&&a.state?(d=a.state,b<0?(c=0,b=-b):(c=(b>>4)+1,b<48&&(b&=15)),b&&(b<8||b>15)?G:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):G}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==D&&(a.state=null),c):G}function j(a){return i(a,sa)}function k(a){if(ta){var b;for(q=new s.Buf32(512),r=new s.Buf32(32),b=0;b<144;)a.lens[b++]=8;for(;b<256;)a.lens[b++]=9;for(;b<280;)a.lens[b++]=7;for(;b<288;)a.lens[b++]=8;for(w(y,a.lens,0,288,q,0,a.work,{bits:9}),b=0;b<32;)a.lens[b++]=5;w(z,a.lens,0,32,r,0,a.work,{bits:5}),ta=!1}a.lencode=q,a.lenbits=9,a.distcode=r,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new s.Buf8(f.wsize)),d>=f.wsize?(s.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),s.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(s.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,r,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa=0,Ba=new s.Buf8(4),Ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return G;c=a.state,c.mode===W&&(c.mode=X),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xa=D;a:for(;;)switch(c.mode){case L:if(0===c.wrap){c.mode=X;break}for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0),m=0,n=0,c.mode=M;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=ma;break}if((15&m)!==K){a.msg="unknown compression method",c.mode=ma;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=ma;break}c.dmax=1<<wa,a.adler=c.check=1,c.mode=512&m?U:W,m=0,n=0;break;case M:for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==K){a.msg="unknown compression method",c.mode=ma;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=ma;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=N;case N:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=u(c.check,Ba,4,0)),m=0,n=0,c.mode=O;case O:for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0,c.mode=P;case P:if(1024&c.flags){for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=u(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=Q;case Q:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),s.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=R;case R:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&q<i);if(512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=S;case S:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&q<i);if(512&c.flags&&(c.check=u(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=T;case T:if(512&c.flags){for(;n<16;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=ma;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=W;break;case U:for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=V;case V:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,F;a.adler=c.check=1,c.mode=W;case W:if(b===B||b===C)break a;case X:if(c.last){m>>>=7&n,n-=7&n,c.mode=ja;break}for(;n<3;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=Y;break;case 1:if(k(c),c.mode=ca,b===C){m>>>=2,n-=2;break a}break;case 2:c.mode=_;break;case 3:a.msg="invalid block type",c.mode=ma}m>>>=2,n-=2;break;case Y:for(m>>>=7&n,n-=7&n;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=ma;break}if(c.length=65535&m,m=0,n=0,c.mode=Z,b===C)break a;case Z:c.mode=$;case $:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;s.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=W;break;case _:for(;n<14;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=ma;break}c.have=0,c.mode=aa;case aa:for(;c.have<c.ncode;){for(;n<3;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Ca[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=w(x,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=ma;break}c.have=0,c.mode=ba;case ba:for(;c.have<c.nlen+c.ndist;){for(;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(sa<16)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=ma;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=ma;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===ma)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=ma;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=w(y,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=ma;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=w(z,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=ma;break}if(c.mode=ca,b===C)break a;case ca:c.mode=da;case da:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,v(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===W&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(ra&&0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.lencode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ia;break}if(32&ra){c.back=-1,c.mode=W;break}if(64&ra){a.msg="invalid literal/length code",c.mode=ma;break}c.extra=15&ra,c.mode=ea;case ea:if(c.extra){for(za=c.extra;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=fa;case fa:for(;Aa=c.distcode[m&(1<<c.distbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.distcode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(ta+qa<=n);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=ma;break}c.offset=sa,c.extra=15&ra,c.mode=ga;case ga:if(c.extra){for(za=c.extra;n<za;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=ma;break}c.mode=ha;case ha:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=ma;break}q>c.wnext?(q-=c.wnext,r=c.wsize-q):r=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,r=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[r++];while(--q);0===c.length&&(c.mode=da);break;case ia:if(0===j)break a;f[h++]=c.length,j--,c.mode=da;break;case ja:if(c.wrap){for(;n<32;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?u(c.check,f,p,h-p):t(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=ma;break}m=0,n=0}c.mode=ka;case ka:if(c.wrap&&c.flags){for(;n<32;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=ma;break}m=0,n=0}c.mode=la;case la:xa=E;break a;case ma:xa=H;break a;case na:return I;case oa:default:return G}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<ma&&(c.mode<ja||b!==A))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=na,I):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?u(c.check,f,p,a.next_out-p):t(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===W?128:0)+(c.mode===ca||c.mode===Z?256:0),(0===o&&0===p||b===A)&&xa===D&&(xa=J),xa)}function n(a){if(!a||!a.state)return G;var b=a.state;return b.window&&(b.window=null),a.state=null,D}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?G:(c.head=b,b.done=!1,D)):G}function p(a,b){var c,d,e,f=b.length;return a&&a.state?(c=a.state,0!==c.wrap&&c.mode!==V?G:c.mode===V&&(d=1,d=t(d,b,f,0),d!==c.check)?H:(e=l(a,b,f,f))?(c.mode=na,I):(c.havedict=1,D)):G}var q,r,s=a("../utils/common"),t=a("./adler32"),u=a("./crc32"),v=a("./inffast"),w=a("./inftrees"),x=0,y=1,z=2,A=4,B=5,C=6,D=0,E=1,F=2,G=-2,H=-3,I=-4,J=-5,K=8,L=1,M=2,N=3,O=4,P=5,Q=6,R=7,S=8,T=9,U=10,V=11,W=12,X=13,Y=14,Z=15,$=16,_=17,aa=18,ba=19,ca=20,da=21,ea=22,fa=23,ga=24,ha=25,ia=26,ja=27,ka=28,la=29,ma=30,na=31,oa=32,pa=852,qa=592,ra=15,sa=ra,ta=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateSetDictionary=p,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":62,"./adler32":64,"./crc32":66,"./inffast":69,"./inftrees":71}],71:[function(a,b,c){"use strict";var d=a("../utils/common"),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;D<=e;D++)P[D]=0;for(E=0;E<o;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;F<G&&0===P[F];F++);for(H<F&&(H=F),K=1,D=1;D<=e;D++)if(K<<=1,K-=P[D],K<0)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;D<e;D++)Q[D+1]=Q[D]+P[D];for(E=0;E<o;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===i&&L>f||a===j&&L>g)return 1;for(;;){z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;I+J<G&&(K-=P[I+J],!(K<=0));)I++,K<<=1;if(L+=1<<I,a===i&&L>f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":62}],72:[function(a,b,c){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],73:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length}function f(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b}function g(a){return a<256?ia[a]:ia[256+(a>>>7)]}function h(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function i(a,b,c){a.bi_valid>X-c?(a.bi_buf|=b<<a.bi_valid&65535,h(a,a.bi_buf),a.bi_buf=b>>X-a.bi_valid,a.bi_valid+=c-X):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function j(a,b,c){i(a,c[2*b],c[2*b+1])}function k(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function l(a){16===a.bi_valid?(h(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function m(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;f<=W;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0, c=a.heap_max+1;c<V;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function n(a,b,c){var d,e,f=new Array(W+1),g=0;for(d=1;d<=W;d++)f[d]=g=g+c[d-1]<<1;for(e=0;e<=b;e++){var h=a[2*e+1];0!==h&&(a[2*e]=k(f[h]++,h))}}function o(){var a,b,c,d,f,g=new Array(W+1);for(c=0,d=0;d<Q-1;d++)for(ka[d]=c,a=0;a<1<<ba[d];a++)ja[c++]=d;for(ja[c-1]=d,f=0,d=0;d<16;d++)for(la[d]=f,a=0;a<1<<ca[d];a++)ia[f++]=d;for(f>>=7;d<T;d++)for(la[d]=f<<7,a=0;a<1<<ca[d]-7;a++)ia[256+f++]=d;for(b=0;b<=W;b++)g[b]=0;for(a=0;a<=143;)ga[2*a+1]=8,a++,g[8]++;for(;a<=255;)ga[2*a+1]=9,a++,g[9]++;for(;a<=279;)ga[2*a+1]=7,a++,g[7]++;for(;a<=287;)ga[2*a+1]=8,a++,g[8]++;for(n(ga,S+1,g),a=0;a<T;a++)ha[2*a+1]=5,ha[2*a]=k(a,5);ma=new e(ga,ba,R+1,S,W),na=new e(ha,ca,0,T,W),oa=new e(new Array(0),da,0,U,Y)}function p(a){var b;for(b=0;b<S;b++)a.dyn_ltree[2*b]=0;for(b=0;b<T;b++)a.dyn_dtree[2*b]=0;for(b=0;b<U;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*Z]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function q(a){a.bi_valid>8?h(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function r(a,b,c,d){q(a),d&&(h(a,c),h(a,~c)),G.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function s(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function t(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&s(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!s(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function u(a,b,c){var d,e,f,h,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],e=a.pending_buf[a.l_buf+k],k++,0===d?j(a,e,b):(f=ja[e],j(a,f+R+1,b),h=ba[f],0!==h&&(e-=ka[f],i(a,e,h)),d--,f=g(d),j(a,f,c),h=ca[f],0!==h&&(d-=la[f],i(a,d,h)));while(k<a.last_lit);j(a,Z,b)}function v(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=V,c=0;c<i;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=j<2?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)t(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],t(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,t(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],m(a,b),n(f,j,a.bl_count)}function w(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;d<=c;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(h<j?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*$]++):h<=10?a.bl_tree[2*_]++:a.bl_tree[2*aa]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function x(a,b,c){var d,e,f=-1,g=b[1],h=0,k=7,l=4;for(0===g&&(k=138,l=3),d=0;d<=c;d++)if(e=g,g=b[2*(d+1)+1],!(++h<k&&e===g)){if(h<l){do j(a,e,a.bl_tree);while(0!==--h)}else 0!==e?(e!==f&&(j(a,e,a.bl_tree),h--),j(a,$,a.bl_tree),i(a,h-3,2)):h<=10?(j(a,_,a.bl_tree),i(a,h-3,3)):(j(a,aa,a.bl_tree),i(a,h-11,7));h=0,f=e,0===g?(k=138,l=3):e===g?(k=6,l=3):(k=7,l=4)}}function y(a){var b;for(w(a,a.dyn_ltree,a.l_desc.max_code),w(a,a.dyn_dtree,a.d_desc.max_code),v(a,a.bl_desc),b=U-1;b>=3&&0===a.bl_tree[2*ea[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function z(a,b,c,d){var e;for(i(a,b-257,5),i(a,c-1,5),i(a,d-4,4),e=0;e<d;e++)i(a,a.bl_tree[2*ea[e]+1],3);x(a,a.dyn_ltree,b-1),x(a,a.dyn_dtree,c-1)}function A(a){var b,c=4093624447;for(b=0;b<=31;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return I;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return J;for(b=32;b<R;b++)if(0!==a.dyn_ltree[2*b])return J;return I}function B(a){pa||(o(),pa=!0),a.l_desc=new f(a.dyn_ltree,ma),a.d_desc=new f(a.dyn_dtree,na),a.bl_desc=new f(a.bl_tree,oa),a.bi_buf=0,a.bi_valid=0,p(a)}function C(a,b,c,d){i(a,(L<<1)+(d?1:0),3),r(a,b,c,!0)}function D(a){i(a,M<<1,3),j(a,Z,ga),l(a)}function E(a,b,c,d){var e,f,g=0;a.level>0?(a.strm.data_type===K&&(a.strm.data_type=A(a)),v(a,a.l_desc),v(a,a.d_desc),g=y(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,f<=e&&(e=f)):e=f=c+5,c+4<=e&&b!==-1?C(a,b,c,d):a.strategy===H||f===e?(i(a,(M<<1)+(d?1:0),3),u(a,ga,ha)):(i(a,(N<<1)+(d?1:0),3),z(a,a.l_desc.max_code+1,a.d_desc.max_code+1,g+1),u(a,a.dyn_ltree,a.dyn_dtree)),p(a),d&&q(a)}function F(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ja[c]+R+1)]++,a.dyn_dtree[2*g(b)]++),a.last_lit===a.lit_bufsize-1}var G=a("../utils/common"),H=4,I=0,J=1,K=2,L=0,M=1,N=2,O=3,P=258,Q=29,R=256,S=R+1+Q,T=30,U=19,V=2*S+1,W=15,X=16,Y=7,Z=256,$=16,_=17,aa=18,ba=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ca=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],da=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fa=512,ga=new Array(2*(S+2));d(ga);var ha=new Array(2*T);d(ha);var ia=new Array(fa);d(ia);var ja=new Array(P-O+1);d(ja);var ka=new Array(Q);d(ka);var la=new Array(T);d(la);var ma,na,oa,pa=!1;c._tr_init=B,c._tr_stored_block=C,c._tr_flush_block=E,c._tr_tally=F,c._tr_align=D},{"../utils/common":62}],74:[function(a,b,c){"use strict";function d(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=d},{}]},{},[10])(10)});
yushen-duihua-1to5
/yushen_duihua_1to5-2022.10.3.0-py3-none-any.whl/YushenDuihua1to5/js/libs/zip.min.js
zip.min.js
(function () { 'use strict'; var isCommonjs = typeof module !== 'undefined' && module.exports; var keyboardAllowed = typeof Element !== 'undefined' && 'ALLOW_KEYBOARD_INPUT' in Element; var fn = (function () { var val; var valLength; var fnMap = [ [ 'requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange', 'fullscreenerror' ], // new WebKit [ 'webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange', 'webkitfullscreenerror' ], // old WebKit (Safari 5.1) [ 'webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange', 'webkitfullscreenerror' ], [ 'mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange', 'mozfullscreenerror' ], [ 'msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange', 'MSFullscreenError' ] ]; var i = 0; var l = fnMap.length; var ret = {}; for (; i < l; i++) { val = fnMap[i]; if (val && val[1] in document) { for (i = 0, valLength = val.length; i < valLength; i++) { ret[fnMap[0][i]] = val[i]; } return ret; } } return false; })(); var screenfull = { request: function (elem) { var request = fn.requestFullscreen; elem = elem || document.documentElement; // Work around Safari 5.1 bug: reports support for // keyboard in fullscreen even though it doesn't. // Browser sniffing, since the alternative with // setTimeout is even worse. if (/5\.1[\.\d]* Safari/.test(navigator.userAgent)) { elem[request](); } else { elem[request](keyboardAllowed && Element.ALLOW_KEYBOARD_INPUT); } }, exit: function () { document[fn.exitFullscreen](); }, toggle: function (elem) { if (this.isFullscreen) { this.exit(); } else { this.request(elem); } }, raw: fn }; if (!fn) { if (isCommonjs) { module.exports = false; } else { window.screenfull = false; } return; } Object.defineProperties(screenfull, { isFullscreen: { get: function () { return !!document[fn.fullscreenElement]; } }, element: { enumerable: true, get: function () { return document[fn.fullscreenElement]; } }, enabled: { enumerable: true, get: function () { // Coerce to boolean in case of old WebKit return !!document[fn.fullscreenEnabled]; } } }); if (isCommonjs) { module.exports = screenfull; } else { window.screenfull = screenfull; } })();
yushen-duihua-1to5
/yushen_duihua_1to5-2022.10.3.0-py3-none-any.whl/YushenDuihua1to5/js/libs/screenfull.js
screenfull.js
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.localforage=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){(function(a){"use strict";function c(){k=!0;for(var a,b,c=l.length;c;){for(b=l,l=[],a=-1;++a<c;)b[a]();c=l.length}k=!1}function d(a){1!==l.push(a)||k||e()}var e,f=a.MutationObserver||a.WebKitMutationObserver;if(f){var g=0,h=new f(c),i=a.document.createTextNode("");h.observe(i,{characterData:!0}),e=function(){i.data=g=++g%2}}else if(a.setImmediate||"undefined"==typeof a.MessageChannel)e="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var b=a.document.createElement("script");b.onreadystatechange=function(){c(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},a.document.documentElement.appendChild(b)}:function(){setTimeout(c,0)};else{var j=new a.MessageChannel;j.port1.onmessage=c,e=function(){j.port2.postMessage(0)}}var k,l=[];b.exports=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(a,b,c){"use strict";function d(){}function e(a){if("function"!=typeof a)throw new TypeError("resolver must be a function");this.state=s,this.queue=[],this.outcome=void 0,a!==d&&i(this,a)}function f(a,b,c){this.promise=a,"function"==typeof b&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),"function"==typeof c&&(this.onRejected=c,this.callRejected=this.otherCallRejected)}function g(a,b,c){o(function(){var d;try{d=b(c)}catch(b){return p.reject(a,b)}d===a?p.reject(a,new TypeError("Cannot resolve promise with itself")):p.resolve(a,d)})}function h(a){var b=a&&a.then;if(a&&"object"==typeof a&&"function"==typeof b)return function(){b.apply(a,arguments)}}function i(a,b){function c(b){f||(f=!0,p.reject(a,b))}function d(b){f||(f=!0,p.resolve(a,b))}function e(){b(d,c)}var f=!1,g=j(e);"error"===g.status&&c(g.value)}function j(a,b){var c={};try{c.value=a(b),c.status="success"}catch(a){c.status="error",c.value=a}return c}function k(a){return a instanceof this?a:p.resolve(new this(d),a)}function l(a){var b=new this(d);return p.reject(b,a)}function m(a){function b(a,b){function d(a){g[b]=a,++h!==e||f||(f=!0,p.resolve(j,g))}c.resolve(a).then(d,function(a){f||(f=!0,p.reject(j,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=new Array(e),h=0,i=-1,j=new this(d);++i<e;)b(a[i],i);return j}function n(a){function b(a){c.resolve(a).then(function(a){f||(f=!0,p.resolve(h,a))},function(a){f||(f=!0,p.reject(h,a))})}var c=this;if("[object Array]"!==Object.prototype.toString.call(a))return this.reject(new TypeError("must be an array"));var e=a.length,f=!1;if(!e)return this.resolve([]);for(var g=-1,h=new this(d);++g<e;)b(a[g]);return h}var o=a(1),p={},q=["REJECTED"],r=["FULFILLED"],s=["PENDING"];b.exports=c=e,e.prototype.catch=function(a){return this.then(null,a)},e.prototype.then=function(a,b){if("function"!=typeof a&&this.state===r||"function"!=typeof b&&this.state===q)return this;var c=new this.constructor(d);if(this.state!==s){var e=this.state===r?a:b;g(c,e,this.outcome)}else this.queue.push(new f(c,a,b));return c},f.prototype.callFulfilled=function(a){p.resolve(this.promise,a)},f.prototype.otherCallFulfilled=function(a){g(this.promise,this.onFulfilled,a)},f.prototype.callRejected=function(a){p.reject(this.promise,a)},f.prototype.otherCallRejected=function(a){g(this.promise,this.onRejected,a)},p.resolve=function(a,b){var c=j(h,b);if("error"===c.status)return p.reject(a,c.value);var d=c.value;if(d)i(a,d);else{a.state=r,a.outcome=b;for(var e=-1,f=a.queue.length;++e<f;)a.queue[e].callFulfilled(b)}return a},p.reject=function(a,b){a.state=q,a.outcome=b;for(var c=-1,d=a.queue.length;++c<d;)a.queue[c].callRejected(b);return a},c.resolve=k,c.reject=l,c.all=m,c.race=n},{1:1}],3:[function(a,b,c){(function(b){"use strict";"function"!=typeof b.Promise&&(b.Promise=a(2))}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(a){}}function f(){try{if(!ga)return!1;var a="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),b="function"==typeof fetch&&fetch.toString().indexOf("[native code")!==-1;return(!a||b)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(a){return!1}}function g(){return"function"==typeof openDatabase}function h(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&localStorage.setItem}catch(a){return!1}}function i(a,b){a=a||[],b=b||{};try{return new Blob(a,b)}catch(f){if("TypeError"!==f.name)throw f;for(var c="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,d=new c,e=0;e<a.length;e+=1)d.append(a[e]);return d.getBlob(b.type)}}function j(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}function k(a,b,c){"function"==typeof b&&a.then(b),"function"==typeof c&&a.catch(c)}function l(a){for(var b=a.length,c=new ArrayBuffer(b),d=new Uint8Array(c),e=0;e<b;e++)d[e]=a.charCodeAt(e);return c}function m(a){return new ja(function(b){var c=a.transaction(ka,"readwrite"),d=i([""]);c.objectStore(ka).put(d,"key"),c.onabort=function(a){a.preventDefault(),a.stopPropagation(),b(!1)},c.oncomplete=function(){var a=navigator.userAgent.match(/Chrome\/(\d+)/),c=navigator.userAgent.match(/Edge\//);b(c||!a||parseInt(a[1],10)>=43)}}).catch(function(){return!1})}function n(a){return"boolean"==typeof ha?ja.resolve(ha):m(a).then(function(a){return ha=a})}function o(a){var b=ia[a.name],c={};c.promise=new ja(function(a){c.resolve=a}),b.deferredOperations.push(c),b.dbReady?b.dbReady=b.dbReady.then(function(){return c.promise}):b.dbReady=c.promise}function p(a){var b=ia[a.name],c=b.deferredOperations.pop();c&&c.resolve()}function q(a,b){return new ja(function(c,d){if(a.db){if(!b)return c(a.db);o(a),a.db.close()}var e=[a.name];b&&e.push(a.version);var f=ga.open.apply(ga,e);b&&(f.onupgradeneeded=function(b){var c=f.result;try{c.createObjectStore(a.storeName),b.oldVersion<=1&&c.createObjectStore(ka)}catch(c){if("ConstraintError"!==c.name)throw c;console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),f.onerror=function(a){a.preventDefault(),d(f.error)},f.onsuccess=function(){c(f.result),p(a)}})}function r(a){return q(a,!1)}function s(a){return q(a,!0)}function t(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.version<a.db.version,e=a.version>a.db.version;if(d&&(a.version!==b&&console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function u(a){return new ja(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function v(a){var b=l(atob(a.data));return i([b],{type:a.type})}function w(a){return a&&a.__local_forage_encoded_blob}function x(a){var b=this,c=b._initReady().then(function(){var a=ia[b._dbInfo.name];if(a&&a.dbReady)return a.dbReady});return k(c,a,a),c}function y(a){function b(){return ja.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];ia||(ia={});var f=ia[d.name];f||(f={forages:[],db:null,dbReady:null,deferredOperations:[]},ia[d.name]=f),f.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=x);for(var g=[],h=0;h<f.forages.length;h++){var i=f.forages[h];i!==c&&g.push(i._initReady().catch(b))}var j=f.forages.slice(0);return ja.all(g).then(function(){return d.db=f.db,r(d)}).then(function(a){return d.db=a,t(d,c._defaultConfig.version)?s(d):a}).then(function(a){d.db=f.db=a,c._dbInfo=d;for(var b=0;b<j.length;b++){var e=j[b];e!==c&&(e._dbInfo.db=d.db,e._dbInfo.version=d.version)}})}function z(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=f.get(a);g.onsuccess=function(){var a=g.result;void 0===a&&(a=null),w(a)&&(a=v(a)),b(a)},g.onerror=function(){d(g.error)}}).catch(d)});return j(d,b),d}function A(a,b){var c=this,d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=f.openCursor(),h=1;g.onsuccess=function(){var c=g.result;if(c){var d=c.value;w(d)&&(d=v(d));var e=a(d,c.key,h++);void 0!==e?b(e):c.continue()}else b()},g.onerror=function(){d(g.error)}}).catch(d)});return j(d,b),d}function B(a,b,c){var d=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=new ja(function(c,e){var f;d.ready().then(function(){return f=d._dbInfo,"[object Blob]"===la.call(b)?n(f.db).then(function(a){return a?b:u(b)}):b}).then(function(b){var d=f.db.transaction(f.storeName,"readwrite"),g=d.objectStore(f.storeName),h=g.put(b,a);null===b&&(b=void 0),d.oncomplete=function(){void 0===b&&(b=null),c(b)},d.onabort=d.onerror=function(){var a=h.error?h.error:h.transaction.error;e(a)}}).catch(e)});return j(e,c),e}function C(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readwrite"),g=f.objectStore(e.storeName),h=g.delete(a);f.oncomplete=function(){b()},f.onerror=function(){d(h.error)},f.onabort=function(){var a=h.error?h.error:h.transaction.error;d(a)}}).catch(d)});return j(d,b),d}function D(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readwrite"),f=e.objectStore(d.storeName),g=f.clear();e.oncomplete=function(){a()},e.onabort=e.onerror=function(){var a=g.error?g.error:g.transaction.error;c(a)}}).catch(c)});return j(c,a),c}function E(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.count();f.onsuccess=function(){a(f.result)},f.onerror=function(){c(f.error)}}).catch(c)});return j(c,a),c}function F(a,b){var c=this,d=new ja(function(b,d){return a<0?void b(null):void c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=!1,h=f.openCursor();h.onsuccess=function(){var c=h.result;return c?void(0===a?b(c.key):g?b(c.key):(g=!0,c.advance(a))):void b(null)},h.onerror=function(){d(h.error)}}).catch(d)});return j(d,b),d}function G(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.openCursor(),g=[];f.onsuccess=function(){var b=f.result;return b?(g.push(b.key),void b.continue()):void a(g)},f.onerror=function(){c(f.error)}}).catch(c)});return j(c,a),c}function H(a){var b,c,d,e,f,g=.75*a.length,h=a.length,i=0;"="===a[a.length-1]&&(g--,"="===a[a.length-2]&&g--);var j=new ArrayBuffer(g),k=new Uint8Array(j);for(b=0;b<h;b+=4)c=na.indexOf(a[b]),d=na.indexOf(a[b+1]),e=na.indexOf(a[b+2]),f=na.indexOf(a[b+3]),k[i++]=c<<2|d>>4,k[i++]=(15&d)<<4|e>>2,k[i++]=(3&e)<<6|63&f;return j}function I(a){var b,c=new Uint8Array(a),d="";for(b=0;b<c.length;b+=3)d+=na[c[b]>>2],d+=na[(3&c[b])<<4|c[b+1]>>4],d+=na[(15&c[b+1])<<2|c[b+2]>>6],d+=na[63&c[b+2]];return c.length%3===2?d=d.substring(0,d.length-1)+"=":c.length%3===1&&(d=d.substring(0,d.length-2)+"=="),d}function J(a,b){var c="";if(a&&(c=Ea.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===Ea.call(a.buffer))){var d,e=qa;a instanceof ArrayBuffer?(d=a,e+=sa):(d=a.buffer,"[object Int8Array]"===c?e+=ua:"[object Uint8Array]"===c?e+=va:"[object Uint8ClampedArray]"===c?e+=wa:"[object Int16Array]"===c?e+=xa:"[object Uint16Array]"===c?e+=za:"[object Int32Array]"===c?e+=ya:"[object Uint32Array]"===c?e+=Aa:"[object Float32Array]"===c?e+=Ba:"[object Float64Array]"===c?e+=Ca:b(new Error("Failed to get type for BinaryArray"))),b(e+I(d))}else if("[object Blob]"===c){var f=new FileReader;f.onload=function(){var c=oa+a.type+"~"+I(this.result);b(qa+ta+c)},f.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(c){console.error("Couldn't convert value into a JSON string: ",a),b(null,c)}}function K(a){if(a.substring(0,ra)!==qa)return JSON.parse(a);var b,c=a.substring(Da),d=a.substring(ra,Da);if(d===ta&&pa.test(c)){var e=c.match(pa);b=e[1],c=c.substring(e[0].length)}var f=H(c);switch(d){case sa:return f;case ta:return i([f],{type:b});case ua:return new Int8Array(f);case va:return new Uint8Array(f);case wa:return new Uint8ClampedArray(f);case xa:return new Int16Array(f);case za:return new Uint16Array(f);case ya:return new Int32Array(f);case Aa:return new Uint32Array(f);case Ba:return new Float32Array(f);case Ca:return new Float64Array(f);default:throw new Error("Unkown type: "+d)}}function L(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"!=typeof a[d]?a[d].toString():a[d];var e=new ja(function(a,d){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(a){return d(a)}c.db.transaction(function(e){e.executeSql("CREATE TABLE IF NOT EXISTS "+c.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){b._dbInfo=c,a()},function(a,b){d(b)})})});return c.serializer=Fa,e}function M(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[a],function(a,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),b(d)},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function N(a,b){var c=this,d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;h<g;h++){var i=f.item(h),j=i.value;if(j&&(j=e.serializer.deserialize(j)),j=a(j,i.key,h+1),void 0!==j)return void b(j)}b()},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function O(a,b,c,d){var e=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var f=new ja(function(f,g){e.ready().then(function(){void 0===b&&(b=null);var h=b,i=e._dbInfo;i.serializer.serialize(b,function(b,j){j?g(j):i.db.transaction(function(c){c.executeSql("INSERT OR REPLACE INTO "+i.storeName+" (key, value) VALUES (?, ?)",[a,b],function(){f(h)},function(a,b){g(b)})},function(b){if(b.code===b.QUOTA_ERR){if(d>0)return void f(O.apply(e,[a,h,c,d-1]));g(b)}})})}).catch(g)});return j(f,c),f}function P(a,b,c){return O.apply(this,[a,b,c,1])}function Q(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("DELETE FROM "+e.storeName+" WHERE key = ?",[a],function(){b()},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function R(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})}).catch(c)});return j(c,a),c}function S(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})}).catch(c)});return j(c,a),c}function T(a,b){var c=this,d=new ja(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})}).catch(d)});return j(d,b),d}function U(a){var b=this,c=new ja(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e<c.rows.length;e++)d.push(c.rows.item(e).key);a(d)},function(a,b){c(b)})})}).catch(c)});return j(c,a),c}function V(a){var b=this,c={};if(a)for(var d in a)c[d]=a[d];return c.keyPrefix=c.name+"/",c.storeName!==b._defaultConfig.storeName&&(c.keyPrefix+=c.storeName+"/"),b._dbInfo=c,c.serializer=Fa,ja.resolve()}function W(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo.keyPrefix,c=localStorage.length-1;c>=0;c--){var d=localStorage.key(c);0===d.indexOf(a)&&localStorage.removeItem(d)}});return j(c,a),c}function X(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo,d=localStorage.getItem(b.keyPrefix+a);return d&&(d=b.serializer.deserialize(d)),d});return j(d,b),d}function Y(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=localStorage.length,g=1,h=0;h<f;h++){var i=localStorage.key(h);if(0===i.indexOf(d)){var j=localStorage.getItem(i);if(j&&(j=b.serializer.deserialize(j)),j=a(j,i.substring(e),g++),void 0!==j)return j}}});return j(d,b),d}function Z(a,b){var c=this,d=c.ready().then(function(){var b,d=c._dbInfo;try{b=localStorage.key(a)}catch(a){b=null}return b&&(b=b.substring(d.keyPrefix.length)),b});return j(d,b),d}function $(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo,c=localStorage.length,d=[],e=0;e<c;e++)0===localStorage.key(e).indexOf(a.keyPrefix)&&d.push(localStorage.key(e).substring(a.keyPrefix.length));return d});return j(c,a),c}function _(a){var b=this,c=b.keys().then(function(a){return a.length});return j(c,a),c}function aa(a,b){var c=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo;localStorage.removeItem(b.keyPrefix+a)});return j(d,b),d}function ba(a,b,c){var d=this;"string"!=typeof a&&(console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=d.ready().then(function(){void 0===b&&(b=null);var c=b;return new ja(function(e,f){var g=d._dbInfo;g.serializer.serialize(b,function(b,d){if(d)f(d);else try{localStorage.setItem(g.keyPrefix+a,b),e(c)}catch(a){"QuotaExceededError"!==a.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==a.name||f(a),f(a)}})})});return j(e,c),e}function ca(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function da(){for(var a=1;a<arguments.length;a++){var b=arguments[a];if(b)for(var c in b)b.hasOwnProperty(c)&&(Oa(b[c])?arguments[0][c]=b[c].slice():arguments[0][c]=b[c])}return arguments[0]}function ea(a){for(var b in Ja)if(Ja.hasOwnProperty(b)&&Ja[b]===a)return!0;return!1}var fa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},ga=e();"undefined"==typeof Promise&&a(3);var ha,ia,ja=Promise,ka="local-forage-detect-blob-support",la=Object.prototype.toString,ma={_driver:"asyncStorage",_initStorage:y,iterate:A,getItem:z,setItem:B,removeItem:C,clear:D,length:E,key:F,keys:G},na="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oa="~~local_forage_type~",pa=/^~~local_forage_type~([^~]+)~/,qa="__lfsc__:",ra=qa.length,sa="arbf",ta="blob",ua="si08",va="ui08",wa="uic8",xa="si16",ya="si32",za="ur16",Aa="ui32",Ba="fl32",Ca="fl64",Da=ra+sa.length,Ea=Object.prototype.toString,Fa={serialize:J,deserialize:K,stringToBuffer:H,bufferToString:I},Ga={_driver:"webSQLStorage",_initStorage:L,iterate:N,getItem:M,setItem:P,removeItem:Q,clear:R,length:S,key:T,keys:U},Ha={_driver:"localStorageWrapper",_initStorage:V,iterate:Y,getItem:X,setItem:ba,removeItem:aa,clear:W,length:_,key:Z,keys:$},Ia={},Ja={INDEXEDDB:"asyncStorage",LOCALSTORAGE:"localStorageWrapper",WEBSQL:"webSQLStorage"},Ka=[Ja.INDEXEDDB,Ja.WEBSQL,Ja.LOCALSTORAGE],La=["clear","getItem","iterate","key","keys","length","removeItem","setItem"],Ma={description:"",driver:Ka.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},Na={};Na[Ja.INDEXEDDB]=f(),Na[Ja.WEBSQL]=g(),Na[Ja.LOCALSTORAGE]=h();var Oa=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},Pa=function(){function a(b){d(this,a),this.INDEXEDDB=Ja.INDEXEDDB,this.LOCALSTORAGE=Ja.LOCALSTORAGE,this.WEBSQL=Ja.WEBSQL,this._defaultConfig=da({},Ma),this._config=da({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return a.prototype.config=function(a){if("object"===("undefined"==typeof a?"undefined":fa(a))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var b in a){if("storeName"===b&&(a[b]=a[b].replace(/\W/g,"_")),"version"===b&&"number"!=typeof a[b])return new Error("Database version must be a number.");this._config[b]=a[b]}return!("driver"in a&&a.driver)||this.setDriver(this._config.driver)}return"string"==typeof a?this._config[a]:this._config},a.prototype.defineDriver=function(a,b,c){var d=new ja(function(b,c){try{var d=a._driver,e=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),f=new Error("Custom driver name already in use: "+a._driver);if(!a._driver)return void c(e);if(ea(a._driver))return void c(f);for(var g=La.concat("_initStorage"),h=0;h<g.length;h++){var i=g[h];if(!i||!a[i]||"function"!=typeof a[i])return void c(e)}var j=ja.resolve(!0);"_support"in a&&(j=a._support&&"function"==typeof a._support?a._support():ja.resolve(!!a._support)),j.then(function(c){Na[d]=c,Ia[d]=a,b()},c)}catch(a){c(a)}});return k(d,b,c),d},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(a,b,c){var d=this,e=ja.resolve().then(function(){if(!ea(a)){if(Ia[a])return Ia[a];throw new Error("Driver not found.")}switch(a){case d.INDEXEDDB:return ma;case d.LOCALSTORAGE:return Ha;case d.WEBSQL:return Ga}});return k(e,b,c),e},a.prototype.getSerializer=function(a){var b=ja.resolve(Fa);return k(b,a),b},a.prototype.ready=function(a){var b=this,c=b._driverSet.then(function(){return null===b._ready&&(b._ready=b._initDriver()),b._ready});return k(c,a,a),c},a.prototype.setDriver=function(a,b,c){function d(){g._config.driver=g.driver()}function e(a){return g._extend(a),d(),g._ready=g._initStorage(g._config),g._ready}function f(a){return function(){function b(){for(;c<a.length;){var f=a[c];return c++,g._dbInfo=null,g._ready=null,g.getDriver(f).then(e).catch(b)}d();var h=new Error("No available storage method found.");return g._driverSet=ja.reject(h),g._driverSet}var c=0;return b()}}var g=this;Oa(a)||(a=[a]);var h=this._getSupportedDrivers(a),i=null!==this._driverSet?this._driverSet.catch(function(){return ja.resolve()}):ja.resolve();return this._driverSet=i.then(function(){var a=h[0];return g._dbInfo=null,g._ready=null,g.getDriver(a).then(function(a){g._driver=a._driver,d(),g._wrapLibraryMethodsWithReady(),g._initDriver=f(h)})}).catch(function(){d();var a=new Error("No available storage method found.");return g._driverSet=ja.reject(a),g._driverSet}),k(this._driverSet,b,c),this._driverSet},a.prototype.supports=function(a){return!!Na[a]},a.prototype._extend=function(a){da(this,a)},a.prototype._getSupportedDrivers=function(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c];this.supports(e)&&b.push(e)}return b},a.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0;a<La.length;a++)ca(this,La[a])},a.prototype.createInstance=function(b){return new a(b)},a}(),Qa=new Pa;b.exports=Qa},{3:3}]},{},[4])(4)});
yushen-duihua-1to5
/yushen_duihua_1to5-2022.10.3.0-py3-none-any.whl/YushenDuihua1to5/js/libs/localforage.min.js
localforage.min.js
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Gaussian(Distribution): """ Gaussian distribution class for calculating and visualizing a Gaussian distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing the standard deviation of the distribution data_list (list of floats) a list of floats extracted from the data file """ def __init__(self, mu=0, sigma=1): Distribution.__init__(self, mu, sigma) def calculate_mean(self): """Function to calculate the mean of the data set. Args: None Returns: float: mean of the data set """ avg = 1.0 * sum(self.data) / len(self.data) self.mean = avg return self.mean def calculate_stdev(self, sample=True): """Function to calculate the standard deviation of the data set. Args: sample (bool): whether the data represents a sample or population Returns: float: standard deviation of the data set """ if sample: n = len(self.data) - 1 else: n = len(self.data) mean = self.calculate_mean() sigma = 0 for d in self.data: sigma += (d - mean) ** 2 sigma = math.sqrt(sigma / n) self.stdev = sigma return self.stdev def plot_histogram(self): """Function to output a histogram of the instance variable data using matplotlib pyplot library. Args: None Returns: None """ plt.hist(self.data) plt.title('Histogram of Data') plt.xlabel('data') plt.ylabel('count') def pdf(self, x): """Probability density function calculator for the gaussian distribution. Args: x (float): point for calculating the probability density function Returns: float: probability density function output """ return (1.0 / (self.stdev * math.sqrt(2*math.pi))) * math.exp(-0.5*((x - self.mean) / self.stdev) ** 2) def plot_histogram_pdf(self, n_spaces = 50): """Function to plot the normalized histogram of the data and a plot of the probability density function along the same range Args: n_spaces (int): number of data points Returns: list: x values for the pdf plot list: y values for the pdf plot """ mu = self.mean sigma = self.stdev min_range = min(self.data) max_range = max(self.data) # calculates the interval between x values interval = 1.0 * (max_range - min_range) / n_spaces x = [] y = [] # calculate the x values to visualize for i in range(n_spaces): tmp = min_range + interval*i x.append(tmp) y.append(self.pdf(tmp)) # make the plots fig, axes = plt.subplots(2,sharex=True) fig.subplots_adjust(hspace=.5) axes[0].hist(self.data, density=True) axes[0].set_title('Normed Histogram of Data') axes[0].set_ylabel('Density') axes[1].plot(x, y) axes[1].set_title('Normal Distribution for \n Sample Mean and Sample Standard Deviation') axes[0].set_ylabel('Density') plt.show() return x, y def __add__(self, other): """Function to add together two Gaussian distributions Args: other (Gaussian): Gaussian instance Returns: Gaussian: Gaussian distribution """ result = Gaussian() result.mean = self.mean + other.mean result.stdev = math.sqrt(self.stdev ** 2 + other.stdev ** 2) return result def __repr__(self): """Function to output the characteristics of the Gaussian instance Args: None Returns: string: characteristics of the Gaussian """ return "mean {}, standard deviation {}".format(self.mean, self.stdev)
yusprob-distribution
/yusprob_distribution-0.1.tar.gz/yusprob_distribution-0.1/yusprob_distribution/Gaussiandistribution.py
Gaussiandistribution.py
import math import matplotlib.pyplot as plt from .Generaldistribution import Distribution class Binomial(Distribution): """ Binomial distribution class for calculating and visualizing a Binomial distribution. Attributes: mean (float) representing the mean value of the distribution stdev (float) representing the standard deviation of the distribution data_list (list of floats) a list of floats to be extracted from the data file p (float) representing the probability of an event occurring n (int) number of trials TODO: Fill out all functions below """ def __init__(self, prob=.5, size=20): self.n = size self.p = prob Distribution.__init__(self, self.calculate_mean(), self.calculate_stdev()) def calculate_mean(self): """Function to calculate the mean from p and n Args: None Returns: float: mean of the data set """ self.mean = self.p * self.n return self.mean def calculate_stdev(self): """Function to calculate the standard deviation from p and n. Args: None Returns: float: standard deviation of the data set """ self.stdev = math.sqrt(self.n * self.p * (1 - self.p)) return self.stdev def replace_stats_with_data(self): """Function to calculate p and n from the data set Args: None Returns: float: the p value float: the n value """ self.n = len(self.data) self.p = 1.0 * sum(self.data) / len(self.data) self.mean = self.calculate_mean() self.stdev = self.calculate_stdev() def plot_bar(self): """Function to output a histogram of the instance variable data using matplotlib pyplot library. Args: None Returns: None """ plt.bar(x = ['0', '1'], height = [(1 - self.p) * self.n, self.p * self.n]) plt.title('Bar Chart of Data') plt.xlabel('outcome') plt.ylabel('count') def pdf(self, k): """Probability density function calculator for the gaussian distribution. Args: x (float): point for calculating the probability density function Returns: float: probability density function output """ a = math.factorial(self.n) / (math.factorial(k) * (math.factorial(self.n - k))) b = (self.p ** k) * (1 - self.p) ** (self.n - k) return a * b def plot_bar_pdf(self): """Function to plot the pdf of the binomial distribution Args: None Returns: list: x values for the pdf plot list: y values for the pdf plot """ x = [] y = [] # calculate the x values to visualize for i in range(self.n + 1): x.append(i) y.append(self.pdf(i)) # make the plots plt.bar(x, y) plt.title('Distribution of Outcomes') plt.ylabel('Probability') plt.xlabel('Outcome') plt.show() return x, y def __add__(self, other): """Function to add together two Binomial distributions with equal p Args: other (Binomial): Binomial instance Returns: Binomial: Binomial distribution """ try: assert self.p == other.p, 'p values are not equal' except AssertionError as error: raise result = Binomial() result.n = self.n + other.n result.p = self.p result.calculate_mean() result.calculate_stdev() return result def __repr__(self): """Function to output the characteristics of the Binomial instance Args: None Returns: string: characteristics of the Gaussian """ return "mean {}, standard deviation {}, p {}, n {}".\ format(self.mean, self.stdev, self.p, self.n)
yusprob-distribution
/yusprob_distribution-0.1.tar.gz/yusprob_distribution-0.1/yusprob_distribution/Binomialdistribution.py
Binomialdistribution.py
#Yutils >A Python utility package written by Yuval Arbel ##module base >yutils.base ##module conn >yutils.conn ##module exceptions >yutils.exceptions ##module ml >yutils.ml ##module queries >yutils.queries ##module tools >yutils.tools ##function match_arabic_nls_lang >yutils.match_arabic_nls_lang ###module attribute_dict >yutils.base.attribute_dict ###module generic_object >yutils.base.generic_object ###module input_checker >yutils.base.input_checker ###module list_container >yutils.base.list_container ###module pretty_printer >yutils.base.pretty_printer ###module updating_dict >yutils.base.updating_dict ####object AttributeDict >yutils.base.attribute_dict.AttributeDict ####object GenericObject >yutils.base.generic_object.GenericObject A generic object you can easily use for your scripts, with a pprint and a str/repr for easy printing :param object_name: The name for your object! :type object_name: str ####function dict_to_generic_object >yutils.base.generic_object.dict_to_generic_object Converts a dictionary (recursively) to a GenericObject, with keys as attributes. :param dictionary: dictionary to convert (key-values will be converted to attribute-values) :type dictionary: dict :param object_name: a name for your new object's type :type object_name: str :return: GenericObject object ####object InputChecker >yutils.base.input_checker.InputChecker Base object for making a Python object more static-typed. It is useful for checking __init__ argument inputs (type and content). Type check is defined by _INPUT_TYPES class constant. (see yutils.tools.check_object_type for usage) Option check is defined by _INPUT_OPTIONS class constant. This also: - creates self._inputs as the inputs dict given, as an AttributeDict. - adds each input in inputs as an attribute to your object. :param inputs: your __init__ inputs, can be anything you wish to check :raises: yutils.exceptions.WrongDatatype if any input is not of the specified type, defined by _INPUT_TYPES yutils.exceptions.InputError if any input is not one of the options, defined by _INPUT_OPTIONS ####object ListContainer >yutils.base.list_container.ListContainer An object that wraps a list, allowing you to use your object as a list and configure it as you wish. :param _list: the original list you wish to keep in the backbone of your object :type _list: list :param _objects_type: a plural name for your objects in your ListContainer! This is for printing your object. For Example: >>> class Students(ListContainer): >>> def __init__(self): >>> super(Students, self).__init__([], 'students') :type _objects_type: str ####object PrintableObject >yutils.base.pretty_printer.PrintableObject An object you can derive from, that has a pprint method - printing all set attributes ####object DictValueList >yutils.base.updating_dict.DictValueList Initialize self. See help(type(self)) for accurate signature. ####object UpdatingDict >yutils.base.updating_dict.UpdatingDict Initialize self. See help(type(self)) for accurate signature. ###module sql_connection_details >yutils.conn.sql_connection_details ####object ConnectionDetails >yutils.conn.sql_connection_details.ConnectionDetails Initialize self. See help(type(self)) for accurate signature. ####object ElasticConnectionDetails >yutils.conn.sql_connection_details.ElasticConnectionDetails Initialize self. See help(type(self)) for accurate signature. ####object MSSQLConnectionDetails >yutils.conn.sql_connection_details.MSSQLConnectionDetails Initialize self. See help(type(self)) for accurate signature. ####object MySQLConnectionDetails >yutils.conn.sql_connection_details.MySQLConnectionDetails Initialize self. See help(type(self)) for accurate signature. ####object OracleConnectionDetails >yutils.conn.sql_connection_details.OracleConnectionDetails Initialize self. See help(type(self)) for accurate signature. ###module exceptions >yutils.exceptions.exceptions ####object CodeMistake >yutils.exceptions.exceptions.CodeMistake Gets raised to find mistakes when writing code :param mistake_string: an error message explaining why this was raised :type mistake_string: str ####object InputError >yutils.exceptions.exceptions.InputError Gets raised when the input wasn't as expected (e.g. isn't a valid option) :param error_string: an error message explaining the InputError :type error_string: str ####object MissingAttribute >yutils.exceptions.exceptions.MissingAttribute Gets raised when an attribute was expected in a certain class :param class_object: the object itself that is missing an attribute :type class_object: object :param attribute_name: the name of the attribute that is missing :type attribute_name: str ####object MissingInput >yutils.exceptions.exceptions.MissingInput Gets raised when an input was expected in a certain class but not received :param class_object: the object itself that is missing an attribute :type class_object: object :param attribute_name: the name of the attribute that is missing :type attribute_name: str ####object UncaughtEndCase >yutils.exceptions.exceptions.UncaughtEndCase Gets raised to catch unexpected cases in the future :param explanation: an optional string to explain the end case. Default: 'An uncaught end case was found. Check it out!' :type explanation: str ####object UserCancellation >yutils.exceptions.exceptions.UserCancellation Gets raised when a user chooses to cancel an operation, and you wish the program to abort. :param operation_name: (optional) the operation the user chose to cancel :type operation_name: (optional) str ####object WrongDatatype >yutils.exceptions.exceptions.WrongDatatype Gets raised when something isn't the right datatype as was expected :param name: object name :type name: str :param expectation: expected type :type expectation: type or str :param reality: the object's actual type :type reality: type or str ####object WrongInputDatatype >yutils.exceptions.exceptions.WrongInputDatatype Gets raised when an input argument isn't the right datatype as was expected :param name: object name :type name: str :param expectation: expected type :type expectation: type or str :param reality: the object's actual type :type reality: type or str ####object YutilsException >yutils.exceptions.exceptions.YutilsException Initialize self. See help(type(self)) for accurate signature. ###module classification >yutils.ml.classification ###module features >yutils.ml.features ###module linear_regression >yutils.ml.linear_regression ###module ml_base >yutils.ml.ml_base ###module regression >yutils.ml.regression ####object LogisticRegression >yutils.ml.classification.LogisticRegression ####object LogisticRegressionOptimizedClassifier >yutils.ml.classification.LogisticRegressionOptimizedClassifier ####object MultiClassClassification >yutils.ml.classification.MultiClassClassification ####object FeatureNormalizer >yutils.ml.features.FeatureNormalizer Normalizes features for a ML object :param info: info to normalize, across column axis (normalizes each column by different normalization data) :type info: ####object LinearRegression >yutils.ml.linear_regression.LinearRegression Not written yet... :param training_data: :param training_results: :param learning_rate: :param iterations: :param normalize_data: :param verbose: ####object NormalEquation >yutils.ml.linear_regression.NormalEquation Not explained yet... :param training_data: :param training_results: :param assess_for_warning: :param verbose: ####object MLObject >yutils.ml.ml_base.MLObject Base object for making a Python object more static-typed. It is useful for checking __init__ argument inputs (type and content). Type check is defined by _INPUT_TYPES class constant. (see yutils.tools.check_object_type for usage) Option check is defined by _INPUT_OPTIONS class constant. This also: - creates self._inputs as the inputs dict given, as an AttributeDict. - adds each input in inputs as an attribute to your object. :param inputs: your __init__ inputs, can be anything you wish to check :raises: yutils.exceptions.WrongDatatype if any input is not of the specified type, defined by _INPUT_TYPES yutils.exceptions.InputError if any input is not one of the options, defined by _INPUT_OPTIONS ####function create_data_from_text_file >yutils.ml.ml_base.create_data_from_text_file ####object Regression >yutils.ml.regression.Regression ###module db_connection >yutils.queries.db_connection ###module oracle_field_list_format >yutils.queries.oracle_field_list_format ####module db_connection >yutils.queries.db_connection.db_connection ####module fetchers >yutils.queries.db_connection.fetchers #####object DBConnection >yutils.queries.db_connection.db_connection.DBConnection Wraps a connection to a DB, for executing SQL queries, using given connection_details. :param connection_details: Details for connection to the wanted DB :type: connection_details: yutils.conn.sql_connection_details.ConnectionDetails :param verbose: If to print warnings or not :type verbose: bool #####module base_fetcher >yutils.queries.db_connection.fetchers.base_fetcher #####module elastic >yutils.queries.db_connection.fetchers.elastic #####module mssql >yutils.queries.db_connection.fetchers.mssql #####module mysql >yutils.queries.db_connection.fetchers.mysql #####module oracle >yutils.queries.db_connection.fetchers.oracle ######object ElasticSearchFetcher >yutils.queries.db_connection.fetchers.elastic.ElasticSearchFetcher ######object MSSQLFetcher >yutils.queries.db_connection.fetchers.mssql.MSSQLFetcher ######object MySQLFetcher >yutils.queries.db_connection.fetchers.mysql.MySQLFetcher ######object OracleFetcher >yutils.queries.db_connection.fetchers.oracle.OracleFetcher ####function format_oracle_field_list >yutils.queries.oracle_field_list_format.format_oracle_field_list Takes a list that can be more than 999 values long, and wraps them in SQL OR clauses. This is useful because Oracle can only accept lists 1000 values long. :param field_name: the name of the column you are querying :type field_name: str :param value_list: list of your values to format into the query :type value_list: list of str :return: formatted string containing your new WHERE clause :rtype: unicode ###module case_conversions >yutils.tools.case_conversions ###module files >yutils.tools.files ###module list >yutils.tools.list ###module numpy_tools >yutils.tools.numpy_tools ###module pretty_print >yutils.tools.pretty_print ###module str >yutils.tools.str ###module xlsx_creator >yutils.tools.xlsx_creator ###function check_object_type >yutils.tools.check_object_type This checks the types of an object using a certain syntax: Lets say we have an object_to_check and the types_to_validate. The object_to_check is the object :param object_to_check: the object you wish to check its type, and raise an exception should its type not be correct :type object_to_check: ....that's what we're here for.... :param types_to_validate: defines the wanted types for the object to check: :type types_to_validate: type - checks that object_to_check is of that type Example: float will make sure object_to_check is a float list of types - checks that object_to_check is one of the types in the list Example: [int, float] will make sure object_to_check is either an int or a float tuple of types - checks hierarchically: checks that object_to_check is of the type of the first item, then checks that each item in object_to_check is of the type of the second item, etc. Remember, all types in the tuple except the last must support indexing. Example: (list, str) will make sure object_to_check is a list of strings (tuple, [int, float]) will make sure object_to_check is a tuple of either ints or floats dict - checks that object_to_check is an object. It's type is defined by key 'type', with other keys to be checked as the object's attributes. Example: {'type': Person, 'age': int} will make sure object_to_check is a Person object, with an 'age' attribute that is an int. All values can have as many recursive dimensions as wanted. :param input_name: Do not use, this is for recursive inner use. More examples Lets say we create: integer = 13 unicode_str = u'foo' int_list = list(range(10)) input_object = MyObject() input_object.num = 3 input_object.lis = [1, 'bar'] input_object.3dlist = [[(1, 2, 3), (1, 1, 1)], [('a', 'b', 'c'), [7, 8, 9]]] We can send: check_object_type(integer, int) check_object_type(unicode_str, unicode) check_object_type(int_list, (list, int)) check_object_type(input_object, {'type': MyObject, 'num': int, 'lis': (list, [int, str]), '3dlist': (list, list, [tuple, list], [int, str, unicode]) }) :raises: Because of invalid inputs: yutils.exceptions.CodeMistake - When no 'type' key is found (for when types_to_validate is a dict) yutils.exceptions.WrongDatatype - When no type type is found when isinstance-ing an object's type Exceptions raised by check: yutils.exceptions.WrongInputDatatype - When the type is not correct during validation yutils.exceptions.MissingInput - When an attribute is missing (for when types_to_validate is a dict) ###function equivilence >yutils.tools.equivilence Divides an iterator to groups, based on the function's result of every item in the iterator. Returns dict of lists. Example: >>> equivilence(range(10), lambda x: x % 3) >>>out>>> {0: [0, 3, 6, 9], >>>out>>> 1: [1, 4, 7], >>>out>>> 2: [2, 5, 8]} :param iterator: an iterator you wish to run on and divide into groups :type iterator: iterator :param func: a function to activate on each iterator item - its result decides the return dict's keys. :type func: function :rtype: dict of lists (lists are groups of original iterator) ####function camel_back_to_snake_case >yutils.tools.case_conversions.camel_back_to_snake_case Turns a camelBack word to a snake_case word :param camel_back_word: wordInCamelCase :return: a_word_in_snake_case ####function camel_case_to_snake_case >yutils.tools.case_conversions.camel_case_to_snake_case Turns a CamelCase word to a snake_case word :param camel_case_word: AWordInCamelCase :return: a_word_in_snake_case ####function snake_case_to_camel_back >yutils.tools.case_conversions.snake_case_to_camel_back Turns a snake_case word to a camelBack word :param snake_case_word: a_word_in_snake_case :return: wordInCamelCase ####function snake_case_to_camel_case >yutils.tools.case_conversions.snake_case_to_camel_case Turns a snake_case word to a CamelCase word :param snake_case_word: a_word_in_snake_case :return: AWordInCamelCase ####function get_file_length >yutils.tools.files.get_file_length This function gets a file path and returns its length without reading it :param file_path: path to return length of :type file_path: str :return: file length (in bytes) :rtype: int ####function recursive_glob >yutils.tools.files.recursive_glob Returns a list of all files in directory including sub-directories. :param dir_name: Dir name to glob recursively on :type dir_name: str :param ignore_hidden: if to ignore hidden files (that start with '.') :type ignore_hidden: bool :return: list of all files in the dir_name :rtype: list of str ####function save_file >yutils.tools.files.save_file This function saves the file content to the destination dir (defaulted to ".") as base_name + extension, but adds a counter if needed. :param content: the content of the file :type content: str :param file_base_name: the future file name without extension :type file_base_name: str :param extension: the file name extension (for example: 'xlsx') :type extension: str :param dest_dir: where to save the file Default: current directory :type dest_dir: str :return: full file path file was saved to :rtype: unicode ####function make_list >yutils.tools.list.make_list ####function repr_list >yutils.tools.list.repr_list Returns an iterator as a string, representing the list. :param iterator: the iterator you wish to represent as a list :type iterator: iterator :return: representation of your iterator as a list :rtype: unicode ####function get_indices_containing_all_substrings >yutils.tools.numpy_tools.get_indices_containing_all_substrings ####function is_iterable >yutils.tools.numpy_tools.is_iterable ####function magic >yutils.tools.numpy_tools.magic Implementation taken from https://stackoverflow.com/questions/47834140/numpy-equivalent-of-matlabs-magic from user: user6655984 ####function normalize_array >yutils.tools.numpy_tools.normalize_array ####function r2c >yutils.tools.numpy_tools.r2c ####function to_array >yutils.tools.numpy_tools.to_array ####function pprint_dict >yutils.tools.pretty_print.pprint_dict Prints a dict in a very pretty way! :param dictionary: your dict to print :type dictionary: dict :param long_value_limit: when a dict value exceeds this limit, it won't be printed Default: 120 :type long_value_limit: int :param long_value_filler: A filler to print instead of a long value, must have {type} and {length} fields! Default: '<Long {type} object with repr length {length}>' :type long_value_filler: str :return: None ####function pprint_list >yutils.tools.pretty_print.pprint_list Prints a list in an easy, short way. :param list_to_print: the list you wish to print :type list_to_print: list :return: None ####function turn_numeric >yutils.tools.str.turn_numeric Turns a string into either an int or a float :param string: a string to assess :type string: str :rtype: str or float :raises: TypeError if no type was found ####object XLSXCreator >yutils.tools.xlsx_creator.XLSXCreator A class to create an XLSX file from a table. It will format the table inside an actual excel's table, according to each field's width. :param headers: The fields of the table (headers) :type headers: list of unicode :param table: The table :type table: matrix - list of lists of the same lengths (cells may be any datatype) :param output_path: The path where to save the excel :type output_path: unicode ####function create_xlsx >yutils.tools.xlsx_creator.create_xlsx Creates an XLSX file from a table. It will format the table inside an actual excel's table, according to each field's width. :param headers: The fields of the table (headers) :type headers: list of unicode :param table: The table :type table: matrix - list of lists of the same lengths (cells may be any datatype) :param output_path: The path where to save the excel :type output_path: unicode ####function get_next_column >yutils.tools.xlsx_creator.get_next_column ####function get_next_letter >yutils.tools.xlsx_creator.get_next_letter ####function table_to_str >yutils.tools.xlsx_creator.table_to_str matrix good for the function xlsxwriter.Worksheet.add_table(['data': table)) :param table: matrix - list of lists of the same lengths (cells may be any datatype) :return: fully string matrix
yutils
/yutils-1.4.0.tar.gz/yutils-1.4.0/README.backup.md
README.backup.md
{"base": {"type": "module", "under": {"attribute_dict": {"type": "module", "under": {"AttributeDict": {"type": "object", "under": {}, "doc": "", "path": "yutils.base.attribute_dict.AttributeDict"}}, "doc": "", "path": "yutils.base.attribute_dict"}, "generic_object": {"type": "module", "under": {"GenericObject": {"type": "object", "under": {}, "doc": "\n A generic object you can easily use for your scripts, with a pprint and a str/repr for easy printing\n ", "path": "yutils.base.generic_object.GenericObject", "init_doc": "\n :param object_name: The name for your object!\n :type object_name: str\n "}, "dict_to_generic_object": {"type": "function", "under": {}, "doc": "\n Converts a dictionary (recursively) to a GenericObject, with keys as attributes.\n\n :param dictionary: dictionary to convert (key-values will be converted to attribute-values)\n :type dictionary: dict\n :param object_name: a name for your new object's type\n :type object_name: str\n :return: GenericObject object\n ", "path": "yutils.base.generic_object.dict_to_generic_object"}}, "doc": "", "path": "yutils.base.generic_object"}, "input_checker": {"type": "module", "under": {"InputChecker": {"type": "object", "under": {}, "doc": "", "path": "yutils.base.input_checker.InputChecker", "init_doc": "\n Base object for making a Python object more static-typed.\n It is useful for checking __init__ argument inputs (type and content).\n\n Type check is defined by _INPUT_TYPES class constant. (see yutils.tools.check_object_type for usage)\n Option check is defined by _INPUT_OPTIONS class constant.\n\n This also:\n - creates self._inputs as the inputs dict given, as an AttributeDict.\n - adds each input in inputs as an attribute to your object.\n\n :param inputs: your __init__ inputs, can be anything you wish to check\n\n :raises: yutils.exceptions.WrongDatatype if any input is not of the specified type, defined by _INPUT_TYPES\n yutils.exceptions.InputError if any input is not one of the options, defined by _INPUT_OPTIONS\n "}}, "doc": "", "path": "yutils.base.input_checker"}, "list_container": {"type": "module", "under": {"ListContainer": {"type": "object", "under": {}, "doc": "\n An object that wraps a list, allowing you to use your object as a list and configure it as you wish.\n ", "path": "yutils.base.list_container.ListContainer", "init_doc": "\n :param _list: the original list you wish to keep in the backbone of your object\n :type _list: list\n :param _objects_type: a plural name for your objects in your ListContainer! This is for printing your object.\n For Example:\n >>> class Students(ListContainer):\n >>> def __init__(self):\n >>> super(Students, self).__init__([], 'students')\n :type _objects_type: str\n "}}, "doc": "", "path": "yutils.base.list_container"}, "pretty_printer": {"type": "module", "under": {"PrintableObject": {"type": "object", "under": {}, "doc": "\n An object you can derive from, that has a pprint method - printing all set attributes\n ", "path": "yutils.base.pretty_printer.PrintableObject"}}, "doc": "", "path": "yutils.base.pretty_printer"}, "updating_dict": {"type": "module", "under": {"DictValueList": {"type": "object", "under": {}, "doc": "", "path": "yutils.base.updating_dict.DictValueList", "init_doc": "Initialize self. See help(type(self)) for accurate signature."}, "UpdatingDict": {"type": "object", "under": {}, "doc": "", "path": "yutils.base.updating_dict.UpdatingDict", "init_doc": "Initialize self. See help(type(self)) for accurate signature."}}, "doc": "", "path": "yutils.base.updating_dict"}}, "doc": "", "path": "yutils.base"}, "conn": {"type": "module", "under": {"sql_connection_details": {"type": "module", "under": {"ConnectionDetails": {"type": "object", "under": {}, "doc": "", "path": "yutils.conn.sql_connection_details.ConnectionDetails", "init_doc": "Initialize self. See help(type(self)) for accurate signature."}, "ElasticConnectionDetails": {"type": "object", "under": {}, "doc": "", "path": "yutils.conn.sql_connection_details.ElasticConnectionDetails", "init_doc": "Initialize self. See help(type(self)) for accurate signature."}, "MSSQLConnectionDetails": {"type": "object", "under": {}, "doc": "", "path": "yutils.conn.sql_connection_details.MSSQLConnectionDetails", "init_doc": "Initialize self. See help(type(self)) for accurate signature."}, "MySQLConnectionDetails": {"type": "object", "under": {}, "doc": "", "path": "yutils.conn.sql_connection_details.MySQLConnectionDetails", "init_doc": "Initialize self. See help(type(self)) for accurate signature."}, "OracleConnectionDetails": {"type": "object", "under": {}, "doc": "", "path": "yutils.conn.sql_connection_details.OracleConnectionDetails", "init_doc": "Initialize self. See help(type(self)) for accurate signature."}}, "doc": "", "path": "yutils.conn.sql_connection_details"}}, "doc": "", "path": "yutils.conn"}, "exceptions": {"type": "module", "under": {"exceptions": {"type": "module", "under": {"CodeMistake": {"type": "object", "under": {}, "doc": "\n Gets raised to find mistakes when writing code\n ", "path": "yutils.exceptions.exceptions.CodeMistake", "init_doc": "\n :param mistake_string: an error message explaining why this was raised\n :type mistake_string: str\n "}, "InputError": {"type": "object", "under": {}, "doc": "\n Gets raised when the input wasn't as expected (e.g. isn't a valid option)\n ", "path": "yutils.exceptions.exceptions.InputError", "init_doc": "\n :param error_string: an error message explaining the InputError\n :type error_string: str\n "}, "MissingAttribute": {"type": "object", "under": {}, "doc": "\n Gets raised when an attribute was expected in a certain class\n ", "path": "yutils.exceptions.exceptions.MissingAttribute", "init_doc": "\n :param class_object: the object itself that is missing an attribute\n :type class_object: object\n :param attribute_name: the name of the attribute that is missing\n :type attribute_name: str\n "}, "MissingInput": {"type": "object", "under": {}, "doc": "\n Gets raised when an input was expected in a certain class but not received\n ", "path": "yutils.exceptions.exceptions.MissingInput", "init_doc": "\n :param class_object: the object itself that is missing an attribute\n :type class_object: object\n :param attribute_name: the name of the attribute that is missing\n :type attribute_name: str\n "}, "UncaughtEndCase": {"type": "object", "under": {}, "doc": "\n Gets raised to catch unexpected cases in the future\n ", "path": "yutils.exceptions.exceptions.UncaughtEndCase", "init_doc": "\n :param explanation: an optional string to explain the end case.\n Default: 'An uncaught end case was found. Check it out!'\n :type explanation: str\n "}, "UserCancellation": {"type": "object", "under": {}, "doc": "\n Gets raised when a user chooses to cancel an operation, and you wish the program to abort.\n ", "path": "yutils.exceptions.exceptions.UserCancellation", "init_doc": "\n :param operation_name: (optional) the operation the user chose to cancel\n :type operation_name: (optional) str\n "}, "WrongDatatype": {"type": "object", "under": {}, "doc": "\n Gets raised when something isn't the right datatype as was expected\n ", "path": "yutils.exceptions.exceptions.WrongDatatype", "init_doc": "\n :param name: object name\n :type name: str\n :param expectation: expected type\n :type expectation: type or str\n :param reality: the object's actual type\n :type reality: type or str\n "}, "WrongInputDatatype": {"type": "object", "under": {}, "doc": "\n Gets raised when an input argument isn't the right datatype as was expected\n ", "path": "yutils.exceptions.exceptions.WrongInputDatatype", "init_doc": "\n :param name: object name\n :type name: str\n :param expectation: expected type\n :type expectation: type or str\n :param reality: the object's actual type\n :type reality: type or str\n "}, "YutilsException": {"type": "object", "under": {}, "doc": "", "path": "yutils.exceptions.exceptions.YutilsException", "init_doc": "Initialize self. See help(type(self)) for accurate signature."}}, "doc": "", "path": "yutils.exceptions.exceptions"}}, "doc": "", "path": "yutils.exceptions"}, "match_arabic_nls_lang": {"type": "function", "under": {}, "doc": "", "path": "yutils.match_arabic_nls_lang"}, "ml": {"type": "module", "under": {"classification": {"type": "module", "under": {"LogisticRegressionClassifier": {"type": "object", "under": {}, "doc": "", "path": "yutils.ml.classification.LogisticRegressionClassifier"}, "LogisticRegressionOptimizedClassifier": {"type": "object", "under": {}, "doc": "", "path": "yutils.ml.classification.LogisticRegressionOptimizedClassifier"}, "MultiClassClassification": {"type": "object", "under": {}, "doc": "", "path": "yutils.ml.classification.MultiClassClassification"}}, "doc": "", "path": "yutils.ml.classification"}, "features": {"type": "module", "under": {"FeatureNormalizer": {"type": "object", "under": {}, "doc": "", "path": "yutils.ml.features.FeatureNormalizer", "init_doc": "\n Normalizes features for a ML object\n\n :param info: info to normalize, across column axis (normalizes each column by different normalization data)\n :type info:\n "}}, "doc": "", "path": "yutils.ml.features"}, "linear_regression": {"type": "module", "under": {"LinearRegression": {"type": "object", "under": {}, "doc": "", "path": "yutils.ml.linear_regression.LinearRegression", "init_doc": "\n Not written yet...\n\n :param training_data:\n :param training_results:\n :param learning_rate:\n :param iterations:\n :param normalize_data:\n :param verbose:\n "}, "NormalEquation": {"type": "object", "under": {}, "doc": "", "path": "yutils.ml.linear_regression.NormalEquation", "init_doc": "\n Not explained yet...\n\n :param training_data:\n :param training_results:\n :param assess_for_warning:\n :param verbose:\n "}}, "doc": "", "path": "yutils.ml.linear_regression"}, "ml_base": {"type": "module", "under": {"MLObject": {"type": "object", "under": {}, "doc": "", "path": "yutils.ml.ml_base.MLObject", "init_doc": "\n Base object for making a Python object more static-typed.\n It is useful for checking __init__ argument inputs (type and content).\n\n Type check is defined by _INPUT_TYPES class constant. (see yutils.tools.check_object_type for usage)\n Option check is defined by _INPUT_OPTIONS class constant.\n\n This also:\n - creates self._inputs as the inputs dict given, as an AttributeDict.\n - adds each input in inputs as an attribute to your object.\n\n :param inputs: your __init__ inputs, can be anything you wish to check\n\n :raises: yutils.exceptions.WrongDatatype if any input is not of the specified type, defined by _INPUT_TYPES\n yutils.exceptions.InputError if any input is not one of the options, defined by _INPUT_OPTIONS\n "}, "create_data_from_text_file": {"type": "function", "under": {}, "doc": "", "path": "yutils.ml.ml_base.create_data_from_text_file"}}, "doc": "", "path": "yutils.ml.ml_base"}, "regression": {"type": "module", "under": {"Regression": {"type": "object", "under": {}, "doc": "", "path": "yutils.ml.regression.Regression"}}, "doc": "", "path": "yutils.ml.regression"}}, "doc": "", "path": "yutils.ml"}, "queries": {"type": "module", "under": {"db_connection": {"type": "module", "under": {"db_connection": {"type": "module", "under": {"DBConnection": {"type": "object", "under": {}, "doc": "\n Wraps a connection to a DB, for executing SQL queries, using given connection_details.\n ", "path": "yutils.queries.db_connection.db_connection.DBConnection", "init_doc": "\n :param connection_details: Details for connection to the wanted DB\n :type: connection_details: yutils.conn.sql_connection_details.ConnectionDetails\n :param verbose: If to print warnings or not\n :type verbose: bool\n "}}, "doc": "", "path": "yutils.queries.db_connection.db_connection"}, "fetchers": {"type": "module", "under": {"base_fetcher": {"type": "module", "under": {}, "doc": "", "path": "yutils.queries.db_connection.fetchers.base_fetcher"}, "elastic": {"type": "module", "under": {"ElasticSearchFetcher": {"type": "object", "under": {}, "doc": "", "path": "yutils.queries.db_connection.fetchers.elastic.ElasticSearchFetcher"}}, "doc": "", "path": "yutils.queries.db_connection.fetchers.elastic"}, "mssql": {"type": "module", "under": {"MSSQLFetcher": {"type": "object", "under": {}, "doc": "", "path": "yutils.queries.db_connection.fetchers.mssql.MSSQLFetcher"}}, "doc": "", "path": "yutils.queries.db_connection.fetchers.mssql"}, "mysql": {"type": "module", "under": {"MySQLFetcher": {"type": "object", "under": {}, "doc": "", "path": "yutils.queries.db_connection.fetchers.mysql.MySQLFetcher"}}, "doc": "", "path": "yutils.queries.db_connection.fetchers.mysql"}, "oracle": {"type": "module", "under": {"OracleFetcher": {"type": "object", "under": {}, "doc": "", "path": "yutils.queries.db_connection.fetchers.oracle.OracleFetcher"}}, "doc": "", "path": "yutils.queries.db_connection.fetchers.oracle"}}, "doc": "", "path": "yutils.queries.db_connection.fetchers"}}, "doc": "", "path": "yutils.queries.db_connection"}, "oracle_field_list_format": {"type": "module", "under": {"format_oracle_field_list": {"type": "function", "under": {}, "doc": "\n Takes a list that can be more than 999 values long, and wraps them in SQL OR clauses.\n This is useful because Oracle can only accept lists 1000 values long.\n\n :param field_name: the name of the column you are querying\n :type field_name: str\n :param value_list: list of your values to format into the query\n :type value_list: list of str\n\n :return: formatted string containing your new WHERE clause\n :rtype: unicode\n ", "path": "yutils.queries.oracle_field_list_format.format_oracle_field_list"}}, "doc": "", "path": "yutils.queries.oracle_field_list_format"}}, "doc": "", "path": "yutils.queries"}, "tools": {"type": "module", "under": {"case_conversions": {"type": "module", "under": {"camel_back_to_snake_case": {"type": "function", "under": {}, "doc": "\n Turns a camelBack word to a snake_case word\n\n :param camel_back_word: wordInCamelCase\n :return: a_word_in_snake_case\n ", "path": "yutils.tools.case_conversions.camel_back_to_snake_case"}, "camel_case_to_snake_case": {"type": "function", "under": {}, "doc": "\n Turns a CamelCase word to a snake_case word\n\n :param camel_case_word: AWordInCamelCase\n :return: a_word_in_snake_case\n ", "path": "yutils.tools.case_conversions.camel_case_to_snake_case"}, "snake_case_to_camel_back": {"type": "function", "under": {}, "doc": "\n Turns a snake_case word to a camelBack word\n\n :param snake_case_word: a_word_in_snake_case\n :return: wordInCamelCase\n ", "path": "yutils.tools.case_conversions.snake_case_to_camel_back"}, "snake_case_to_camel_case": {"type": "function", "under": {}, "doc": "\n Turns a snake_case word to a CamelCase word\n\n :param snake_case_word: a_word_in_snake_case\n :return: AWordInCamelCase\n ", "path": "yutils.tools.case_conversions.snake_case_to_camel_case"}}, "doc": "", "path": "yutils.tools.case_conversions"}, "check_object_type": {"type": "function", "under": {}, "doc": "\n This checks the types of an object using a certain syntax:\n Lets say we have an object_to_check and the types_to_validate.\n The object_to_check is the object\n\n :param object_to_check: the object you wish to check its type, and raise an exception should its type not be correct\n :type object_to_check: ....that's what we're here for....\n :param types_to_validate: defines the wanted types for the object to check:\n :type types_to_validate:\n type - checks that object_to_check is of that type\n Example: float will make sure object_to_check is a float\n list of types - checks that object_to_check is one of the types in the list\n Example: [int, float] will make sure object_to_check is either an int or a float\n tuple of types - checks hierarchically:\n checks that object_to_check is of the type of the first item,\n then checks that each item in object_to_check is of the type of the second item,\n etc.\n Remember, all types in the tuple except the last must support indexing.\n Example: (list, str) will make sure object_to_check is a list of strings\n (tuple, [int, float]) will make sure object_to_check is a tuple of either ints or floats\n dict - checks that object_to_check is an object. It's type is defined by key 'type',\n with other keys to be checked as the object's attributes.\n Example: {'type': Person, 'age': int} will make sure object_to_check is a Person object,\n with an 'age' attribute that is an int.\n All values can have as many recursive dimensions as wanted.\n :param input_name: Do not use, this is for recursive inner use.\n\n More examples\n Lets say we create:\n\n integer = 13\n unicode_str = u'foo'\n int_list = list(range(10))\n input_object = MyObject()\n input_object.num = 3\n input_object.lis = [1, 'bar']\n input_object.3dlist = [[(1, 2, 3), (1, 1, 1)], [('a', 'b', 'c'), [7, 8, 9]]]\n\n We can send:\n check_object_type(integer, int)\n check_object_type(unicode_str, unicode)\n check_object_type(int_list, (list, int))\n check_object_type(input_object, {'type': MyObject,\n 'num': int,\n 'lis': (list, [int, str]),\n '3dlist': (list, list, [tuple, list], [int, str, unicode])\n })\n\n :raises:\n Because of invalid inputs:\n yutils.exceptions.CodeMistake - When no 'type' key is found (for when types_to_validate is a dict)\n yutils.exceptions.WrongDatatype - When no type type is found when isinstance-ing an object's type\n Exceptions raised by check:\n yutils.exceptions.WrongInputDatatype - When the type is not correct during validation\n yutils.exceptions.MissingInput - When an attribute is missing (for when types_to_validate is a dict)\n ", "path": "yutils.tools.check_object_type"}, "equivilence": {"type": "function", "under": {}, "doc": "\n Divides an iterator to groups, based on the function's result of every item in the iterator.\n Returns dict of lists.\n\n Example:\n >>> equivilence(range(10), lambda x: x % 3)\n >>>out>>> {0: [0, 3, 6, 9],\n >>>out>>> 1: [1, 4, 7],\n >>>out>>> 2: [2, 5, 8]}\n\n :param iterator: an iterator you wish to run on and divide into groups\n :type iterator: iterator\n :param func: a function to activate on each iterator item - its result decides the return dict's keys.\n :type func: function\n\n :rtype: dict of lists (lists are groups of original iterator)\n ", "path": "yutils.tools.equivilence"}, "files": {"type": "module", "under": {"get_file_length": {"type": "function", "under": {}, "doc": "\n This function gets a file path and returns its length without reading it\n\n :param file_path: path to return length of\n :type file_path: str\n :return: file length (in bytes)\n :rtype: int\n ", "path": "yutils.tools.files.get_file_length"}, "recursive_glob": {"type": "function", "under": {}, "doc": "\n Returns a list of all files in directory including sub-directories.\n\n :param dir_name: Dir name to glob recursively on\n :type dir_name: str\n :param ignore_hidden: if to ignore hidden files (that start with '.')\n :type ignore_hidden: bool\n\n :return: list of all files in the dir_name\n :rtype: list of str\n ", "path": "yutils.tools.files.recursive_glob"}, "save_file": {"type": "function", "under": {}, "doc": "\n This function saves the file content to the destination dir (defaulted to \".\") as base_name + extension,\n but adds a counter if needed.\n\n :param content: the content of the file\n :type content: str\n :param file_base_name: the future file name without extension\n :type file_base_name: str\n :param extension: the file name extension (for example: 'xlsx')\n :type extension: str\n :param dest_dir: where to save the file\n Default: current directory\n :type dest_dir: str\n\n :return: full file path file was saved to\n :rtype: unicode\n ", "path": "yutils.tools.files.save_file"}}, "doc": "", "path": "yutils.tools.files"}, "list": {"type": "module", "under": {"make_list": {"type": "function", "under": {}, "doc": "", "path": "yutils.tools.list.make_list"}, "repr_list": {"type": "function", "under": {}, "doc": "\n Returns an iterator as a string, representing the list.\n :param iterator: the iterator you wish to represent as a list\n :type iterator: iterator\n :return: representation of your iterator as a list\n :rtype: unicode\n ", "path": "yutils.tools.list.repr_list"}}, "doc": "", "path": "yutils.tools.list"}, "numpy_tools": {"type": "module", "under": {"get_indices_containing_all_substrings": {"type": "function", "under": {}, "doc": "", "path": "yutils.tools.numpy_tools.get_indices_containing_all_substrings"}, "is_iterable": {"type": "function", "under": {}, "doc": "", "path": "yutils.tools.numpy_tools.is_iterable"}, "magic": {"type": "function", "under": {}, "doc": "\n Implementation taken from https://stackoverflow.com/questions/47834140/numpy-equivalent-of-matlabs-magic\n from user: user6655984\n ", "path": "yutils.tools.numpy_tools.magic"}, "normalize_array": {"type": "function", "under": {}, "doc": "", "path": "yutils.tools.numpy_tools.normalize_array"}, "r2c": {"type": "function", "under": {}, "doc": "", "path": "yutils.tools.numpy_tools.r2c"}, "to_array": {"type": "function", "under": {}, "doc": "", "path": "yutils.tools.numpy_tools.to_array"}}, "doc": "", "path": "yutils.tools.numpy_tools"}, "pretty_print": {"type": "module", "under": {"pprint_dict": {"type": "function", "under": {}, "doc": "\n Prints a dict in a very pretty way!\n\n :param dictionary: your dict to print\n :type dictionary: dict\n :param long_value_limit: when a dict value exceeds this limit, it won't be printed\n Default: 120\n :type long_value_limit: int\n :param long_value_filler: A filler to print instead of a long value, must have {type} and {length} fields!\n Default: '<Long {type} object with repr length {length}>'\n :type long_value_filler: str\n :return: None\n ", "path": "yutils.tools.pretty_print.pprint_dict"}, "pprint_list": {"type": "function", "under": {}, "doc": "\n Prints a list in an easy, short way.\n\n :param list_to_print: the list you wish to print\n :type list_to_print: list\n :return: None\n ", "path": "yutils.tools.pretty_print.pprint_list"}}, "doc": "", "path": "yutils.tools.pretty_print"}, "str": {"type": "module", "under": {"turn_numeric": {"type": "function", "under": {}, "doc": "\n Turns a string into either an int or a float\n\n :param string: a string to assess\n :type string: str\n\n :rtype: str or float\n\n :raises: TypeError if no type was found\n ", "path": "yutils.tools.str.turn_numeric"}}, "doc": "", "path": "yutils.tools.str"}, "xlsx_creator": {"type": "module", "under": {"XLSXCreator": {"type": "object", "under": {}, "doc": "", "path": "yutils.tools.xlsx_creator.XLSXCreator", "init_doc": "\n A class to create an XLSX file from a table.\n It will format the table inside an actual excel's table, according to each field's width.\n\n :param headers: The fields of the table (headers)\n :type headers: list of unicode\n :param table: The table\n :type table: matrix - list of lists of the same lengths (cells may be any datatype)\n :param output_path: The path where to save the excel\n :type output_path: unicode\n "}, "create_xlsx": {"type": "function", "under": {}, "doc": "\n Creates an XLSX file from a table.\n It will format the table inside an actual excel's table, according to each field's width.\n\n :param headers: The fields of the table (headers)\n :type headers: list of unicode\n :param table: The table\n :type table: matrix - list of lists of the same lengths (cells may be any datatype)\n :param output_path: The path where to save the excel\n :type output_path: unicode\n ", "path": "yutils.tools.xlsx_creator.create_xlsx"}, "get_next_column": {"type": "function", "under": {}, "doc": "", "path": "yutils.tools.xlsx_creator.get_next_column"}, "get_next_letter": {"type": "function", "under": {}, "doc": "", "path": "yutils.tools.xlsx_creator.get_next_letter"}, "table_to_str": {"type": "function", "under": {}, "doc": "\n matrix good for the function xlsxwriter.Worksheet.add_table(['data': table))\n :param table: matrix - list of lists of the same lengths (cells may be any datatype)\n :return: fully string matrix\n ", "path": "yutils.tools.xlsx_creator.table_to_str"}}, "doc": "", "path": "yutils.tools.xlsx_creator"}}, "doc": "", "path": "yutils.tools"}}
yutils
/yutils-1.4.0.tar.gz/yutils-1.4.0/README.db.json
README.db.json
yutils.base yutils.base.attribute_dict yutils.base.attribute_dict.AttributeDict yutils.base.generic_object yutils.base.generic_object.GenericObject yutils.base.generic_object.dict_to_generic_object yutils.base.input_checker yutils.base.input_checker.InputChecker yutils.base.list_container yutils.base.list_container.ListContainer yutils.base.pretty_printer yutils.base.pretty_printer.PrintableObject yutils.base.updating_dict yutils.base.updating_dict.DictValueList yutils.base.updating_dict.UpdatingDict yutils.conn yutils.conn.sql_connection_details yutils.conn.sql_connection_details.ConnectionDetails yutils.conn.sql_connection_details.ElasticConnectionDetails yutils.conn.sql_connection_details.MSSQLConnectionDetails yutils.conn.sql_connection_details.MySQLConnectionDetails yutils.conn.sql_connection_details.OracleConnectionDetails yutils.exceptions yutils.exceptions.exceptions yutils.exceptions.exceptions.CodeMistake yutils.exceptions.exceptions.InputError yutils.exceptions.exceptions.MissingAttribute yutils.exceptions.exceptions.MissingInput yutils.exceptions.exceptions.UncaughtEndCase yutils.exceptions.exceptions.UserCancellation yutils.exceptions.exceptions.WrongDatatype yutils.exceptions.exceptions.WrongInputDatatype yutils.exceptions.exceptions.YutilsException yutils.match_arabic_nls_lang yutils.ml yutils.ml.classification yutils.ml.classification.LogisticRegression yutils.ml.classification.LogisticRegressionOptimizedClassifier yutils.ml.classification.MultiClassClassification yutils.ml.features yutils.ml.features.FeatureNormalizer yutils.ml.linear_regression yutils.ml.linear_regression.LinearRegression yutils.ml.linear_regression.NormalEquation yutils.ml.ml_base yutils.ml.ml_base.MLObject yutils.ml.ml_base.create_data_from_text_file yutils.ml.regression yutils.ml.regression.Regression yutils.queries yutils.queries.db_connection yutils.queries.db_connection.db_connection yutils.queries.db_connection.db_connection.DBConnection yutils.queries.db_connection.fetchers yutils.queries.db_connection.fetchers.base_fetcher yutils.queries.db_connection.fetchers.elastic yutils.queries.db_connection.fetchers.elastic.ElasticSearchFetcher yutils.queries.db_connection.fetchers.mssql yutils.queries.db_connection.fetchers.mssql.MSSQLFetcher yutils.queries.db_connection.fetchers.mysql yutils.queries.db_connection.fetchers.mysql.MySQLFetcher yutils.queries.db_connection.fetchers.oracle yutils.queries.db_connection.fetchers.oracle.OracleFetcher yutils.queries.oracle_field_list_format yutils.queries.oracle_field_list_format.format_oracle_field_list yutils.tools yutils.tools.case_conversions yutils.tools.case_conversions.camel_back_to_snake_case yutils.tools.case_conversions.camel_case_to_snake_case yutils.tools.case_conversions.snake_case_to_camel_back yutils.tools.case_conversions.snake_case_to_camel_case yutils.tools.check_object_type yutils.tools.equivilence yutils.tools.files yutils.tools.files.get_file_length yutils.tools.files.recursive_glob yutils.tools.files.save_file yutils.tools.list yutils.tools.list.make_list yutils.tools.list.repr_list yutils.tools.numpy_tools yutils.tools.numpy_tools.get_indices_containing_all_substrings yutils.tools.numpy_tools.is_iterable yutils.tools.numpy_tools.magic yutils.tools.numpy_tools.normalize_array yutils.tools.numpy_tools.r2c yutils.tools.numpy_tools.to_array yutils.tools.pretty_print yutils.tools.pretty_print.pprint_dict yutils.tools.pretty_print.pprint_list yutils.tools.str yutils.tools.str.turn_numeric yutils.tools.xlsx_creator yutils.tools.xlsx_creator.XLSXCreator yutils.tools.xlsx_creator.create_xlsx yutils.tools.xlsx_creator.get_next_column yutils.tools.xlsx_creator.get_next_letter yutils.tools.xlsx_creator.table_to_str
yutils
/yutils-1.4.0.tar.gz/yutils-1.4.0/README.saved_paths.txt
README.saved_paths.txt
# Yutils >A Python utility package written by Yuval Arbel ## module base >yutils.base ## module conn >yutils.conn ## module exceptions >yutils.exceptions ## module ml >yutils.ml ## module queries >yutils.queries ## module tools >yutils.tools ## function match_arabic_nls_lang >yutils.match_arabic_nls_lang ### module attribute_dict >yutils.base.attribute_dict ### module generic_object >yutils.base.generic_object ### module input_checker >yutils.base.input_checker ### module list_container >yutils.base.list_container ### module pretty_printer >yutils.base.pretty_printer ### module updating_dict >yutils.base.updating_dict #### object AttributeDict >yutils.base.attribute_dict.AttributeDict #### object GenericObject >yutils.base.generic_object.GenericObject A generic object you can easily use for your scripts, with a pprint and a str/repr for easy printing :param object_name: The name for your object! :type object_name: str #### function dict_to_generic_object >yutils.base.generic_object.dict_to_generic_object Converts a dictionary (recursively) to a GenericObject, with keys as attributes. :param dictionary: dictionary to convert (key-values will be converted to attribute-values) :type dictionary: dict :param object_name: a name for your new object's type :type object_name: str :return: GenericObject object #### object InputChecker >yutils.base.input_checker.InputChecker Base object for making a Python object more static-typed. It is useful for checking __init__ argument inputs (type and content). Type check is defined by _INPUT_TYPES class constant. (see yutils.tools.check_object_type for usage) Option check is defined by _INPUT_OPTIONS class constant. This also: - creates self._inputs as the inputs dict given, as an AttributeDict. - adds each input in inputs as an attribute to your object. :param inputs: your __init__ inputs, can be anything you wish to check :raises: yutils.exceptions.WrongDatatype if any input is not of the specified type, defined by _INPUT_TYPES yutils.exceptions.InputError if any input is not one of the options, defined by _INPUT_OPTIONS #### object ListContainer >yutils.base.list_container.ListContainer An object that wraps a list, allowing you to use your object as a list and configure it as you wish. :param _list: the original list you wish to keep in the backbone of your object :type _list: list :param _objects_type: a plural name for your objects in your ListContainer! This is for printing your object. For Example: >>> class Students(ListContainer): >>> def __init__(self): >>> super(Students, self).__init__([], 'students') :type _objects_type: str #### object PrintableObject >yutils.base.pretty_printer.PrintableObject An object you can derive from, that has a pprint method - printing all set attributes #### object DictValueList >yutils.base.updating_dict.DictValueList Initialize self. See help(type(self)) for accurate signature. #### object UpdatingDict >yutils.base.updating_dict.UpdatingDict Initialize self. See help(type(self)) for accurate signature. ### module sql_connection_details >yutils.conn.sql_connection_details #### object ConnectionDetails >yutils.conn.sql_connection_details.ConnectionDetails Initialize self. See help(type(self)) for accurate signature. #### object ElasticConnectionDetails >yutils.conn.sql_connection_details.ElasticConnectionDetails Initialize self. See help(type(self)) for accurate signature. #### object MSSQLConnectionDetails >yutils.conn.sql_connection_details.MSSQLConnectionDetails Initialize self. See help(type(self)) for accurate signature. #### object MySQLConnectionDetails >yutils.conn.sql_connection_details.MySQLConnectionDetails Initialize self. See help(type(self)) for accurate signature. #### object OracleConnectionDetails >yutils.conn.sql_connection_details.OracleConnectionDetails Initialize self. See help(type(self)) for accurate signature. ### module exceptions >yutils.exceptions.exceptions #### object CodeMistake >yutils.exceptions.exceptions.CodeMistake Gets raised to find mistakes when writing code :param mistake_string: an error message explaining why this was raised :type mistake_string: str #### object InputError >yutils.exceptions.exceptions.InputError Gets raised when the input wasn't as expected (e.g. isn't a valid option) :param error_string: an error message explaining the InputError :type error_string: str #### object MissingAttribute >yutils.exceptions.exceptions.MissingAttribute Gets raised when an attribute was expected in a certain class :param class_object: the object itself that is missing an attribute :type class_object: object :param attribute_name: the name of the attribute that is missing :type attribute_name: str #### object MissingInput >yutils.exceptions.exceptions.MissingInput Gets raised when an input was expected in a certain class but not received :param class_object: the object itself that is missing an attribute :type class_object: object :param attribute_name: the name of the attribute that is missing :type attribute_name: str #### object UncaughtEndCase >yutils.exceptions.exceptions.UncaughtEndCase Gets raised to catch unexpected cases in the future :param explanation: an optional string to explain the end case. Default: 'An uncaught end case was found. Check it out!' :type explanation: str #### object UserCancellation >yutils.exceptions.exceptions.UserCancellation Gets raised when a user chooses to cancel an operation, and you wish the program to abort. :param operation_name: (optional) the operation the user chose to cancel :type operation_name: (optional) str #### object WrongDatatype >yutils.exceptions.exceptions.WrongDatatype Gets raised when something isn't the right datatype as was expected :param name: object name :type name: str :param expectation: expected type :type expectation: type or str :param reality: the object's actual type :type reality: type or str #### object WrongInputDatatype >yutils.exceptions.exceptions.WrongInputDatatype Gets raised when an input argument isn't the right datatype as was expected :param name: object name :type name: str :param expectation: expected type :type expectation: type or str :param reality: the object's actual type :type reality: type or str #### object YutilsException >yutils.exceptions.exceptions.YutilsException Initialize self. See help(type(self)) for accurate signature. ### module classification >yutils.ml.classification ### module features >yutils.ml.features ### module linear_regression >yutils.ml.linear_regression ### module ml_base >yutils.ml.ml_base ### module regression >yutils.ml.regression #### object LogisticRegression >yutils.ml.classification.LogisticRegression #### object LogisticRegressionOptimizedClassifier >yutils.ml.classification.LogisticRegressionOptimizedClassifier #### object MultiClassClassification >yutils.ml.classification.MultiClassClassification #### object FeatureNormalizer >yutils.ml.features.FeatureNormalizer Normalizes features for a ML object :param info: info to normalize, across column axis (normalizes each column by different normalization data) :type info: #### object LinearRegression >yutils.ml.linear_regression.LinearRegression Not written yet... :param training_data: :param training_results: :param learning_rate: :param iterations: :param normalize_data: :param verbose: #### object NormalEquation >yutils.ml.linear_regression.NormalEquation Not explained yet... :param training_data: :param training_results: :param assess_for_warning: :param verbose: #### object MLObject >yutils.ml.ml_base.MLObject Base object for making a Python object more static-typed. It is useful for checking __init__ argument inputs (type and content). Type check is defined by _INPUT_TYPES class constant. (see yutils.tools.check_object_type for usage) Option check is defined by _INPUT_OPTIONS class constant. This also: - creates self._inputs as the inputs dict given, as an AttributeDict. - adds each input in inputs as an attribute to your object. :param inputs: your __init__ inputs, can be anything you wish to check :raises: yutils.exceptions.WrongDatatype if any input is not of the specified type, defined by _INPUT_TYPES yutils.exceptions.InputError if any input is not one of the options, defined by _INPUT_OPTIONS #### function create_data_from_text_file >yutils.ml.ml_base.create_data_from_text_file #### object Regression >yutils.ml.regression.Regression ### module db_connection >yutils.queries.db_connection ### module oracle_field_list_format >yutils.queries.oracle_field_list_format #### module db_connection >yutils.queries.db_connection.db_connection #### module fetchers >yutils.queries.db_connection.fetchers ##### object DBConnection >yutils.queries.db_connection.db_connection.DBConnection Wraps a connection to a DB, for executing SQL queries, using given connection_details. :param connection_details: Details for connection to the wanted DB :type: connection_details: yutils.conn.sql_connection_details.ConnectionDetails :param verbose: If to print warnings or not :type verbose: bool ##### module base_fetcher >yutils.queries.db_connection.fetchers.base_fetcher ##### module elastic >yutils.queries.db_connection.fetchers.elastic ##### module mssql >yutils.queries.db_connection.fetchers.mssql ##### module mysql >yutils.queries.db_connection.fetchers.mysql ##### module oracle >yutils.queries.db_connection.fetchers.oracle ###### object ElasticSearchFetcher >yutils.queries.db_connection.fetchers.elastic.ElasticSearchFetcher ###### object MSSQLFetcher >yutils.queries.db_connection.fetchers.mssql.MSSQLFetcher ###### object MySQLFetcher >yutils.queries.db_connection.fetchers.mysql.MySQLFetcher ###### object OracleFetcher >yutils.queries.db_connection.fetchers.oracle.OracleFetcher #### function format_oracle_field_list >yutils.queries.oracle_field_list_format.format_oracle_field_list Takes a list that can be more than 999 values long, and wraps them in SQL OR clauses. This is useful because Oracle can only accept lists 1000 values long. :param field_name: the name of the column you are querying :type field_name: str :param value_list: list of your values to format into the query :type value_list: list of str :return: formatted string containing your new WHERE clause :rtype: unicode ### module case_conversions >yutils.tools.case_conversions ### module files >yutils.tools.files ### module list >yutils.tools.list ### module numpy_tools >yutils.tools.numpy_tools ### module pretty_print >yutils.tools.pretty_print ### module str >yutils.tools.str ### module xlsx_creator >yutils.tools.xlsx_creator ### function check_object_type >yutils.tools.check_object_type This checks the types of an object using a certain syntax: Lets say we have an object_to_check and the types_to_validate. The object_to_check is the object :param object_to_check: the object you wish to check its type, and raise an exception should its type not be correct :type object_to_check: ....that's what we're here for.... :param types_to_validate: defines the wanted types for the object to check: :type types_to_validate: type - checks that object_to_check is of that type Example: float will make sure object_to_check is a float list of types - checks that object_to_check is one of the types in the list Example: [int, float] will make sure object_to_check is either an int or a float tuple of types - checks hierarchically: checks that object_to_check is of the type of the first item, then checks that each item in object_to_check is of the type of the second item, etc. Remember, all types in the tuple except the last must support indexing. Example: (list, str) will make sure object_to_check is a list of strings (tuple, [int, float]) will make sure object_to_check is a tuple of either ints or floats dict - checks that object_to_check is an object. It's type is defined by key 'type', with other keys to be checked as the object's attributes. Example: {'type': Person, 'age': int} will make sure object_to_check is a Person object, with an 'age' attribute that is an int. All values can have as many recursive dimensions as wanted. :param input_name: Do not use, this is for recursive inner use. More examples Lets say we create: integer = 13 unicode_str = u'foo' int_list = list(range(10)) input_object = MyObject() input_object.num = 3 input_object.lis = [1, 'bar'] input_object.3dlist = [[(1, 2, 3), (1, 1, 1)], [('a', 'b', 'c'), [7, 8, 9]]] We can send: check_object_type(integer, int) check_object_type(unicode_str, unicode) check_object_type(int_list, (list, int)) check_object_type(input_object, {'type': MyObject, 'num': int, 'lis': (list, [int, str]), '3dlist': (list, list, [tuple, list], [int, str, unicode]) }) :raises: Because of invalid inputs: yutils.exceptions.CodeMistake - When no 'type' key is found (for when types_to_validate is a dict) yutils.exceptions.WrongDatatype - When no type type is found when isinstance-ing an object's type Exceptions raised by check: yutils.exceptions.WrongInputDatatype - When the type is not correct during validation yutils.exceptions.MissingInput - When an attribute is missing (for when types_to_validate is a dict) ### function equivilence >yutils.tools.equivilence Divides an iterator to groups, based on the function's result of every item in the iterator. Returns dict of lists. Example: >>> equivilence(range(10), lambda x: x % 3) >>>out>>> {0: [0, 3, 6, 9], >>>out>>> 1: [1, 4, 7], >>>out>>> 2: [2, 5, 8]} :param iterator: an iterator you wish to run on and divide into groups :type iterator: iterator :param func: a function to activate on each iterator item - its result decides the return dict's keys. :type func: function :rtype: dict of lists (lists are groups of original iterator) #### function camel_back_to_snake_case >yutils.tools.case_conversions.camel_back_to_snake_case Turns a camelBack word to a snake_case word :param camel_back_word: wordInCamelCase :return: a_word_in_snake_case #### function camel_case_to_snake_case >yutils.tools.case_conversions.camel_case_to_snake_case Turns a CamelCase word to a snake_case word :param camel_case_word: AWordInCamelCase :return: a_word_in_snake_case #### function snake_case_to_camel_back >yutils.tools.case_conversions.snake_case_to_camel_back Turns a snake_case word to a camelBack word :param snake_case_word: a_word_in_snake_case :return: wordInCamelCase #### function snake_case_to_camel_case >yutils.tools.case_conversions.snake_case_to_camel_case Turns a snake_case word to a CamelCase word :param snake_case_word: a_word_in_snake_case :return: AWordInCamelCase #### function get_file_length >yutils.tools.files.get_file_length This function gets a file path and returns its length without reading it :param file_path: path to return length of :type file_path: str :return: file length (in bytes) :rtype: int #### function recursive_glob >yutils.tools.files.recursive_glob Returns a list of all files in directory including sub-directories. :param dir_name: Dir name to glob recursively on :type dir_name: str :param ignore_hidden: if to ignore hidden files (that start with '.') :type ignore_hidden: bool :return: list of all files in the dir_name :rtype: list of str #### function save_file >yutils.tools.files.save_file This function saves the file content to the destination dir (defaulted to ".") as base_name + extension, but adds a counter if needed. :param content: the content of the file :type content: str :param file_base_name: the future file name without extension :type file_base_name: str :param extension: the file name extension (for example: 'xlsx') :type extension: str :param dest_dir: where to save the file Default: current directory :type dest_dir: str :return: full file path file was saved to :rtype: unicode #### function make_list >yutils.tools.list.make_list #### function repr_list >yutils.tools.list.repr_list Returns an iterator as a string, representing the list. :param iterator: the iterator you wish to represent as a list :type iterator: iterator :return: representation of your iterator as a list :rtype: unicode #### function get_indices_containing_all_substrings >yutils.tools.numpy_tools.get_indices_containing_all_substrings #### function is_iterable >yutils.tools.numpy_tools.is_iterable #### function magic >yutils.tools.numpy_tools.magic Implementation taken from https://stackoverflow.com/questions/47834140/numpy-equivalent-of-matlabs-magic from user: user6655984 #### function normalize_array >yutils.tools.numpy_tools.normalize_array #### function r2c >yutils.tools.numpy_tools.r2c #### function to_array >yutils.tools.numpy_tools.to_array #### function pprint_dict >yutils.tools.pretty_print.pprint_dict Prints a dict in a very pretty way! :param dictionary: your dict to print :type dictionary: dict :param long_value_limit: when a dict value exceeds this limit, it won't be printed Default: 120 :type long_value_limit: int :param long_value_filler: A filler to print instead of a long value, must have {type} and {length} fields! Default: '<Long {type} object with repr length {length}>' :type long_value_filler: str :return: None #### function pprint_list >yutils.tools.pretty_print.pprint_list Prints a list in an easy, short way. :param list_to_print: the list you wish to print :type list_to_print: list :return: None #### function turn_numeric >yutils.tools.str.turn_numeric Turns a string into either an int or a float :param string: a string to assess :type string: str :rtype: str or float :raises: TypeError if no type was found #### object XLSXCreator >yutils.tools.xlsx_creator.XLSXCreator A class to create an XLSX file from a table. It will format the table inside an actual excel's table, according to each field's width. :param headers: The fields of the table (headers) :type headers: list of unicode :param table: The table :type table: matrix - list of lists of the same lengths (cells may be any datatype) :param output_path: The path where to save the excel :type output_path: unicode #### function create_xlsx >yutils.tools.xlsx_creator.create_xlsx Creates an XLSX file from a table. It will format the table inside an actual excel's table, according to each field's width. :param headers: The fields of the table (headers) :type headers: list of unicode :param table: The table :type table: matrix - list of lists of the same lengths (cells may be any datatype) :param output_path: The path where to save the excel :type output_path: unicode #### function get_next_column >yutils.tools.xlsx_creator.get_next_column #### function get_next_letter >yutils.tools.xlsx_creator.get_next_letter #### function table_to_str >yutils.tools.xlsx_creator.table_to_str matrix good for the function xlsxwriter.Worksheet.add_table(['data': table)) :param table: matrix - list of lists of the same lengths (cells may be any datatype) :return: fully string matrix
yutils
/yutils-1.4.0.tar.gz/yutils-1.4.0/README.md
README.md
# yutu ![](https://raw.githubusercontent.com/wdbm/yutu/master/media/bunny.png) point cloud representations and movements # setup ```Bash sudo apt install python-pygame pip install yutu ``` # usage See the `examples` directory for example scripts. # data ![](https://raw.githubusercontent.com/wdbm/yutu/master/media/scan000_1.png) ![](https://raw.githubusercontent.com/wdbm/yutu/master/media/scan006_1.png) Data by Dorit Borrmann and Hassan Afzal of Jacobs University Bremen gGmbH was provided by the [Robotic 3D Scan Repository](http://kos.informatik.uni-osnabrueck.de/3Dscans/). The data were recorded at the Automation Lab at Jacobs University Bremen using a Riegl VZ-400 laser scanner and an Optris PI infrared camera. Thermal data is encoded as colour. # future Under consideration are more vectorization, rigid body movement matrices and perspective projection data cuts.
yutu
/yutu-2018.9.20.1342.tar.gz/yutu-2018.9.20.1342/README.md
README.md
# (koito) yuu A simple AbemaTV and other we(e)bsite video downloader in python [![koito yuu](https://p.n4o.xyz/i/fzpt7mt.jpg)](https://anilist.co/character/123528/Yuu-Koito) [![pypi version](https://img.shields.io/pypi/v/yuu.svg?style=for-the-badge)](https://pypi.org/project/yuu/) [![python version](https://img.shields.io/pypi/pyversions/yuu.svg?style=for-the-badge)](#) [![License](https://img.shields.io/github/license/noaione/yuu.svg?style=for-the-badge)](https://github.com/noaione/yuu/blob/master/LICENSE) ## Requirements - click - pycryptodome - Python 3.5+ - m3u8 - tqdm - Japan connection/proxy/vpn ## Supported web - AbemaTV - Aniplus Asia - GYAO! ## Installation `pip install yuu` or clone this project and type `pip install .` ## Usage ``` >> yuu -h Usage: yuu [OPTIONS] COMMAND [ARGS]... A simple AbemaTV video downloader Options: -V, --version Show current version -U, --update Update yuu to the newest version -h, --help Show this message and exit. Commands: download Download a video from yuu Supported we(e)bsite streams Check supported website /////////////////////////////////////////////////// >> yuu download -h Usage: yuu download [OPTIONS] <URL site> Main command to access downloader Check supported streams for yuu: `yuu streams` Options: -U, --username TEXT Use username/password to download premium video -P, --password TEXT Use username/password to download premium video -p, --proxy <ip:port/url> Use http(s)/socks5 proxies (please add `socks5://` if you use socks5) -r, --resolution TEXT Resolution to be downloaded (Default: best) -R, --resolutions Show available resolutions --mux Mux .ts to .mkv (Need ffmpeg or mkvmerge) -keep, --keep-fragments Keep downloaded fragment and combined fragment (If muxing) (Default: no) -o, --output TEXT Output filename -v, --verbose Enable verbosity -h, --help Show this message and exit. ``` - **`--username/-U`**: Use yuu with registered username/password - **`--password/-P`**: Use yuu with registered username/password - **`--proxies/-p`**: Download using proxy for people outside Japan - Example: `127.0.0.1:1080`, `http://127.0.0.1:1080`, `http://user:[email protected]:1080`, `socks5://127.0.0.1:1080` - **`--resolution/-r`**: Target resolution - **`--resolutions/-R`**: Show available resolution - **`--mux`**: Mux output file to .mkv - **`--keep-fragments/-keep`**: Keep downloaded fragment and combined fragment - **`--output/-o`**: Output filename (Automated if there's nothing omitted) (Default: no) - **`--version/-V`**: Show version number - **`--verbose/-v`**: Enable verbose/debug mode **Information: Please use HTTPS proxy for now, it tested and works. SOCKS5 are not tested yet and HTTP doesn't work** Example command: - >`yuu download -R https://abema.tv/video/episode/54-25_s1_p1` Show available resolution for `Yagate Kimi ni Naru` episode 01 - >`yuu download https://abema.tv/video/episode/54-25_s1_p1` Download 1080p video of `Yagate Kimi ni Naru` episode 01 - >`yuu download https://abema.tv/video/episode/54-25_s1_p1 -r 480p` Download 480p video of `Yagate Kimi ni Naru` episode 01 - >`yuu download https://ds-vod-abematv.akamaized.net/program/54-25_s1_p1/1080/playlist.m3u8 -o '5toubun01.ts'` Download 1080p video from m3u8 link - >`yuu download https://abema.tv/video/episode/54-25_s1_p1 -p '127.0.0.1:3128` Download 480p video of `Yagate Kimi ni Naru` episode 01 using 127.0.0.1:3128 proxy ## Credits - jackyzy823 (Decryption key fetching method) - Last-Order ([Minyami](https://github.com/Last-Order/Minyami) author) *This project are protected by BSD 3-Clause License*
yuu
/yuu-1.2.4.tar.gz/yuu-1.2.4/README.md
README.md
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec import sys import logging from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport all_structs = [] class Iface(object): def acceptGroupInvitation(self, reqSeq, groupId): """ Parameters: - reqSeq - groupId """ pass def acceptGroupInvitationByTicket(self, reqSeq, groupId, ticketId): """ Parameters: - reqSeq - groupId - ticketId """ pass def acceptProximityMatches(self, sessionId, ids): """ Parameters: - sessionId - ids """ pass def acquireCallRoute(self, to): """ Parameters: - to """ pass def acquireCallTicket(self, to): """ Parameters: - to """ pass def acquireEncryptedAccessToken(self, featureType): """ Parameters: - featureType """ pass def addSnsId(self, snsIdType, snsAccessToken): """ Parameters: - snsIdType - snsAccessToken """ pass def blockContact(self, reqSeq, id): """ Parameters: - reqSeq - id """ pass def blockRecommendation(self, reqSeq, id): """ Parameters: - reqSeq - id """ pass def cancelGroupInvitation(self, reqSeq, groupId, contactIds): """ Parameters: - reqSeq - groupId - contactIds """ pass def changeVerificationMethod(self, sessionId, method): """ Parameters: - sessionId - method """ pass def clearIdentityCredential(self): pass def clearMessageBox(self, channelId, messageBoxId): """ Parameters: - channelId - messageBoxId """ pass def closeProximityMatch(self, sessionId): """ Parameters: - sessionId """ pass def commitSendMessage(self, seq, messageId, receiverMids): """ Parameters: - seq - messageId - receiverMids """ pass def commitSendMessages(self, seq, messageIds, receiverMids): """ Parameters: - seq - messageIds - receiverMids """ pass def commitUpdateProfile(self, seq, attrs, receiverMids): """ Parameters: - seq - attrs - receiverMids """ pass def confirmEmail(self, verifier, pinCode): """ Parameters: - verifier - pinCode """ pass def createGroup(self, seq, name, contactIds): """ Parameters: - seq - name - contactIds """ pass def createQrcodeBase64Image(self, url, characterSet, imageSize, x, y, width, height): """ Parameters: - url - characterSet - imageSize - x - y - width - height """ pass def createRoom(self, reqSeq, contactIds): """ Parameters: - reqSeq - contactIds """ pass def createSession(self): pass def fetchAnnouncements(self, lastFetchedIndex): """ Parameters: - lastFetchedIndex """ pass def fetchMessages(self, localTs, count): """ Parameters: - localTs - count """ pass def fetchOperations(self, localRev, count): """ Parameters: - localRev - count """ pass def fetchOps(self, localRev, count, globalRev, individualRev): """ Parameters: - localRev - count - globalRev - individualRev """ pass def findAndAddContactsByEmail(self, reqSeq, emails): """ Parameters: - reqSeq - emails """ pass def findAndAddContactsByMid(self, reqSeq, mid): """ Parameters: - reqSeq - mid """ pass def findAndAddContactsByPhone(self, reqSeq, phones): """ Parameters: - reqSeq - phones """ pass def findAndAddContactsByUserid(self, reqSeq, userid): """ Parameters: - reqSeq - userid """ pass def findContactByUserid(self, userid): """ Parameters: - userid """ pass def findContactByUserTicket(self, ticketId): """ Parameters: - ticketId """ pass def findContactsByEmail(self, emails): """ Parameters: - emails """ pass def findContactsByPhone(self, phones): """ Parameters: - phones """ pass def findSnsIdUserStatus(self, snsIdType, snsAccessToken, udidHash): """ Parameters: - snsIdType - snsAccessToken - udidHash """ pass def finishUpdateVerification(self, sessionId): """ Parameters: - sessionId """ pass def generateUserTicket(self, expirationTime, maxUseCount): """ Parameters: - expirationTime - maxUseCount """ pass def getAcceptedProximityMatches(self, sessionId): """ Parameters: - sessionId """ pass def getActiveBuddySubscriberIds(self): pass def getAllContactIds(self): pass def getAuthQrcode(self, keepLoggedIn, systemName): """ Parameters: - keepLoggedIn - systemName """ pass def getBlockedContactIds(self): pass def getBlockedContactIdsByRange(self, start, count): """ Parameters: - start - count """ pass def getBlockedRecommendationIds(self): pass def getBuddyBlockerIds(self): pass def getBuddyLocation(self, mid, index): """ Parameters: - mid - index """ pass def getCompactContactsModifiedSince(self, timestamp): """ Parameters: - timestamp """ pass def getCompactGroup(self, groupId): """ Parameters: - groupId """ pass def getCompactRoom(self, roomId): """ Parameters: - roomId """ pass def getContact(self, id): """ Parameters: - id """ pass def getContacts(self, ids): """ Parameters: - ids """ pass def getCountryWithRequestIp(self): pass def getFavoriteMids(self): pass def getGroup(self, groupId): """ Parameters: - groupId """ pass def getGroupIdsInvited(self): pass def getGroupIdsJoined(self): pass def getGroups(self, groupIds): """ Parameters: - groupIds """ pass def getHiddenContactMids(self): pass def getIdentityIdentifier(self): pass def getLastAnnouncementIndex(self): pass def getLastOpRevision(self): pass def getMessageBox(self, channelId, messageBoxId, lastMessagesCount): """ Parameters: - channelId - messageBoxId - lastMessagesCount """ pass def getMessageBoxCompactWrapUp(self, mid): """ Parameters: - mid """ pass def getMessageBoxCompactWrapUpList(self, start, messageBoxCount): """ Parameters: - start - messageBoxCount """ pass def getMessageBoxList(self, channelId, lastMessagesCount): """ Parameters: - channelId - lastMessagesCount """ pass def getMessageBoxListByStatus(self, channelId, lastMessagesCount, status): """ Parameters: - channelId - lastMessagesCount - status """ pass def getMessageBoxWrapUp(self, mid): """ Parameters: - mid """ pass def getMessageBoxWrapUpList(self, start, messageBoxCount): """ Parameters: - start - messageBoxCount """ pass def getMessagesBySequenceNumber(self, channelId, messageBoxId, startSeq, endSeq): """ Parameters: - channelId - messageBoxId - startSeq - endSeq """ pass def getNextMessages(self, messageBoxId, startSeq, messagesCount): """ Parameters: - messageBoxId - startSeq - messagesCount """ pass def getNotificationPolicy(self, carrier): """ Parameters: - carrier """ pass def getPreviousMessages(self, messageBoxId, endSeq, messagesCount): """ Parameters: - messageBoxId - endSeq - messagesCount """ pass def getProfile(self): pass def getProximityMatchCandidateList(self, sessionId): """ Parameters: - sessionId """ pass def getProximityMatchCandidates(self, sessionId): """ Parameters: - sessionId """ pass def getRecentMessages(self, messageBoxId, messagesCount): """ Parameters: - messageBoxId - messagesCount """ pass def getRecommendationIds(self): pass def getRoom(self, roomId): """ Parameters: - roomId """ pass def getRSAKeyInfo(self, provider): """ Parameters: - provider """ pass def getServerTime(self): pass def getSessions(self): pass def getSettings(self): pass def getSettingsAttributes(self, attrBitset): """ Parameters: - attrBitset """ pass def getSystemConfiguration(self): pass def getUserTicket(self): pass def getWapInvitation(self, invitationHash): """ Parameters: - invitationHash """ pass def invalidateUserTicket(self): pass def inviteFriendsBySms(self, phoneNumberList): """ Parameters: - phoneNumberList """ pass def inviteIntoGroup(self, reqSeq, groupId, contactIds): """ Parameters: - reqSeq - groupId - contactIds """ pass def inviteIntoRoom(self, reqSeq, roomId, contactIds): """ Parameters: - reqSeq - roomId - contactIds """ pass def inviteViaEmail(self, reqSeq, email, name): """ Parameters: - reqSeq - email - name """ pass def isIdentityIdentifierAvailable(self, provider, identifier): """ Parameters: - provider - identifier """ pass def isUseridAvailable(self, userid): """ Parameters: - userid """ pass def kickoutFromGroup(self, reqSeq, groupId, contactIds): """ Parameters: - reqSeq - groupId - contactIds """ pass def reissueGroupTicket(self, groupId): """ Parameters: - groupId """ pass def findGroupByTicket(self, ticketId): """ Parameters: - ticketId """ pass def leaveGroup(self, reqSeq, groupId): """ Parameters: - reqSeq - groupId """ pass def leaveRoom(self, reqSeq, roomId): """ Parameters: - reqSeq - roomId """ pass def loginWithIdentityCredential(self, identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate): """ Parameters: - identityProvider - identifier - password - keepLoggedIn - accessLocation - systemName - certificate """ pass def loginWithIdentityCredentialForCertificate(self, identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate): """ Parameters: - identityProvider - identifier - password - keepLoggedIn - accessLocation - systemName - certificate """ pass def loginWithVerifier(self, verifier): """ Parameters: - verifier """ pass def loginWithVerifierForCerificate(self, verifier): """ Parameters: - verifier """ pass def loginWithVerifierForCertificate(self, verifier): """ Parameters: - verifier """ pass def logout(self): pass def logoutSession(self, tokenKey): """ Parameters: - tokenKey """ pass def noop(self): pass def notifiedRedirect(self, paramMap): """ Parameters: - paramMap """ pass def notifyBuddyOnAir(self, seq, receiverMids): """ Parameters: - seq - receiverMids """ pass def notifyIndividualEvent(self, notificationStatus, receiverMids): """ Parameters: - notificationStatus - receiverMids """ pass def notifyInstalled(self, udidHash, applicationTypeWithExtensions): """ Parameters: - udidHash - applicationTypeWithExtensions """ pass def notifyRegistrationComplete(self, udidHash, applicationTypeWithExtensions): """ Parameters: - udidHash - applicationTypeWithExtensions """ pass def notifySleep(self, lastRev, badge): """ Parameters: - lastRev - badge """ pass def notifyUpdated(self, lastRev, deviceInfo): """ Parameters: - lastRev - deviceInfo """ pass def openProximityMatch(self, location): """ Parameters: - location """ pass def registerBuddyUser(self, buddyId, registrarPassword): """ Parameters: - buddyId - registrarPassword """ pass def registerBuddyUserid(self, seq, userid): """ Parameters: - seq - userid """ pass def registerDevice(self, sessionId): """ Parameters: - sessionId """ pass def registerDeviceWithIdentityCredential(self, sessionId, provider, identifier, verifier): """ Parameters: - sessionId - provider - identifier - verifier """ pass def registerDeviceWithoutPhoneNumber(self, region, udidHash, deviceInfo): """ Parameters: - region - udidHash - deviceInfo """ pass def registerDeviceWithoutPhoneNumberWithIdentityCredential(self, region, udidHash, deviceInfo, provider, identifier, verifier, mid): """ Parameters: - region - udidHash - deviceInfo - provider - identifier - verifier - mid """ pass def registerUserid(self, reqSeq, userid): """ Parameters: - reqSeq - userid """ pass def registerWapDevice(self, invitationHash, guidHash, email, deviceInfo): """ Parameters: - invitationHash - guidHash - email - deviceInfo """ pass def registerWithExistingSnsIdAndIdentityCredential(self, identityCredential, region, udidHash, deviceInfo): """ Parameters: - identityCredential - region - udidHash - deviceInfo """ pass def registerWithSnsId(self, snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid): """ Parameters: - snsIdType - snsAccessToken - region - udidHash - deviceInfo - mid """ pass def registerWithSnsIdAndIdentityCredential(self, snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo): """ Parameters: - snsIdType - snsAccessToken - identityCredential - region - udidHash - deviceInfo """ pass def reissueDeviceCredential(self): pass def reissueUserTicket(self, expirationTime, maxUseCount): """ Parameters: - expirationTime - maxUseCount """ pass def rejectGroupInvitation(self, reqSeq, groupId): """ Parameters: - reqSeq - groupId """ pass def releaseSession(self): pass def removeAllMessages(self, seq, lastMessageId): """ Parameters: - seq - lastMessageId """ pass def removeBuddyLocation(self, mid, index): """ Parameters: - mid - index """ pass def removeMessage(self, messageId): """ Parameters: - messageId """ pass def removeMessageFromMyHome(self, messageId): """ Parameters: - messageId """ pass def removeSnsId(self, snsIdType): """ Parameters: - snsIdType """ pass def report(self, syncOpRevision, category, report): """ Parameters: - syncOpRevision - category - report """ pass def reportContacts(self, syncOpRevision, category, contactReports, actionType): """ Parameters: - syncOpRevision - category - contactReports - actionType """ pass def reportGroups(self, syncOpRevision, groups): """ Parameters: - syncOpRevision - groups """ pass def reportProfile(self, syncOpRevision, profile): """ Parameters: - syncOpRevision - profile """ pass def reportRooms(self, syncOpRevision, rooms): """ Parameters: - syncOpRevision - rooms """ pass def reportSettings(self, syncOpRevision, settings): """ Parameters: - syncOpRevision - settings """ pass def reportSpammer(self, spammerMid, spammerReasons, spamMessageIds): """ Parameters: - spammerMid - spammerReasons - spamMessageIds """ pass def requestAccountPasswordReset(self, provider, identifier, locale): """ Parameters: - provider - identifier - locale """ pass def requestEmailConfirmation(self, emailConfirmation): """ Parameters: - emailConfirmation """ pass def requestIdentityUnbind(self, provider, identifier): """ Parameters: - provider - identifier """ pass def resendEmailConfirmation(self, verifier): """ Parameters: - verifier """ pass def resendPinCode(self, sessionId): """ Parameters: - sessionId """ pass def resendPinCodeBySMS(self, sessionId): """ Parameters: - sessionId """ pass def sendChatChecked(self, seq, consumer, lastMessageId): """ Parameters: - seq - consumer - lastMessageId """ pass def sendChatRemoved(self, seq, consumer, lastMessageId): """ Parameters: - seq - consumer - lastMessageId """ pass def sendContentPreviewUpdated(self, esq, messageId, receiverMids): """ Parameters: - esq - messageId - receiverMids """ pass def sendContentReceipt(self, seq, consumer, messageId): """ Parameters: - seq - consumer - messageId """ pass def sendDummyPush(self): pass def sendEvent(self, seq, message): """ Parameters: - seq - message """ pass def sendMessage(self, seq, message): """ Parameters: - seq - message """ pass def sendMessageIgnored(self, seq, consumer, messageIds): """ Parameters: - seq - consumer - messageIds """ pass def sendMessageReceipt(self, seq, consumer, messageIds): """ Parameters: - seq - consumer - messageIds """ pass def sendMessageToMyHome(self, seq, message): """ Parameters: - seq - message """ pass def setBuddyLocation(self, mid, index, location): """ Parameters: - mid - index - location """ pass def setIdentityCredential(self, provider, identifier, verifier): """ Parameters: - provider - identifier - verifier """ pass def setNotificationsEnabled(self, reqSeq, type, target, enablement): """ Parameters: - reqSeq - type - target - enablement """ pass def startUpdateVerification(self, region, carrier, phone, udidHash, deviceInfo, networkCode, locale): """ Parameters: - region - carrier - phone - udidHash - deviceInfo - networkCode - locale """ pass def startVerification(self, region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale): """ Parameters: - region - carrier - phone - udidHash - deviceInfo - networkCode - mid - locale """ pass def storeUpdateProfileAttribute(self, seq, profileAttribute, value): """ Parameters: - seq - profileAttribute - value """ pass def syncContactBySnsIds(self, reqSeq, modifications): """ Parameters: - reqSeq - modifications """ pass def syncContacts(self, reqSeq, localContacts): """ Parameters: - reqSeq - localContacts """ pass def trySendMessage(self, seq, message): """ Parameters: - seq - message """ pass def unblockContact(self, reqSeq, id): """ Parameters: - reqSeq - id """ pass def unblockRecommendation(self, reqSeq, id): """ Parameters: - reqSeq - id """ pass def unregisterUserAndDevice(self): pass def updateApnsDeviceToken(self, apnsDeviceToken): """ Parameters: - apnsDeviceToken """ pass def updateBuddySetting(self, key, value): """ Parameters: - key - value """ pass def updateC2DMRegistrationId(self, registrationId): """ Parameters: - registrationId """ pass def updateContactSetting(self, reqSeq, mid, flag, value): """ Parameters: - reqSeq - mid - flag - value """ pass def updateCustomModeSettings(self, customMode, paramMap): """ Parameters: - customMode - paramMap """ pass def updateDeviceInfo(self, deviceUid, deviceInfo): """ Parameters: - deviceUid - deviceInfo """ pass def updateGroup(self, reqSeq, group): """ Parameters: - reqSeq - group """ pass def updateNotificationToken(self, type, token): """ Parameters: - type - token """ pass def updateNotificationTokenWithBytes(self, type, token): """ Parameters: - type - token """ pass def updateProfile(self, reqSeq, profile): """ Parameters: - reqSeq - profile """ pass def updateProfileAttribute(self, reqSeq, attr, value): """ Parameters: - reqSeq - attr - value """ pass def updateRegion(self, region): """ Parameters: - region """ pass def updateSettings(self, reqSeq, settings): """ Parameters: - reqSeq - settings """ pass def updateSettings2(self, reqSeq, settings): """ Parameters: - reqSeq - settings """ pass def updateSettingsAttribute(self, reqSeq, attr, value): """ Parameters: - reqSeq - attr - value """ pass def updateSettingsAttributes(self, reqSeq, attrBitset, settings): """ Parameters: - reqSeq - attrBitset - settings """ pass def verifyIdentityCredential(self, identityProvider, identifier, password): """ Parameters: - identityProvider - identifier - password """ pass def verifyIdentityCredentialWithResult(self, identityCredential): """ Parameters: - identityCredential """ pass def verifyPhone(self, sessionId, pinCode, udidHash): """ Parameters: - sessionId - pinCode - udidHash """ pass def verifyQrcode(self, verifier, pinCode): """ Parameters: - verifier - pinCode """ pass class Client(Iface): def __init__(self, iprot, oprot=None): self._iprot = self._oprot = iprot if oprot is not None: self._oprot = oprot self._seqid = 0 def acceptGroupInvitation(self, reqSeq, groupId): """ Parameters: - reqSeq - groupId """ self.send_acceptGroupInvitation(reqSeq, groupId) self.recv_acceptGroupInvitation() def send_acceptGroupInvitation(self, reqSeq, groupId): self._oprot.writeMessageBegin('acceptGroupInvitation', TMessageType.CALL, self._seqid) args = acceptGroupInvitation_args() args.reqSeq = reqSeq args.groupId = groupId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_acceptGroupInvitation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = acceptGroupInvitation_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def acceptGroupInvitationByTicket(self, reqSeq, groupId, ticketId): """ Parameters: - reqSeq - groupId - ticketId """ self.send_acceptGroupInvitationByTicket(reqSeq, groupId, ticketId) self.recv_acceptGroupInvitationByTicket() def send_acceptGroupInvitationByTicket(self, reqSeq, groupId, ticketId): self._oprot.writeMessageBegin('acceptGroupInvitationByTicket', TMessageType.CALL, self._seqid) args = acceptGroupInvitationByTicket_args() args.reqSeq = reqSeq args.groupId = groupId args.ticketId = ticketId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_acceptGroupInvitationByTicket(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = acceptGroupInvitationByTicket_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def acceptProximityMatches(self, sessionId, ids): """ Parameters: - sessionId - ids """ self.send_acceptProximityMatches(sessionId, ids) self.recv_acceptProximityMatches() def send_acceptProximityMatches(self, sessionId, ids): self._oprot.writeMessageBegin('acceptProximityMatches', TMessageType.CALL, self._seqid) args = acceptProximityMatches_args() args.sessionId = sessionId args.ids = ids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_acceptProximityMatches(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = acceptProximityMatches_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def acquireCallRoute(self, to): """ Parameters: - to """ self.send_acquireCallRoute(to) return self.recv_acquireCallRoute() def send_acquireCallRoute(self, to): self._oprot.writeMessageBegin('acquireCallRoute', TMessageType.CALL, self._seqid) args = acquireCallRoute_args() args.to = to args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_acquireCallRoute(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = acquireCallRoute_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "acquireCallRoute failed: unknown result") def acquireCallTicket(self, to): """ Parameters: - to """ self.send_acquireCallTicket(to) return self.recv_acquireCallTicket() def send_acquireCallTicket(self, to): self._oprot.writeMessageBegin('acquireCallTicket', TMessageType.CALL, self._seqid) args = acquireCallTicket_args() args.to = to args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_acquireCallTicket(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = acquireCallTicket_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "acquireCallTicket failed: unknown result") def acquireEncryptedAccessToken(self, featureType): """ Parameters: - featureType """ self.send_acquireEncryptedAccessToken(featureType) return self.recv_acquireEncryptedAccessToken() def send_acquireEncryptedAccessToken(self, featureType): self._oprot.writeMessageBegin('acquireEncryptedAccessToken', TMessageType.CALL, self._seqid) args = acquireEncryptedAccessToken_args() args.featureType = featureType args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_acquireEncryptedAccessToken(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = acquireEncryptedAccessToken_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "acquireEncryptedAccessToken failed: unknown result") def addSnsId(self, snsIdType, snsAccessToken): """ Parameters: - snsIdType - snsAccessToken """ self.send_addSnsId(snsIdType, snsAccessToken) return self.recv_addSnsId() def send_addSnsId(self, snsIdType, snsAccessToken): self._oprot.writeMessageBegin('addSnsId', TMessageType.CALL, self._seqid) args = addSnsId_args() args.snsIdType = snsIdType args.snsAccessToken = snsAccessToken args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_addSnsId(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = addSnsId_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "addSnsId failed: unknown result") def blockContact(self, reqSeq, id): """ Parameters: - reqSeq - id """ self.send_blockContact(reqSeq, id) self.recv_blockContact() def send_blockContact(self, reqSeq, id): self._oprot.writeMessageBegin('blockContact', TMessageType.CALL, self._seqid) args = blockContact_args() args.reqSeq = reqSeq args.id = id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_blockContact(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = blockContact_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def blockRecommendation(self, reqSeq, id): """ Parameters: - reqSeq - id """ self.send_blockRecommendation(reqSeq, id) self.recv_blockRecommendation() def send_blockRecommendation(self, reqSeq, id): self._oprot.writeMessageBegin('blockRecommendation', TMessageType.CALL, self._seqid) args = blockRecommendation_args() args.reqSeq = reqSeq args.id = id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_blockRecommendation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = blockRecommendation_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def cancelGroupInvitation(self, reqSeq, groupId, contactIds): """ Parameters: - reqSeq - groupId - contactIds """ self.send_cancelGroupInvitation(reqSeq, groupId, contactIds) self.recv_cancelGroupInvitation() def send_cancelGroupInvitation(self, reqSeq, groupId, contactIds): self._oprot.writeMessageBegin('cancelGroupInvitation', TMessageType.CALL, self._seqid) args = cancelGroupInvitation_args() args.reqSeq = reqSeq args.groupId = groupId args.contactIds = contactIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_cancelGroupInvitation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = cancelGroupInvitation_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def changeVerificationMethod(self, sessionId, method): """ Parameters: - sessionId - method """ self.send_changeVerificationMethod(sessionId, method) return self.recv_changeVerificationMethod() def send_changeVerificationMethod(self, sessionId, method): self._oprot.writeMessageBegin('changeVerificationMethod', TMessageType.CALL, self._seqid) args = changeVerificationMethod_args() args.sessionId = sessionId args.method = method args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_changeVerificationMethod(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = changeVerificationMethod_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "changeVerificationMethod failed: unknown result") def clearIdentityCredential(self): self.send_clearIdentityCredential() self.recv_clearIdentityCredential() def send_clearIdentityCredential(self): self._oprot.writeMessageBegin('clearIdentityCredential', TMessageType.CALL, self._seqid) args = clearIdentityCredential_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_clearIdentityCredential(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = clearIdentityCredential_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def clearMessageBox(self, channelId, messageBoxId): """ Parameters: - channelId - messageBoxId """ self.send_clearMessageBox(channelId, messageBoxId) self.recv_clearMessageBox() def send_clearMessageBox(self, channelId, messageBoxId): self._oprot.writeMessageBegin('clearMessageBox', TMessageType.CALL, self._seqid) args = clearMessageBox_args() args.channelId = channelId args.messageBoxId = messageBoxId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_clearMessageBox(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = clearMessageBox_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def closeProximityMatch(self, sessionId): """ Parameters: - sessionId """ self.send_closeProximityMatch(sessionId) self.recv_closeProximityMatch() def send_closeProximityMatch(self, sessionId): self._oprot.writeMessageBegin('closeProximityMatch', TMessageType.CALL, self._seqid) args = closeProximityMatch_args() args.sessionId = sessionId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_closeProximityMatch(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = closeProximityMatch_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def commitSendMessage(self, seq, messageId, receiverMids): """ Parameters: - seq - messageId - receiverMids """ self.send_commitSendMessage(seq, messageId, receiverMids) return self.recv_commitSendMessage() def send_commitSendMessage(self, seq, messageId, receiverMids): self._oprot.writeMessageBegin('commitSendMessage', TMessageType.CALL, self._seqid) args = commitSendMessage_args() args.seq = seq args.messageId = messageId args.receiverMids = receiverMids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_commitSendMessage(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = commitSendMessage_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "commitSendMessage failed: unknown result") def commitSendMessages(self, seq, messageIds, receiverMids): """ Parameters: - seq - messageIds - receiverMids """ self.send_commitSendMessages(seq, messageIds, receiverMids) return self.recv_commitSendMessages() def send_commitSendMessages(self, seq, messageIds, receiverMids): self._oprot.writeMessageBegin('commitSendMessages', TMessageType.CALL, self._seqid) args = commitSendMessages_args() args.seq = seq args.messageIds = messageIds args.receiverMids = receiverMids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_commitSendMessages(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = commitSendMessages_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "commitSendMessages failed: unknown result") def commitUpdateProfile(self, seq, attrs, receiverMids): """ Parameters: - seq - attrs - receiverMids """ self.send_commitUpdateProfile(seq, attrs, receiverMids) return self.recv_commitUpdateProfile() def send_commitUpdateProfile(self, seq, attrs, receiverMids): self._oprot.writeMessageBegin('commitUpdateProfile', TMessageType.CALL, self._seqid) args = commitUpdateProfile_args() args.seq = seq args.attrs = attrs args.receiverMids = receiverMids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_commitUpdateProfile(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = commitUpdateProfile_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "commitUpdateProfile failed: unknown result") def confirmEmail(self, verifier, pinCode): """ Parameters: - verifier - pinCode """ self.send_confirmEmail(verifier, pinCode) self.recv_confirmEmail() def send_confirmEmail(self, verifier, pinCode): self._oprot.writeMessageBegin('confirmEmail', TMessageType.CALL, self._seqid) args = confirmEmail_args() args.verifier = verifier args.pinCode = pinCode args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_confirmEmail(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = confirmEmail_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def createGroup(self, seq, name, contactIds): """ Parameters: - seq - name - contactIds """ self.send_createGroup(seq, name, contactIds) return self.recv_createGroup() def send_createGroup(self, seq, name, contactIds): self._oprot.writeMessageBegin('createGroup', TMessageType.CALL, self._seqid) args = createGroup_args() args.seq = seq args.name = name args.contactIds = contactIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_createGroup(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = createGroup_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "createGroup failed: unknown result") def createQrcodeBase64Image(self, url, characterSet, imageSize, x, y, width, height): """ Parameters: - url - characterSet - imageSize - x - y - width - height """ self.send_createQrcodeBase64Image(url, characterSet, imageSize, x, y, width, height) return self.recv_createQrcodeBase64Image() def send_createQrcodeBase64Image(self, url, characterSet, imageSize, x, y, width, height): self._oprot.writeMessageBegin('createQrcodeBase64Image', TMessageType.CALL, self._seqid) args = createQrcodeBase64Image_args() args.url = url args.characterSet = characterSet args.imageSize = imageSize args.x = x args.y = y args.width = width args.height = height args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_createQrcodeBase64Image(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = createQrcodeBase64Image_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "createQrcodeBase64Image failed: unknown result") def createRoom(self, reqSeq, contactIds): """ Parameters: - reqSeq - contactIds """ self.send_createRoom(reqSeq, contactIds) return self.recv_createRoom() def send_createRoom(self, reqSeq, contactIds): self._oprot.writeMessageBegin('createRoom', TMessageType.CALL, self._seqid) args = createRoom_args() args.reqSeq = reqSeq args.contactIds = contactIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_createRoom(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = createRoom_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "createRoom failed: unknown result") def createSession(self): self.send_createSession() return self.recv_createSession() def send_createSession(self): self._oprot.writeMessageBegin('createSession', TMessageType.CALL, self._seqid) args = createSession_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_createSession(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = createSession_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "createSession failed: unknown result") def fetchAnnouncements(self, lastFetchedIndex): """ Parameters: - lastFetchedIndex """ self.send_fetchAnnouncements(lastFetchedIndex) return self.recv_fetchAnnouncements() def send_fetchAnnouncements(self, lastFetchedIndex): self._oprot.writeMessageBegin('fetchAnnouncements', TMessageType.CALL, self._seqid) args = fetchAnnouncements_args() args.lastFetchedIndex = lastFetchedIndex args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_fetchAnnouncements(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = fetchAnnouncements_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchAnnouncements failed: unknown result") def fetchMessages(self, localTs, count): """ Parameters: - localTs - count """ self.send_fetchMessages(localTs, count) return self.recv_fetchMessages() def send_fetchMessages(self, localTs, count): self._oprot.writeMessageBegin('fetchMessages', TMessageType.CALL, self._seqid) args = fetchMessages_args() args.localTs = localTs args.count = count args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_fetchMessages(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = fetchMessages_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchMessages failed: unknown result") def fetchOperations(self, localRev, count): """ Parameters: - localRev - count """ self.send_fetchOperations(localRev, count) return self.recv_fetchOperations() def send_fetchOperations(self, localRev, count): self._oprot.writeMessageBegin('fetchOperations', TMessageType.CALL, self._seqid) args = fetchOperations_args() args.localRev = localRev args.count = count args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_fetchOperations(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = fetchOperations_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchOperations failed: unknown result") def fetchOps(self, localRev, count, globalRev, individualRev): """ Parameters: - localRev - count - globalRev - individualRev """ self.send_fetchOps(localRev, count, globalRev, individualRev) return self.recv_fetchOps() def send_fetchOps(self, localRev, count, globalRev, individualRev): self._oprot.writeMessageBegin('fetchOps', TMessageType.CALL, self._seqid) args = fetchOps_args() args.localRev = localRev args.count = count args.globalRev = globalRev args.individualRev = individualRev args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_fetchOps(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = fetchOps_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchOps failed: unknown result") def findAndAddContactsByEmail(self, reqSeq, emails): """ Parameters: - reqSeq - emails """ self.send_findAndAddContactsByEmail(reqSeq, emails) return self.recv_findAndAddContactsByEmail() def send_findAndAddContactsByEmail(self, reqSeq, emails): self._oprot.writeMessageBegin('findAndAddContactsByEmail', TMessageType.CALL, self._seqid) args = findAndAddContactsByEmail_args() args.reqSeq = reqSeq args.emails = emails args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findAndAddContactsByEmail(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findAndAddContactsByEmail_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findAndAddContactsByEmail failed: unknown result") def findAndAddContactsByMid(self, reqSeq, mid): """ Parameters: - reqSeq - mid """ self.send_findAndAddContactsByMid(reqSeq, mid) return self.recv_findAndAddContactsByMid() def send_findAndAddContactsByMid(self, reqSeq, mid): self._oprot.writeMessageBegin('findAndAddContactsByMid', TMessageType.CALL, self._seqid) args = findAndAddContactsByMid_args() args.reqSeq = reqSeq args.mid = mid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findAndAddContactsByMid(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findAndAddContactsByMid_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findAndAddContactsByMid failed: unknown result") def findAndAddContactsByPhone(self, reqSeq, phones): """ Parameters: - reqSeq - phones """ self.send_findAndAddContactsByPhone(reqSeq, phones) return self.recv_findAndAddContactsByPhone() def send_findAndAddContactsByPhone(self, reqSeq, phones): self._oprot.writeMessageBegin('findAndAddContactsByPhone', TMessageType.CALL, self._seqid) args = findAndAddContactsByPhone_args() args.reqSeq = reqSeq args.phones = phones args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findAndAddContactsByPhone(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findAndAddContactsByPhone_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findAndAddContactsByPhone failed: unknown result") def findAndAddContactsByUserid(self, reqSeq, userid): """ Parameters: - reqSeq - userid """ self.send_findAndAddContactsByUserid(reqSeq, userid) return self.recv_findAndAddContactsByUserid() def send_findAndAddContactsByUserid(self, reqSeq, userid): self._oprot.writeMessageBegin('findAndAddContactsByUserid', TMessageType.CALL, self._seqid) args = findAndAddContactsByUserid_args() args.reqSeq = reqSeq args.userid = userid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findAndAddContactsByUserid(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findAndAddContactsByUserid_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findAndAddContactsByUserid failed: unknown result") def findContactByUserid(self, userid): """ Parameters: - userid """ self.send_findContactByUserid(userid) return self.recv_findContactByUserid() def send_findContactByUserid(self, userid): self._oprot.writeMessageBegin('findContactByUserid', TMessageType.CALL, self._seqid) args = findContactByUserid_args() args.userid = userid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findContactByUserid(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findContactByUserid_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findContactByUserid failed: unknown result") def findContactByUserTicket(self, ticketId): """ Parameters: - ticketId """ self.send_findContactByUserTicket(ticketId) return self.recv_findContactByUserTicket() def send_findContactByUserTicket(self, ticketId): self._oprot.writeMessageBegin('findContactByUserTicket', TMessageType.CALL, self._seqid) args = findContactByUserTicket_args() args.ticketId = ticketId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findContactByUserTicket(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findContactByUserTicket_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findContactByUserTicket failed: unknown result") def findContactsByEmail(self, emails): """ Parameters: - emails """ self.send_findContactsByEmail(emails) return self.recv_findContactsByEmail() def send_findContactsByEmail(self, emails): self._oprot.writeMessageBegin('findContactsByEmail', TMessageType.CALL, self._seqid) args = findContactsByEmail_args() args.emails = emails args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findContactsByEmail(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findContactsByEmail_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findContactsByEmail failed: unknown result") def findContactsByPhone(self, phones): """ Parameters: - phones """ self.send_findContactsByPhone(phones) return self.recv_findContactsByPhone() def send_findContactsByPhone(self, phones): self._oprot.writeMessageBegin('findContactsByPhone', TMessageType.CALL, self._seqid) args = findContactsByPhone_args() args.phones = phones args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findContactsByPhone(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findContactsByPhone_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findContactsByPhone failed: unknown result") def findSnsIdUserStatus(self, snsIdType, snsAccessToken, udidHash): """ Parameters: - snsIdType - snsAccessToken - udidHash """ self.send_findSnsIdUserStatus(snsIdType, snsAccessToken, udidHash) return self.recv_findSnsIdUserStatus() def send_findSnsIdUserStatus(self, snsIdType, snsAccessToken, udidHash): self._oprot.writeMessageBegin('findSnsIdUserStatus', TMessageType.CALL, self._seqid) args = findSnsIdUserStatus_args() args.snsIdType = snsIdType args.snsAccessToken = snsAccessToken args.udidHash = udidHash args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findSnsIdUserStatus(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findSnsIdUserStatus_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findSnsIdUserStatus failed: unknown result") def finishUpdateVerification(self, sessionId): """ Parameters: - sessionId """ self.send_finishUpdateVerification(sessionId) self.recv_finishUpdateVerification() def send_finishUpdateVerification(self, sessionId): self._oprot.writeMessageBegin('finishUpdateVerification', TMessageType.CALL, self._seqid) args = finishUpdateVerification_args() args.sessionId = sessionId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_finishUpdateVerification(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = finishUpdateVerification_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def generateUserTicket(self, expirationTime, maxUseCount): """ Parameters: - expirationTime - maxUseCount """ self.send_generateUserTicket(expirationTime, maxUseCount) return self.recv_generateUserTicket() def send_generateUserTicket(self, expirationTime, maxUseCount): self._oprot.writeMessageBegin('generateUserTicket', TMessageType.CALL, self._seqid) args = generateUserTicket_args() args.expirationTime = expirationTime args.maxUseCount = maxUseCount args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_generateUserTicket(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = generateUserTicket_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "generateUserTicket failed: unknown result") def getAcceptedProximityMatches(self, sessionId): """ Parameters: - sessionId """ self.send_getAcceptedProximityMatches(sessionId) return self.recv_getAcceptedProximityMatches() def send_getAcceptedProximityMatches(self, sessionId): self._oprot.writeMessageBegin('getAcceptedProximityMatches', TMessageType.CALL, self._seqid) args = getAcceptedProximityMatches_args() args.sessionId = sessionId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getAcceptedProximityMatches(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getAcceptedProximityMatches_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getAcceptedProximityMatches failed: unknown result") def getActiveBuddySubscriberIds(self): self.send_getActiveBuddySubscriberIds() return self.recv_getActiveBuddySubscriberIds() def send_getActiveBuddySubscriberIds(self): self._oprot.writeMessageBegin('getActiveBuddySubscriberIds', TMessageType.CALL, self._seqid) args = getActiveBuddySubscriberIds_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getActiveBuddySubscriberIds(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getActiveBuddySubscriberIds_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getActiveBuddySubscriberIds failed: unknown result") def getAllContactIds(self): self.send_getAllContactIds() return self.recv_getAllContactIds() def send_getAllContactIds(self): self._oprot.writeMessageBegin('getAllContactIds', TMessageType.CALL, self._seqid) args = getAllContactIds_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getAllContactIds(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getAllContactIds_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllContactIds failed: unknown result") def getAuthQrcode(self, keepLoggedIn, systemName): """ Parameters: - keepLoggedIn - systemName """ self.send_getAuthQrcode(keepLoggedIn, systemName) return self.recv_getAuthQrcode() def send_getAuthQrcode(self, keepLoggedIn, systemName): self._oprot.writeMessageBegin('getAuthQrcode', TMessageType.CALL, self._seqid) args = getAuthQrcode_args() args.keepLoggedIn = keepLoggedIn args.systemName = systemName args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getAuthQrcode(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getAuthQrcode_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getAuthQrcode failed: unknown result") def getBlockedContactIds(self): self.send_getBlockedContactIds() return self.recv_getBlockedContactIds() def send_getBlockedContactIds(self): self._oprot.writeMessageBegin('getBlockedContactIds', TMessageType.CALL, self._seqid) args = getBlockedContactIds_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getBlockedContactIds(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getBlockedContactIds_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getBlockedContactIds failed: unknown result") def getBlockedContactIdsByRange(self, start, count): """ Parameters: - start - count """ self.send_getBlockedContactIdsByRange(start, count) return self.recv_getBlockedContactIdsByRange() def send_getBlockedContactIdsByRange(self, start, count): self._oprot.writeMessageBegin('getBlockedContactIdsByRange', TMessageType.CALL, self._seqid) args = getBlockedContactIdsByRange_args() args.start = start args.count = count args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getBlockedContactIdsByRange(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getBlockedContactIdsByRange_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getBlockedContactIdsByRange failed: unknown result") def getBlockedRecommendationIds(self): self.send_getBlockedRecommendationIds() return self.recv_getBlockedRecommendationIds() def send_getBlockedRecommendationIds(self): self._oprot.writeMessageBegin('getBlockedRecommendationIds', TMessageType.CALL, self._seqid) args = getBlockedRecommendationIds_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getBlockedRecommendationIds(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getBlockedRecommendationIds_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getBlockedRecommendationIds failed: unknown result") def getBuddyBlockerIds(self): self.send_getBuddyBlockerIds() return self.recv_getBuddyBlockerIds() def send_getBuddyBlockerIds(self): self._oprot.writeMessageBegin('getBuddyBlockerIds', TMessageType.CALL, self._seqid) args = getBuddyBlockerIds_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getBuddyBlockerIds(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getBuddyBlockerIds_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getBuddyBlockerIds failed: unknown result") def getBuddyLocation(self, mid, index): """ Parameters: - mid - index """ self.send_getBuddyLocation(mid, index) return self.recv_getBuddyLocation() def send_getBuddyLocation(self, mid, index): self._oprot.writeMessageBegin('getBuddyLocation', TMessageType.CALL, self._seqid) args = getBuddyLocation_args() args.mid = mid args.index = index args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getBuddyLocation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getBuddyLocation_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getBuddyLocation failed: unknown result") def getCompactContactsModifiedSince(self, timestamp): """ Parameters: - timestamp """ self.send_getCompactContactsModifiedSince(timestamp) return self.recv_getCompactContactsModifiedSince() def send_getCompactContactsModifiedSince(self, timestamp): self._oprot.writeMessageBegin('getCompactContactsModifiedSince', TMessageType.CALL, self._seqid) args = getCompactContactsModifiedSince_args() args.timestamp = timestamp args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getCompactContactsModifiedSince(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getCompactContactsModifiedSince_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getCompactContactsModifiedSince failed: unknown result") def getCompactGroup(self, groupId): """ Parameters: - groupId """ self.send_getCompactGroup(groupId) return self.recv_getCompactGroup() def send_getCompactGroup(self, groupId): self._oprot.writeMessageBegin('getCompactGroup', TMessageType.CALL, self._seqid) args = getCompactGroup_args() args.groupId = groupId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getCompactGroup(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getCompactGroup_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getCompactGroup failed: unknown result") def getCompactRoom(self, roomId): """ Parameters: - roomId """ self.send_getCompactRoom(roomId) return self.recv_getCompactRoom() def send_getCompactRoom(self, roomId): self._oprot.writeMessageBegin('getCompactRoom', TMessageType.CALL, self._seqid) args = getCompactRoom_args() args.roomId = roomId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getCompactRoom(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getCompactRoom_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getCompactRoom failed: unknown result") def getContact(self, id): """ Parameters: - id """ self.send_getContact(id) return self.recv_getContact() def send_getContact(self, id): self._oprot.writeMessageBegin('getContact', TMessageType.CALL, self._seqid) args = getContact_args() args.id = id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getContact(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getContact_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getContact failed: unknown result") def getContacts(self, ids): """ Parameters: - ids """ self.send_getContacts(ids) return self.recv_getContacts() def send_getContacts(self, ids): self._oprot.writeMessageBegin('getContacts', TMessageType.CALL, self._seqid) args = getContacts_args() args.ids = ids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getContacts(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getContacts_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getContacts failed: unknown result") def getCountryWithRequestIp(self): self.send_getCountryWithRequestIp() return self.recv_getCountryWithRequestIp() def send_getCountryWithRequestIp(self): self._oprot.writeMessageBegin('getCountryWithRequestIp', TMessageType.CALL, self._seqid) args = getCountryWithRequestIp_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getCountryWithRequestIp(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getCountryWithRequestIp_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getCountryWithRequestIp failed: unknown result") def getFavoriteMids(self): self.send_getFavoriteMids() return self.recv_getFavoriteMids() def send_getFavoriteMids(self): self._oprot.writeMessageBegin('getFavoriteMids', TMessageType.CALL, self._seqid) args = getFavoriteMids_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getFavoriteMids(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getFavoriteMids_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getFavoriteMids failed: unknown result") def getGroup(self, groupId): """ Parameters: - groupId """ self.send_getGroup(groupId) return self.recv_getGroup() def send_getGroup(self, groupId): self._oprot.writeMessageBegin('getGroup', TMessageType.CALL, self._seqid) args = getGroup_args() args.groupId = groupId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getGroup(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getGroup_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroup failed: unknown result") def getGroupIdsInvited(self): self.send_getGroupIdsInvited() return self.recv_getGroupIdsInvited() def send_getGroupIdsInvited(self): self._oprot.writeMessageBegin('getGroupIdsInvited', TMessageType.CALL, self._seqid) args = getGroupIdsInvited_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getGroupIdsInvited(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getGroupIdsInvited_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroupIdsInvited failed: unknown result") def getGroupIdsJoined(self): self.send_getGroupIdsJoined() return self.recv_getGroupIdsJoined() def send_getGroupIdsJoined(self): self._oprot.writeMessageBegin('getGroupIdsJoined', TMessageType.CALL, self._seqid) args = getGroupIdsJoined_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getGroupIdsJoined(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getGroupIdsJoined_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroupIdsJoined failed: unknown result") def getGroups(self, groupIds): """ Parameters: - groupIds """ self.send_getGroups(groupIds) return self.recv_getGroups() def send_getGroups(self, groupIds): self._oprot.writeMessageBegin('getGroups', TMessageType.CALL, self._seqid) args = getGroups_args() args.groupIds = groupIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getGroups(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getGroups_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroups failed: unknown result") def getHiddenContactMids(self): self.send_getHiddenContactMids() return self.recv_getHiddenContactMids() def send_getHiddenContactMids(self): self._oprot.writeMessageBegin('getHiddenContactMids', TMessageType.CALL, self._seqid) args = getHiddenContactMids_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getHiddenContactMids(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getHiddenContactMids_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getHiddenContactMids failed: unknown result") def getIdentityIdentifier(self): self.send_getIdentityIdentifier() return self.recv_getIdentityIdentifier() def send_getIdentityIdentifier(self): self._oprot.writeMessageBegin('getIdentityIdentifier', TMessageType.CALL, self._seqid) args = getIdentityIdentifier_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getIdentityIdentifier(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getIdentityIdentifier_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getIdentityIdentifier failed: unknown result") def getLastAnnouncementIndex(self): self.send_getLastAnnouncementIndex() return self.recv_getLastAnnouncementIndex() def send_getLastAnnouncementIndex(self): self._oprot.writeMessageBegin('getLastAnnouncementIndex', TMessageType.CALL, self._seqid) args = getLastAnnouncementIndex_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getLastAnnouncementIndex(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getLastAnnouncementIndex_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getLastAnnouncementIndex failed: unknown result") def getLastOpRevision(self): self.send_getLastOpRevision() return self.recv_getLastOpRevision() def send_getLastOpRevision(self): self._oprot.writeMessageBegin('getLastOpRevision', TMessageType.CALL, self._seqid) args = getLastOpRevision_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getLastOpRevision(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getLastOpRevision_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getLastOpRevision failed: unknown result") def getMessageBox(self, channelId, messageBoxId, lastMessagesCount): """ Parameters: - channelId - messageBoxId - lastMessagesCount """ self.send_getMessageBox(channelId, messageBoxId, lastMessagesCount) return self.recv_getMessageBox() def send_getMessageBox(self, channelId, messageBoxId, lastMessagesCount): self._oprot.writeMessageBegin('getMessageBox', TMessageType.CALL, self._seqid) args = getMessageBox_args() args.channelId = channelId args.messageBoxId = messageBoxId args.lastMessagesCount = lastMessagesCount args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getMessageBox(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getMessageBox_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getMessageBox failed: unknown result") def getMessageBoxCompactWrapUp(self, mid): """ Parameters: - mid """ self.send_getMessageBoxCompactWrapUp(mid) return self.recv_getMessageBoxCompactWrapUp() def send_getMessageBoxCompactWrapUp(self, mid): self._oprot.writeMessageBegin('getMessageBoxCompactWrapUp', TMessageType.CALL, self._seqid) args = getMessageBoxCompactWrapUp_args() args.mid = mid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getMessageBoxCompactWrapUp(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getMessageBoxCompactWrapUp_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getMessageBoxCompactWrapUp failed: unknown result") def getMessageBoxCompactWrapUpList(self, start, messageBoxCount): """ Parameters: - start - messageBoxCount """ self.send_getMessageBoxCompactWrapUpList(start, messageBoxCount) return self.recv_getMessageBoxCompactWrapUpList() def send_getMessageBoxCompactWrapUpList(self, start, messageBoxCount): self._oprot.writeMessageBegin('getMessageBoxCompactWrapUpList', TMessageType.CALL, self._seqid) args = getMessageBoxCompactWrapUpList_args() args.start = start args.messageBoxCount = messageBoxCount args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getMessageBoxCompactWrapUpList(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getMessageBoxCompactWrapUpList_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getMessageBoxCompactWrapUpList failed: unknown result") def getMessageBoxList(self, channelId, lastMessagesCount): """ Parameters: - channelId - lastMessagesCount """ self.send_getMessageBoxList(channelId, lastMessagesCount) return self.recv_getMessageBoxList() def send_getMessageBoxList(self, channelId, lastMessagesCount): self._oprot.writeMessageBegin('getMessageBoxList', TMessageType.CALL, self._seqid) args = getMessageBoxList_args() args.channelId = channelId args.lastMessagesCount = lastMessagesCount args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getMessageBoxList(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getMessageBoxList_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getMessageBoxList failed: unknown result") def getMessageBoxListByStatus(self, channelId, lastMessagesCount, status): """ Parameters: - channelId - lastMessagesCount - status """ self.send_getMessageBoxListByStatus(channelId, lastMessagesCount, status) return self.recv_getMessageBoxListByStatus() def send_getMessageBoxListByStatus(self, channelId, lastMessagesCount, status): self._oprot.writeMessageBegin('getMessageBoxListByStatus', TMessageType.CALL, self._seqid) args = getMessageBoxListByStatus_args() args.channelId = channelId args.lastMessagesCount = lastMessagesCount args.status = status args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getMessageBoxListByStatus(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getMessageBoxListByStatus_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getMessageBoxListByStatus failed: unknown result") def getMessageBoxWrapUp(self, mid): """ Parameters: - mid """ self.send_getMessageBoxWrapUp(mid) return self.recv_getMessageBoxWrapUp() def send_getMessageBoxWrapUp(self, mid): self._oprot.writeMessageBegin('getMessageBoxWrapUp', TMessageType.CALL, self._seqid) args = getMessageBoxWrapUp_args() args.mid = mid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getMessageBoxWrapUp(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getMessageBoxWrapUp_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getMessageBoxWrapUp failed: unknown result") def getMessageBoxWrapUpList(self, start, messageBoxCount): """ Parameters: - start - messageBoxCount """ self.send_getMessageBoxWrapUpList(start, messageBoxCount) return self.recv_getMessageBoxWrapUpList() def send_getMessageBoxWrapUpList(self, start, messageBoxCount): self._oprot.writeMessageBegin('getMessageBoxWrapUpList', TMessageType.CALL, self._seqid) args = getMessageBoxWrapUpList_args() args.start = start args.messageBoxCount = messageBoxCount args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getMessageBoxWrapUpList(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getMessageBoxWrapUpList_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getMessageBoxWrapUpList failed: unknown result") def getMessagesBySequenceNumber(self, channelId, messageBoxId, startSeq, endSeq): """ Parameters: - channelId - messageBoxId - startSeq - endSeq """ self.send_getMessagesBySequenceNumber(channelId, messageBoxId, startSeq, endSeq) return self.recv_getMessagesBySequenceNumber() def send_getMessagesBySequenceNumber(self, channelId, messageBoxId, startSeq, endSeq): self._oprot.writeMessageBegin('getMessagesBySequenceNumber', TMessageType.CALL, self._seqid) args = getMessagesBySequenceNumber_args() args.channelId = channelId args.messageBoxId = messageBoxId args.startSeq = startSeq args.endSeq = endSeq args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getMessagesBySequenceNumber(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getMessagesBySequenceNumber_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getMessagesBySequenceNumber failed: unknown result") def getNextMessages(self, messageBoxId, startSeq, messagesCount): """ Parameters: - messageBoxId - startSeq - messagesCount """ self.send_getNextMessages(messageBoxId, startSeq, messagesCount) return self.recv_getNextMessages() def send_getNextMessages(self, messageBoxId, startSeq, messagesCount): self._oprot.writeMessageBegin('getNextMessages', TMessageType.CALL, self._seqid) args = getNextMessages_args() args.messageBoxId = messageBoxId args.startSeq = startSeq args.messagesCount = messagesCount args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getNextMessages(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getNextMessages_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getNextMessages failed: unknown result") def getNotificationPolicy(self, carrier): """ Parameters: - carrier """ self.send_getNotificationPolicy(carrier) return self.recv_getNotificationPolicy() def send_getNotificationPolicy(self, carrier): self._oprot.writeMessageBegin('getNotificationPolicy', TMessageType.CALL, self._seqid) args = getNotificationPolicy_args() args.carrier = carrier args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getNotificationPolicy(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getNotificationPolicy_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getNotificationPolicy failed: unknown result") def getPreviousMessages(self, messageBoxId, endSeq, messagesCount): """ Parameters: - messageBoxId - endSeq - messagesCount """ self.send_getPreviousMessages(messageBoxId, endSeq, messagesCount) return self.recv_getPreviousMessages() def send_getPreviousMessages(self, messageBoxId, endSeq, messagesCount): self._oprot.writeMessageBegin('getPreviousMessages', TMessageType.CALL, self._seqid) args = getPreviousMessages_args() args.messageBoxId = messageBoxId args.endSeq = endSeq args.messagesCount = messagesCount args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getPreviousMessages(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getPreviousMessages_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getPreviousMessages failed: unknown result") def getProfile(self): self.send_getProfile() return self.recv_getProfile() def send_getProfile(self): self._oprot.writeMessageBegin('getProfile', TMessageType.CALL, self._seqid) args = getProfile_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getProfile(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getProfile_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getProfile failed: unknown result") def getProximityMatchCandidateList(self, sessionId): """ Parameters: - sessionId """ self.send_getProximityMatchCandidateList(sessionId) return self.recv_getProximityMatchCandidateList() def send_getProximityMatchCandidateList(self, sessionId): self._oprot.writeMessageBegin('getProximityMatchCandidateList', TMessageType.CALL, self._seqid) args = getProximityMatchCandidateList_args() args.sessionId = sessionId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getProximityMatchCandidateList(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getProximityMatchCandidateList_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getProximityMatchCandidateList failed: unknown result") def getProximityMatchCandidates(self, sessionId): """ Parameters: - sessionId """ self.send_getProximityMatchCandidates(sessionId) return self.recv_getProximityMatchCandidates() def send_getProximityMatchCandidates(self, sessionId): self._oprot.writeMessageBegin('getProximityMatchCandidates', TMessageType.CALL, self._seqid) args = getProximityMatchCandidates_args() args.sessionId = sessionId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getProximityMatchCandidates(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getProximityMatchCandidates_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getProximityMatchCandidates failed: unknown result") def getRecentMessages(self, messageBoxId, messagesCount): """ Parameters: - messageBoxId - messagesCount """ self.send_getRecentMessages(messageBoxId, messagesCount) return self.recv_getRecentMessages() def send_getRecentMessages(self, messageBoxId, messagesCount): self._oprot.writeMessageBegin('getRecentMessages', TMessageType.CALL, self._seqid) args = getRecentMessages_args() args.messageBoxId = messageBoxId args.messagesCount = messagesCount args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getRecentMessages(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getRecentMessages_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getRecentMessages failed: unknown result") def getRecommendationIds(self): self.send_getRecommendationIds() return self.recv_getRecommendationIds() def send_getRecommendationIds(self): self._oprot.writeMessageBegin('getRecommendationIds', TMessageType.CALL, self._seqid) args = getRecommendationIds_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getRecommendationIds(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getRecommendationIds_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getRecommendationIds failed: unknown result") def getRoom(self, roomId): """ Parameters: - roomId """ self.send_getRoom(roomId) return self.recv_getRoom() def send_getRoom(self, roomId): self._oprot.writeMessageBegin('getRoom', TMessageType.CALL, self._seqid) args = getRoom_args() args.roomId = roomId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getRoom(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getRoom_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getRoom failed: unknown result") def getRSAKeyInfo(self, provider): """ Parameters: - provider """ self.send_getRSAKeyInfo(provider) return self.recv_getRSAKeyInfo() def send_getRSAKeyInfo(self, provider): self._oprot.writeMessageBegin('getRSAKeyInfo', TMessageType.CALL, self._seqid) args = getRSAKeyInfo_args() args.provider = provider args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getRSAKeyInfo(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getRSAKeyInfo_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getRSAKeyInfo failed: unknown result") def getServerTime(self): self.send_getServerTime() return self.recv_getServerTime() def send_getServerTime(self): self._oprot.writeMessageBegin('getServerTime', TMessageType.CALL, self._seqid) args = getServerTime_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getServerTime(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getServerTime_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getServerTime failed: unknown result") def getSessions(self): self.send_getSessions() return self.recv_getSessions() def send_getSessions(self): self._oprot.writeMessageBegin('getSessions', TMessageType.CALL, self._seqid) args = getSessions_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getSessions(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getSessions_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getSessions failed: unknown result") def getSettings(self): self.send_getSettings() return self.recv_getSettings() def send_getSettings(self): self._oprot.writeMessageBegin('getSettings', TMessageType.CALL, self._seqid) args = getSettings_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getSettings(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getSettings_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getSettings failed: unknown result") def getSettingsAttributes(self, attrBitset): """ Parameters: - attrBitset """ self.send_getSettingsAttributes(attrBitset) return self.recv_getSettingsAttributes() def send_getSettingsAttributes(self, attrBitset): self._oprot.writeMessageBegin('getSettingsAttributes', TMessageType.CALL, self._seqid) args = getSettingsAttributes_args() args.attrBitset = attrBitset args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getSettingsAttributes(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getSettingsAttributes_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getSettingsAttributes failed: unknown result") def getSystemConfiguration(self): self.send_getSystemConfiguration() return self.recv_getSystemConfiguration() def send_getSystemConfiguration(self): self._oprot.writeMessageBegin('getSystemConfiguration', TMessageType.CALL, self._seqid) args = getSystemConfiguration_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getSystemConfiguration(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getSystemConfiguration_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getSystemConfiguration failed: unknown result") def getUserTicket(self): self.send_getUserTicket() return self.recv_getUserTicket() def send_getUserTicket(self): self._oprot.writeMessageBegin('getUserTicket', TMessageType.CALL, self._seqid) args = getUserTicket_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getUserTicket(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getUserTicket_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserTicket failed: unknown result") def getWapInvitation(self, invitationHash): """ Parameters: - invitationHash """ self.send_getWapInvitation(invitationHash) return self.recv_getWapInvitation() def send_getWapInvitation(self, invitationHash): self._oprot.writeMessageBegin('getWapInvitation', TMessageType.CALL, self._seqid) args = getWapInvitation_args() args.invitationHash = invitationHash args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_getWapInvitation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = getWapInvitation_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "getWapInvitation failed: unknown result") def invalidateUserTicket(self): self.send_invalidateUserTicket() self.recv_invalidateUserTicket() def send_invalidateUserTicket(self): self._oprot.writeMessageBegin('invalidateUserTicket', TMessageType.CALL, self._seqid) args = invalidateUserTicket_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_invalidateUserTicket(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = invalidateUserTicket_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def inviteFriendsBySms(self, phoneNumberList): """ Parameters: - phoneNumberList """ self.send_inviteFriendsBySms(phoneNumberList) self.recv_inviteFriendsBySms() def send_inviteFriendsBySms(self, phoneNumberList): self._oprot.writeMessageBegin('inviteFriendsBySms', TMessageType.CALL, self._seqid) args = inviteFriendsBySms_args() args.phoneNumberList = phoneNumberList args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_inviteFriendsBySms(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = inviteFriendsBySms_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def inviteIntoGroup(self, reqSeq, groupId, contactIds): """ Parameters: - reqSeq - groupId - contactIds """ self.send_inviteIntoGroup(reqSeq, groupId, contactIds) self.recv_inviteIntoGroup() def send_inviteIntoGroup(self, reqSeq, groupId, contactIds): self._oprot.writeMessageBegin('inviteIntoGroup', TMessageType.CALL, self._seqid) args = inviteIntoGroup_args() args.reqSeq = reqSeq args.groupId = groupId args.contactIds = contactIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_inviteIntoGroup(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = inviteIntoGroup_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def inviteIntoRoom(self, reqSeq, roomId, contactIds): """ Parameters: - reqSeq - roomId - contactIds """ self.send_inviteIntoRoom(reqSeq, roomId, contactIds) self.recv_inviteIntoRoom() def send_inviteIntoRoom(self, reqSeq, roomId, contactIds): self._oprot.writeMessageBegin('inviteIntoRoom', TMessageType.CALL, self._seqid) args = inviteIntoRoom_args() args.reqSeq = reqSeq args.roomId = roomId args.contactIds = contactIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_inviteIntoRoom(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = inviteIntoRoom_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def inviteViaEmail(self, reqSeq, email, name): """ Parameters: - reqSeq - email - name """ self.send_inviteViaEmail(reqSeq, email, name) self.recv_inviteViaEmail() def send_inviteViaEmail(self, reqSeq, email, name): self._oprot.writeMessageBegin('inviteViaEmail', TMessageType.CALL, self._seqid) args = inviteViaEmail_args() args.reqSeq = reqSeq args.email = email args.name = name args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_inviteViaEmail(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = inviteViaEmail_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def isIdentityIdentifierAvailable(self, provider, identifier): """ Parameters: - provider - identifier """ self.send_isIdentityIdentifierAvailable(provider, identifier) return self.recv_isIdentityIdentifierAvailable() def send_isIdentityIdentifierAvailable(self, provider, identifier): self._oprot.writeMessageBegin('isIdentityIdentifierAvailable', TMessageType.CALL, self._seqid) args = isIdentityIdentifierAvailable_args() args.provider = provider args.identifier = identifier args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_isIdentityIdentifierAvailable(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = isIdentityIdentifierAvailable_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "isIdentityIdentifierAvailable failed: unknown result") def isUseridAvailable(self, userid): """ Parameters: - userid """ self.send_isUseridAvailable(userid) return self.recv_isUseridAvailable() def send_isUseridAvailable(self, userid): self._oprot.writeMessageBegin('isUseridAvailable', TMessageType.CALL, self._seqid) args = isUseridAvailable_args() args.userid = userid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_isUseridAvailable(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = isUseridAvailable_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "isUseridAvailable failed: unknown result") def kickoutFromGroup(self, reqSeq, groupId, contactIds): """ Parameters: - reqSeq - groupId - contactIds """ self.send_kickoutFromGroup(reqSeq, groupId, contactIds) self.recv_kickoutFromGroup() def send_kickoutFromGroup(self, reqSeq, groupId, contactIds): self._oprot.writeMessageBegin('kickoutFromGroup', TMessageType.CALL, self._seqid) args = kickoutFromGroup_args() args.reqSeq = reqSeq args.groupId = groupId args.contactIds = contactIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_kickoutFromGroup(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = kickoutFromGroup_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def reissueGroupTicket(self, groupId): """ Parameters: - groupId """ self.send_reissueGroupTicket(groupId) return self.recv_reissueGroupTicket() def send_reissueGroupTicket(self, groupId): self._oprot.writeMessageBegin('reissueGroupTicket', TMessageType.CALL, self._seqid) args = reissueGroupTicket_args() args.groupId = groupId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_reissueGroupTicket(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = reissueGroupTicket_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "reissueGroupTicket failed: unknown result") def findGroupByTicket(self, ticketId): """ Parameters: - ticketId """ self.send_findGroupByTicket(ticketId) return self.recv_findGroupByTicket() def send_findGroupByTicket(self, ticketId): self._oprot.writeMessageBegin('findGroupByTicket', TMessageType.CALL, self._seqid) args = findGroupByTicket_args() args.ticketId = ticketId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_findGroupByTicket(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = findGroupByTicket_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "findGroupByTicket failed: unknown result") def leaveGroup(self, reqSeq, groupId): """ Parameters: - reqSeq - groupId """ self.send_leaveGroup(reqSeq, groupId) self.recv_leaveGroup() def send_leaveGroup(self, reqSeq, groupId): self._oprot.writeMessageBegin('leaveGroup', TMessageType.CALL, self._seqid) args = leaveGroup_args() args.reqSeq = reqSeq args.groupId = groupId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_leaveGroup(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = leaveGroup_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def leaveRoom(self, reqSeq, roomId): """ Parameters: - reqSeq - roomId """ self.send_leaveRoom(reqSeq, roomId) self.recv_leaveRoom() def send_leaveRoom(self, reqSeq, roomId): self._oprot.writeMessageBegin('leaveRoom', TMessageType.CALL, self._seqid) args = leaveRoom_args() args.reqSeq = reqSeq args.roomId = roomId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_leaveRoom(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = leaveRoom_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def loginWithIdentityCredential(self, identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate): """ Parameters: - identityProvider - identifier - password - keepLoggedIn - accessLocation - systemName - certificate """ self.send_loginWithIdentityCredential(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate) return self.recv_loginWithIdentityCredential() def send_loginWithIdentityCredential(self, identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate): self._oprot.writeMessageBegin('loginWithIdentityCredential', TMessageType.CALL, self._seqid) args = loginWithIdentityCredential_args() args.identityProvider = identityProvider args.identifier = identifier args.password = password args.keepLoggedIn = keepLoggedIn args.accessLocation = accessLocation args.systemName = systemName args.certificate = certificate args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_loginWithIdentityCredential(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = loginWithIdentityCredential_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "loginWithIdentityCredential failed: unknown result") def loginWithIdentityCredentialForCertificate(self, identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate): """ Parameters: - identityProvider - identifier - password - keepLoggedIn - accessLocation - systemName - certificate """ self.send_loginWithIdentityCredentialForCertificate(identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate) return self.recv_loginWithIdentityCredentialForCertificate() def send_loginWithIdentityCredentialForCertificate(self, identityProvider, identifier, password, keepLoggedIn, accessLocation, systemName, certificate): self._oprot.writeMessageBegin('loginWithIdentityCredentialForCertificate', TMessageType.CALL, self._seqid) args = loginWithIdentityCredentialForCertificate_args() args.identityProvider = identityProvider args.identifier = identifier args.password = password args.keepLoggedIn = keepLoggedIn args.accessLocation = accessLocation args.systemName = systemName args.certificate = certificate args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_loginWithIdentityCredentialForCertificate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = loginWithIdentityCredentialForCertificate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "loginWithIdentityCredentialForCertificate failed: unknown result") def loginWithVerifier(self, verifier): """ Parameters: - verifier """ self.send_loginWithVerifier(verifier) return self.recv_loginWithVerifier() def send_loginWithVerifier(self, verifier): self._oprot.writeMessageBegin('loginWithVerifier', TMessageType.CALL, self._seqid) args = loginWithVerifier_args() args.verifier = verifier args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_loginWithVerifier(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = loginWithVerifier_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "loginWithVerifier failed: unknown result") def loginWithVerifierForCerificate(self, verifier): """ Parameters: - verifier """ self.send_loginWithVerifierForCerificate(verifier) return self.recv_loginWithVerifierForCerificate() def send_loginWithVerifierForCerificate(self, verifier): self._oprot.writeMessageBegin('loginWithVerifierForCerificate', TMessageType.CALL, self._seqid) args = loginWithVerifierForCerificate_args() args.verifier = verifier args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_loginWithVerifierForCerificate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = loginWithVerifierForCerificate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "loginWithVerifierForCerificate failed: unknown result") def loginWithVerifierForCertificate(self, verifier): """ Parameters: - verifier """ self.send_loginWithVerifierForCertificate(verifier) return self.recv_loginWithVerifierForCertificate() def send_loginWithVerifierForCertificate(self, verifier): self._oprot.writeMessageBegin('loginWithVerifierForCertificate', TMessageType.CALL, self._seqid) args = loginWithVerifierForCertificate_args() args.verifier = verifier args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_loginWithVerifierForCertificate(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = loginWithVerifierForCertificate_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "loginWithVerifierForCertificate failed: unknown result") def logout(self): self.send_logout() self.recv_logout() def send_logout(self): self._oprot.writeMessageBegin('logout', TMessageType.CALL, self._seqid) args = logout_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_logout(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = logout_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def logoutSession(self, tokenKey): """ Parameters: - tokenKey """ self.send_logoutSession(tokenKey) self.recv_logoutSession() def send_logoutSession(self, tokenKey): self._oprot.writeMessageBegin('logoutSession', TMessageType.CALL, self._seqid) args = logoutSession_args() args.tokenKey = tokenKey args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_logoutSession(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = logoutSession_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def noop(self): self.send_noop() self.recv_noop() def send_noop(self): self._oprot.writeMessageBegin('noop', TMessageType.CALL, self._seqid) args = noop_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_noop(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = noop_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def notifiedRedirect(self, paramMap): """ Parameters: - paramMap """ self.send_notifiedRedirect(paramMap) self.recv_notifiedRedirect() def send_notifiedRedirect(self, paramMap): self._oprot.writeMessageBegin('notifiedRedirect', TMessageType.CALL, self._seqid) args = notifiedRedirect_args() args.paramMap = paramMap args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_notifiedRedirect(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = notifiedRedirect_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def notifyBuddyOnAir(self, seq, receiverMids): """ Parameters: - seq - receiverMids """ self.send_notifyBuddyOnAir(seq, receiverMids) return self.recv_notifyBuddyOnAir() def send_notifyBuddyOnAir(self, seq, receiverMids): self._oprot.writeMessageBegin('notifyBuddyOnAir', TMessageType.CALL, self._seqid) args = notifyBuddyOnAir_args() args.seq = seq args.receiverMids = receiverMids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_notifyBuddyOnAir(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = notifyBuddyOnAir_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "notifyBuddyOnAir failed: unknown result") def notifyIndividualEvent(self, notificationStatus, receiverMids): """ Parameters: - notificationStatus - receiverMids """ self.send_notifyIndividualEvent(notificationStatus, receiverMids) self.recv_notifyIndividualEvent() def send_notifyIndividualEvent(self, notificationStatus, receiverMids): self._oprot.writeMessageBegin('notifyIndividualEvent', TMessageType.CALL, self._seqid) args = notifyIndividualEvent_args() args.notificationStatus = notificationStatus args.receiverMids = receiverMids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_notifyIndividualEvent(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = notifyIndividualEvent_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def notifyInstalled(self, udidHash, applicationTypeWithExtensions): """ Parameters: - udidHash - applicationTypeWithExtensions """ self.send_notifyInstalled(udidHash, applicationTypeWithExtensions) self.recv_notifyInstalled() def send_notifyInstalled(self, udidHash, applicationTypeWithExtensions): self._oprot.writeMessageBegin('notifyInstalled', TMessageType.CALL, self._seqid) args = notifyInstalled_args() args.udidHash = udidHash args.applicationTypeWithExtensions = applicationTypeWithExtensions args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_notifyInstalled(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = notifyInstalled_result() result.read(iprot) iprot.readMessageEnd() return def notifyRegistrationComplete(self, udidHash, applicationTypeWithExtensions): """ Parameters: - udidHash - applicationTypeWithExtensions """ self.send_notifyRegistrationComplete(udidHash, applicationTypeWithExtensions) self.recv_notifyRegistrationComplete() def send_notifyRegistrationComplete(self, udidHash, applicationTypeWithExtensions): self._oprot.writeMessageBegin('notifyRegistrationComplete', TMessageType.CALL, self._seqid) args = notifyRegistrationComplete_args() args.udidHash = udidHash args.applicationTypeWithExtensions = applicationTypeWithExtensions args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_notifyRegistrationComplete(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = notifyRegistrationComplete_result() result.read(iprot) iprot.readMessageEnd() return def notifySleep(self, lastRev, badge): """ Parameters: - lastRev - badge """ self.send_notifySleep(lastRev, badge) self.recv_notifySleep() def send_notifySleep(self, lastRev, badge): self._oprot.writeMessageBegin('notifySleep', TMessageType.CALL, self._seqid) args = notifySleep_args() args.lastRev = lastRev args.badge = badge args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_notifySleep(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = notifySleep_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def notifyUpdated(self, lastRev, deviceInfo): """ Parameters: - lastRev - deviceInfo """ self.send_notifyUpdated(lastRev, deviceInfo) self.recv_notifyUpdated() def send_notifyUpdated(self, lastRev, deviceInfo): self._oprot.writeMessageBegin('notifyUpdated', TMessageType.CALL, self._seqid) args = notifyUpdated_args() args.lastRev = lastRev args.deviceInfo = deviceInfo args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_notifyUpdated(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = notifyUpdated_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def openProximityMatch(self, location): """ Parameters: - location """ self.send_openProximityMatch(location) return self.recv_openProximityMatch() def send_openProximityMatch(self, location): self._oprot.writeMessageBegin('openProximityMatch', TMessageType.CALL, self._seqid) args = openProximityMatch_args() args.location = location args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_openProximityMatch(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = openProximityMatch_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "openProximityMatch failed: unknown result") def registerBuddyUser(self, buddyId, registrarPassword): """ Parameters: - buddyId - registrarPassword """ self.send_registerBuddyUser(buddyId, registrarPassword) return self.recv_registerBuddyUser() def send_registerBuddyUser(self, buddyId, registrarPassword): self._oprot.writeMessageBegin('registerBuddyUser', TMessageType.CALL, self._seqid) args = registerBuddyUser_args() args.buddyId = buddyId args.registrarPassword = registrarPassword args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerBuddyUser(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerBuddyUser_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerBuddyUser failed: unknown result") def registerBuddyUserid(self, seq, userid): """ Parameters: - seq - userid """ self.send_registerBuddyUserid(seq, userid) self.recv_registerBuddyUserid() def send_registerBuddyUserid(self, seq, userid): self._oprot.writeMessageBegin('registerBuddyUserid', TMessageType.CALL, self._seqid) args = registerBuddyUserid_args() args.seq = seq args.userid = userid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerBuddyUserid(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerBuddyUserid_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def registerDevice(self, sessionId): """ Parameters: - sessionId """ self.send_registerDevice(sessionId) return self.recv_registerDevice() def send_registerDevice(self, sessionId): self._oprot.writeMessageBegin('registerDevice', TMessageType.CALL, self._seqid) args = registerDevice_args() args.sessionId = sessionId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerDevice(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerDevice_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerDevice failed: unknown result") def registerDeviceWithIdentityCredential(self, sessionId, provider, identifier, verifier): """ Parameters: - sessionId - provider - identifier - verifier """ self.send_registerDeviceWithIdentityCredential(sessionId, provider, identifier, verifier) return self.recv_registerDeviceWithIdentityCredential() def send_registerDeviceWithIdentityCredential(self, sessionId, provider, identifier, verifier): self._oprot.writeMessageBegin('registerDeviceWithIdentityCredential', TMessageType.CALL, self._seqid) args = registerDeviceWithIdentityCredential_args() args.sessionId = sessionId args.provider = provider args.identifier = identifier args.verifier = verifier args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerDeviceWithIdentityCredential(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerDeviceWithIdentityCredential_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerDeviceWithIdentityCredential failed: unknown result") def registerDeviceWithoutPhoneNumber(self, region, udidHash, deviceInfo): """ Parameters: - region - udidHash - deviceInfo """ self.send_registerDeviceWithoutPhoneNumber(region, udidHash, deviceInfo) return self.recv_registerDeviceWithoutPhoneNumber() def send_registerDeviceWithoutPhoneNumber(self, region, udidHash, deviceInfo): self._oprot.writeMessageBegin('registerDeviceWithoutPhoneNumber', TMessageType.CALL, self._seqid) args = registerDeviceWithoutPhoneNumber_args() args.region = region args.udidHash = udidHash args.deviceInfo = deviceInfo args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerDeviceWithoutPhoneNumber(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerDeviceWithoutPhoneNumber_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerDeviceWithoutPhoneNumber failed: unknown result") def registerDeviceWithoutPhoneNumberWithIdentityCredential(self, region, udidHash, deviceInfo, provider, identifier, verifier, mid): """ Parameters: - region - udidHash - deviceInfo - provider - identifier - verifier - mid """ self.send_registerDeviceWithoutPhoneNumberWithIdentityCredential(region, udidHash, deviceInfo, provider, identifier, verifier, mid) return self.recv_registerDeviceWithoutPhoneNumberWithIdentityCredential() def send_registerDeviceWithoutPhoneNumberWithIdentityCredential(self, region, udidHash, deviceInfo, provider, identifier, verifier, mid): self._oprot.writeMessageBegin('registerDeviceWithoutPhoneNumberWithIdentityCredential', TMessageType.CALL, self._seqid) args = registerDeviceWithoutPhoneNumberWithIdentityCredential_args() args.region = region args.udidHash = udidHash args.deviceInfo = deviceInfo args.provider = provider args.identifier = identifier args.verifier = verifier args.mid = mid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerDeviceWithoutPhoneNumberWithIdentityCredential(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerDeviceWithoutPhoneNumberWithIdentityCredential_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerDeviceWithoutPhoneNumberWithIdentityCredential failed: unknown result") def registerUserid(self, reqSeq, userid): """ Parameters: - reqSeq - userid """ self.send_registerUserid(reqSeq, userid) return self.recv_registerUserid() def send_registerUserid(self, reqSeq, userid): self._oprot.writeMessageBegin('registerUserid', TMessageType.CALL, self._seqid) args = registerUserid_args() args.reqSeq = reqSeq args.userid = userid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerUserid(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerUserid_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerUserid failed: unknown result") def registerWapDevice(self, invitationHash, guidHash, email, deviceInfo): """ Parameters: - invitationHash - guidHash - email - deviceInfo """ self.send_registerWapDevice(invitationHash, guidHash, email, deviceInfo) return self.recv_registerWapDevice() def send_registerWapDevice(self, invitationHash, guidHash, email, deviceInfo): self._oprot.writeMessageBegin('registerWapDevice', TMessageType.CALL, self._seqid) args = registerWapDevice_args() args.invitationHash = invitationHash args.guidHash = guidHash args.email = email args.deviceInfo = deviceInfo args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerWapDevice(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerWapDevice_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerWapDevice failed: unknown result") def registerWithExistingSnsIdAndIdentityCredential(self, identityCredential, region, udidHash, deviceInfo): """ Parameters: - identityCredential - region - udidHash - deviceInfo """ self.send_registerWithExistingSnsIdAndIdentityCredential(identityCredential, region, udidHash, deviceInfo) return self.recv_registerWithExistingSnsIdAndIdentityCredential() def send_registerWithExistingSnsIdAndIdentityCredential(self, identityCredential, region, udidHash, deviceInfo): self._oprot.writeMessageBegin('registerWithExistingSnsIdAndIdentityCredential', TMessageType.CALL, self._seqid) args = registerWithExistingSnsIdAndIdentityCredential_args() args.identityCredential = identityCredential args.region = region args.udidHash = udidHash args.deviceInfo = deviceInfo args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerWithExistingSnsIdAndIdentityCredential(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerWithExistingSnsIdAndIdentityCredential_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerWithExistingSnsIdAndIdentityCredential failed: unknown result") def registerWithSnsId(self, snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid): """ Parameters: - snsIdType - snsAccessToken - region - udidHash - deviceInfo - mid """ self.send_registerWithSnsId(snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid) return self.recv_registerWithSnsId() def send_registerWithSnsId(self, snsIdType, snsAccessToken, region, udidHash, deviceInfo, mid): self._oprot.writeMessageBegin('registerWithSnsId', TMessageType.CALL, self._seqid) args = registerWithSnsId_args() args.snsIdType = snsIdType args.snsAccessToken = snsAccessToken args.region = region args.udidHash = udidHash args.deviceInfo = deviceInfo args.mid = mid args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerWithSnsId(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerWithSnsId_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerWithSnsId failed: unknown result") def registerWithSnsIdAndIdentityCredential(self, snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo): """ Parameters: - snsIdType - snsAccessToken - identityCredential - region - udidHash - deviceInfo """ self.send_registerWithSnsIdAndIdentityCredential(snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo) return self.recv_registerWithSnsIdAndIdentityCredential() def send_registerWithSnsIdAndIdentityCredential(self, snsIdType, snsAccessToken, identityCredential, region, udidHash, deviceInfo): self._oprot.writeMessageBegin('registerWithSnsIdAndIdentityCredential', TMessageType.CALL, self._seqid) args = registerWithSnsIdAndIdentityCredential_args() args.snsIdType = snsIdType args.snsAccessToken = snsAccessToken args.identityCredential = identityCredential args.region = region args.udidHash = udidHash args.deviceInfo = deviceInfo args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_registerWithSnsIdAndIdentityCredential(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = registerWithSnsIdAndIdentityCredential_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "registerWithSnsIdAndIdentityCredential failed: unknown result") def reissueDeviceCredential(self): self.send_reissueDeviceCredential() return self.recv_reissueDeviceCredential() def send_reissueDeviceCredential(self): self._oprot.writeMessageBegin('reissueDeviceCredential', TMessageType.CALL, self._seqid) args = reissueDeviceCredential_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_reissueDeviceCredential(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = reissueDeviceCredential_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "reissueDeviceCredential failed: unknown result") def reissueUserTicket(self, expirationTime, maxUseCount): """ Parameters: - expirationTime - maxUseCount """ self.send_reissueUserTicket(expirationTime, maxUseCount) return self.recv_reissueUserTicket() def send_reissueUserTicket(self, expirationTime, maxUseCount): self._oprot.writeMessageBegin('reissueUserTicket', TMessageType.CALL, self._seqid) args = reissueUserTicket_args() args.expirationTime = expirationTime args.maxUseCount = maxUseCount args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_reissueUserTicket(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = reissueUserTicket_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "reissueUserTicket failed: unknown result") def rejectGroupInvitation(self, reqSeq, groupId): """ Parameters: - reqSeq - groupId """ self.send_rejectGroupInvitation(reqSeq, groupId) self.recv_rejectGroupInvitation() def send_rejectGroupInvitation(self, reqSeq, groupId): self._oprot.writeMessageBegin('rejectGroupInvitation', TMessageType.CALL, self._seqid) args = rejectGroupInvitation_args() args.reqSeq = reqSeq args.groupId = groupId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_rejectGroupInvitation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = rejectGroupInvitation_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def releaseSession(self): self.send_releaseSession() self.recv_releaseSession() def send_releaseSession(self): self._oprot.writeMessageBegin('releaseSession', TMessageType.CALL, self._seqid) args = releaseSession_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_releaseSession(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = releaseSession_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def removeAllMessages(self, seq, lastMessageId): """ Parameters: - seq - lastMessageId """ self.send_removeAllMessages(seq, lastMessageId) self.recv_removeAllMessages() def send_removeAllMessages(self, seq, lastMessageId): self._oprot.writeMessageBegin('removeAllMessages', TMessageType.CALL, self._seqid) args = removeAllMessages_args() args.seq = seq args.lastMessageId = lastMessageId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_removeAllMessages(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = removeAllMessages_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def removeBuddyLocation(self, mid, index): """ Parameters: - mid - index """ self.send_removeBuddyLocation(mid, index) self.recv_removeBuddyLocation() def send_removeBuddyLocation(self, mid, index): self._oprot.writeMessageBegin('removeBuddyLocation', TMessageType.CALL, self._seqid) args = removeBuddyLocation_args() args.mid = mid args.index = index args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_removeBuddyLocation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = removeBuddyLocation_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def removeMessage(self, messageId): """ Parameters: - messageId """ self.send_removeMessage(messageId) return self.recv_removeMessage() def send_removeMessage(self, messageId): self._oprot.writeMessageBegin('removeMessage', TMessageType.CALL, self._seqid) args = removeMessage_args() args.messageId = messageId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_removeMessage(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = removeMessage_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "removeMessage failed: unknown result") def removeMessageFromMyHome(self, messageId): """ Parameters: - messageId """ self.send_removeMessageFromMyHome(messageId) return self.recv_removeMessageFromMyHome() def send_removeMessageFromMyHome(self, messageId): self._oprot.writeMessageBegin('removeMessageFromMyHome', TMessageType.CALL, self._seqid) args = removeMessageFromMyHome_args() args.messageId = messageId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_removeMessageFromMyHome(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = removeMessageFromMyHome_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "removeMessageFromMyHome failed: unknown result") def removeSnsId(self, snsIdType): """ Parameters: - snsIdType """ self.send_removeSnsId(snsIdType) return self.recv_removeSnsId() def send_removeSnsId(self, snsIdType): self._oprot.writeMessageBegin('removeSnsId', TMessageType.CALL, self._seqid) args = removeSnsId_args() args.snsIdType = snsIdType args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_removeSnsId(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = removeSnsId_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "removeSnsId failed: unknown result") def report(self, syncOpRevision, category, report): """ Parameters: - syncOpRevision - category - report """ self.send_report(syncOpRevision, category, report) self.recv_report() def send_report(self, syncOpRevision, category, report): self._oprot.writeMessageBegin('report', TMessageType.CALL, self._seqid) args = report_args() args.syncOpRevision = syncOpRevision args.category = category args.report = report args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_report(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = report_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def reportContacts(self, syncOpRevision, category, contactReports, actionType): """ Parameters: - syncOpRevision - category - contactReports - actionType """ self.send_reportContacts(syncOpRevision, category, contactReports, actionType) return self.recv_reportContacts() def send_reportContacts(self, syncOpRevision, category, contactReports, actionType): self._oprot.writeMessageBegin('reportContacts', TMessageType.CALL, self._seqid) args = reportContacts_args() args.syncOpRevision = syncOpRevision args.category = category args.contactReports = contactReports args.actionType = actionType args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_reportContacts(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = reportContacts_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "reportContacts failed: unknown result") def reportGroups(self, syncOpRevision, groups): """ Parameters: - syncOpRevision - groups """ self.send_reportGroups(syncOpRevision, groups) self.recv_reportGroups() def send_reportGroups(self, syncOpRevision, groups): self._oprot.writeMessageBegin('reportGroups', TMessageType.CALL, self._seqid) args = reportGroups_args() args.syncOpRevision = syncOpRevision args.groups = groups args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_reportGroups(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = reportGroups_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def reportProfile(self, syncOpRevision, profile): """ Parameters: - syncOpRevision - profile """ self.send_reportProfile(syncOpRevision, profile) self.recv_reportProfile() def send_reportProfile(self, syncOpRevision, profile): self._oprot.writeMessageBegin('reportProfile', TMessageType.CALL, self._seqid) args = reportProfile_args() args.syncOpRevision = syncOpRevision args.profile = profile args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_reportProfile(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = reportProfile_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def reportRooms(self, syncOpRevision, rooms): """ Parameters: - syncOpRevision - rooms """ self.send_reportRooms(syncOpRevision, rooms) self.recv_reportRooms() def send_reportRooms(self, syncOpRevision, rooms): self._oprot.writeMessageBegin('reportRooms', TMessageType.CALL, self._seqid) args = reportRooms_args() args.syncOpRevision = syncOpRevision args.rooms = rooms args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_reportRooms(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = reportRooms_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def reportSettings(self, syncOpRevision, settings): """ Parameters: - syncOpRevision - settings """ self.send_reportSettings(syncOpRevision, settings) self.recv_reportSettings() def send_reportSettings(self, syncOpRevision, settings): self._oprot.writeMessageBegin('reportSettings', TMessageType.CALL, self._seqid) args = reportSettings_args() args.syncOpRevision = syncOpRevision args.settings = settings args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_reportSettings(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = reportSettings_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def reportSpammer(self, spammerMid, spammerReasons, spamMessageIds): """ Parameters: - spammerMid - spammerReasons - spamMessageIds """ self.send_reportSpammer(spammerMid, spammerReasons, spamMessageIds) self.recv_reportSpammer() def send_reportSpammer(self, spammerMid, spammerReasons, spamMessageIds): self._oprot.writeMessageBegin('reportSpammer', TMessageType.CALL, self._seqid) args = reportSpammer_args() args.spammerMid = spammerMid args.spammerReasons = spammerReasons args.spamMessageIds = spamMessageIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_reportSpammer(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = reportSpammer_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def requestAccountPasswordReset(self, provider, identifier, locale): """ Parameters: - provider - identifier - locale """ self.send_requestAccountPasswordReset(provider, identifier, locale) self.recv_requestAccountPasswordReset() def send_requestAccountPasswordReset(self, provider, identifier, locale): self._oprot.writeMessageBegin('requestAccountPasswordReset', TMessageType.CALL, self._seqid) args = requestAccountPasswordReset_args() args.provider = provider args.identifier = identifier args.locale = locale args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_requestAccountPasswordReset(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = requestAccountPasswordReset_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def requestEmailConfirmation(self, emailConfirmation): """ Parameters: - emailConfirmation """ self.send_requestEmailConfirmation(emailConfirmation) return self.recv_requestEmailConfirmation() def send_requestEmailConfirmation(self, emailConfirmation): self._oprot.writeMessageBegin('requestEmailConfirmation', TMessageType.CALL, self._seqid) args = requestEmailConfirmation_args() args.emailConfirmation = emailConfirmation args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_requestEmailConfirmation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = requestEmailConfirmation_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "requestEmailConfirmation failed: unknown result") def requestIdentityUnbind(self, provider, identifier): """ Parameters: - provider - identifier """ self.send_requestIdentityUnbind(provider, identifier) self.recv_requestIdentityUnbind() def send_requestIdentityUnbind(self, provider, identifier): self._oprot.writeMessageBegin('requestIdentityUnbind', TMessageType.CALL, self._seqid) args = requestIdentityUnbind_args() args.provider = provider args.identifier = identifier args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_requestIdentityUnbind(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = requestIdentityUnbind_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def resendEmailConfirmation(self, verifier): """ Parameters: - verifier """ self.send_resendEmailConfirmation(verifier) return self.recv_resendEmailConfirmation() def send_resendEmailConfirmation(self, verifier): self._oprot.writeMessageBegin('resendEmailConfirmation', TMessageType.CALL, self._seqid) args = resendEmailConfirmation_args() args.verifier = verifier args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_resendEmailConfirmation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = resendEmailConfirmation_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "resendEmailConfirmation failed: unknown result") def resendPinCode(self, sessionId): """ Parameters: - sessionId """ self.send_resendPinCode(sessionId) self.recv_resendPinCode() def send_resendPinCode(self, sessionId): self._oprot.writeMessageBegin('resendPinCode', TMessageType.CALL, self._seqid) args = resendPinCode_args() args.sessionId = sessionId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_resendPinCode(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = resendPinCode_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def resendPinCodeBySMS(self, sessionId): """ Parameters: - sessionId """ self.send_resendPinCodeBySMS(sessionId) self.recv_resendPinCodeBySMS() def send_resendPinCodeBySMS(self, sessionId): self._oprot.writeMessageBegin('resendPinCodeBySMS', TMessageType.CALL, self._seqid) args = resendPinCodeBySMS_args() args.sessionId = sessionId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_resendPinCodeBySMS(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = resendPinCodeBySMS_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def sendChatChecked(self, seq, consumer, lastMessageId): """ Parameters: - seq - consumer - lastMessageId """ self.send_sendChatChecked(seq, consumer, lastMessageId) self.recv_sendChatChecked() def send_sendChatChecked(self, seq, consumer, lastMessageId): self._oprot.writeMessageBegin('sendChatChecked', TMessageType.CALL, self._seqid) args = sendChatChecked_args() args.seq = seq args.consumer = consumer args.lastMessageId = lastMessageId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendChatChecked(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendChatChecked_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def sendChatRemoved(self, seq, consumer, lastMessageId): """ Parameters: - seq - consumer - lastMessageId """ self.send_sendChatRemoved(seq, consumer, lastMessageId) self.recv_sendChatRemoved() def send_sendChatRemoved(self, seq, consumer, lastMessageId): self._oprot.writeMessageBegin('sendChatRemoved', TMessageType.CALL, self._seqid) args = sendChatRemoved_args() args.seq = seq args.consumer = consumer args.lastMessageId = lastMessageId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendChatRemoved(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendChatRemoved_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def sendContentPreviewUpdated(self, esq, messageId, receiverMids): """ Parameters: - esq - messageId - receiverMids """ self.send_sendContentPreviewUpdated(esq, messageId, receiverMids) return self.recv_sendContentPreviewUpdated() def send_sendContentPreviewUpdated(self, esq, messageId, receiverMids): self._oprot.writeMessageBegin('sendContentPreviewUpdated', TMessageType.CALL, self._seqid) args = sendContentPreviewUpdated_args() args.esq = esq args.messageId = messageId args.receiverMids = receiverMids args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendContentPreviewUpdated(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendContentPreviewUpdated_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "sendContentPreviewUpdated failed: unknown result") def sendContentReceipt(self, seq, consumer, messageId): """ Parameters: - seq - consumer - messageId """ self.send_sendContentReceipt(seq, consumer, messageId) self.recv_sendContentReceipt() def send_sendContentReceipt(self, seq, consumer, messageId): self._oprot.writeMessageBegin('sendContentReceipt', TMessageType.CALL, self._seqid) args = sendContentReceipt_args() args.seq = seq args.consumer = consumer args.messageId = messageId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendContentReceipt(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendContentReceipt_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def sendDummyPush(self): self.send_sendDummyPush() self.recv_sendDummyPush() def send_sendDummyPush(self): self._oprot.writeMessageBegin('sendDummyPush', TMessageType.CALL, self._seqid) args = sendDummyPush_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendDummyPush(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendDummyPush_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def sendEvent(self, seq, message): """ Parameters: - seq - message """ self.send_sendEvent(seq, message) return self.recv_sendEvent() def send_sendEvent(self, seq, message): self._oprot.writeMessageBegin('sendEvent', TMessageType.CALL, self._seqid) args = sendEvent_args() args.seq = seq args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendEvent(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendEvent_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "sendEvent failed: unknown result") def sendMessage(self, seq, message): """ Parameters: - seq - message """ self.send_sendMessage(seq, message) return self.recv_sendMessage() def send_sendMessage(self, seq, message): self._oprot.writeMessageBegin('sendMessage', TMessageType.CALL, self._seqid) args = sendMessage_args() args.seq = seq args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendMessage(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendMessage_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "sendMessage failed: unknown result") def sendMessageIgnored(self, seq, consumer, messageIds): """ Parameters: - seq - consumer - messageIds """ self.send_sendMessageIgnored(seq, consumer, messageIds) self.recv_sendMessageIgnored() def send_sendMessageIgnored(self, seq, consumer, messageIds): self._oprot.writeMessageBegin('sendMessageIgnored', TMessageType.CALL, self._seqid) args = sendMessageIgnored_args() args.seq = seq args.consumer = consumer args.messageIds = messageIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendMessageIgnored(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendMessageIgnored_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def sendMessageReceipt(self, seq, consumer, messageIds): """ Parameters: - seq - consumer - messageIds """ self.send_sendMessageReceipt(seq, consumer, messageIds) self.recv_sendMessageReceipt() def send_sendMessageReceipt(self, seq, consumer, messageIds): self._oprot.writeMessageBegin('sendMessageReceipt', TMessageType.CALL, self._seqid) args = sendMessageReceipt_args() args.seq = seq args.consumer = consumer args.messageIds = messageIds args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendMessageReceipt(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendMessageReceipt_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def sendMessageToMyHome(self, seq, message): """ Parameters: - seq - message """ self.send_sendMessageToMyHome(seq, message) return self.recv_sendMessageToMyHome() def send_sendMessageToMyHome(self, seq, message): self._oprot.writeMessageBegin('sendMessageToMyHome', TMessageType.CALL, self._seqid) args = sendMessageToMyHome_args() args.seq = seq args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_sendMessageToMyHome(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = sendMessageToMyHome_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "sendMessageToMyHome failed: unknown result") def setBuddyLocation(self, mid, index, location): """ Parameters: - mid - index - location """ self.send_setBuddyLocation(mid, index, location) self.recv_setBuddyLocation() def send_setBuddyLocation(self, mid, index, location): self._oprot.writeMessageBegin('setBuddyLocation', TMessageType.CALL, self._seqid) args = setBuddyLocation_args() args.mid = mid args.index = index args.location = location args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_setBuddyLocation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = setBuddyLocation_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def setIdentityCredential(self, provider, identifier, verifier): """ Parameters: - provider - identifier - verifier """ self.send_setIdentityCredential(provider, identifier, verifier) self.recv_setIdentityCredential() def send_setIdentityCredential(self, provider, identifier, verifier): self._oprot.writeMessageBegin('setIdentityCredential', TMessageType.CALL, self._seqid) args = setIdentityCredential_args() args.provider = provider args.identifier = identifier args.verifier = verifier args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_setIdentityCredential(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = setIdentityCredential_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def setNotificationsEnabled(self, reqSeq, type, target, enablement): """ Parameters: - reqSeq - type - target - enablement """ self.send_setNotificationsEnabled(reqSeq, type, target, enablement) self.recv_setNotificationsEnabled() def send_setNotificationsEnabled(self, reqSeq, type, target, enablement): self._oprot.writeMessageBegin('setNotificationsEnabled', TMessageType.CALL, self._seqid) args = setNotificationsEnabled_args() args.reqSeq = reqSeq args.type = type args.target = target args.enablement = enablement args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_setNotificationsEnabled(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = setNotificationsEnabled_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def startUpdateVerification(self, region, carrier, phone, udidHash, deviceInfo, networkCode, locale): """ Parameters: - region - carrier - phone - udidHash - deviceInfo - networkCode - locale """ self.send_startUpdateVerification(region, carrier, phone, udidHash, deviceInfo, networkCode, locale) return self.recv_startUpdateVerification() def send_startUpdateVerification(self, region, carrier, phone, udidHash, deviceInfo, networkCode, locale): self._oprot.writeMessageBegin('startUpdateVerification', TMessageType.CALL, self._seqid) args = startUpdateVerification_args() args.region = region args.carrier = carrier args.phone = phone args.udidHash = udidHash args.deviceInfo = deviceInfo args.networkCode = networkCode args.locale = locale args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_startUpdateVerification(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = startUpdateVerification_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "startUpdateVerification failed: unknown result") def startVerification(self, region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale): """ Parameters: - region - carrier - phone - udidHash - deviceInfo - networkCode - mid - locale """ self.send_startVerification(region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale) return self.recv_startVerification() def send_startVerification(self, region, carrier, phone, udidHash, deviceInfo, networkCode, mid, locale): self._oprot.writeMessageBegin('startVerification', TMessageType.CALL, self._seqid) args = startVerification_args() args.region = region args.carrier = carrier args.phone = phone args.udidHash = udidHash args.deviceInfo = deviceInfo args.networkCode = networkCode args.mid = mid args.locale = locale args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_startVerification(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = startVerification_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "startVerification failed: unknown result") def storeUpdateProfileAttribute(self, seq, profileAttribute, value): """ Parameters: - seq - profileAttribute - value """ self.send_storeUpdateProfileAttribute(seq, profileAttribute, value) self.recv_storeUpdateProfileAttribute() def send_storeUpdateProfileAttribute(self, seq, profileAttribute, value): self._oprot.writeMessageBegin('storeUpdateProfileAttribute', TMessageType.CALL, self._seqid) args = storeUpdateProfileAttribute_args() args.seq = seq args.profileAttribute = profileAttribute args.value = value args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_storeUpdateProfileAttribute(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = storeUpdateProfileAttribute_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def syncContactBySnsIds(self, reqSeq, modifications): """ Parameters: - reqSeq - modifications """ self.send_syncContactBySnsIds(reqSeq, modifications) return self.recv_syncContactBySnsIds() def send_syncContactBySnsIds(self, reqSeq, modifications): self._oprot.writeMessageBegin('syncContactBySnsIds', TMessageType.CALL, self._seqid) args = syncContactBySnsIds_args() args.reqSeq = reqSeq args.modifications = modifications args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_syncContactBySnsIds(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = syncContactBySnsIds_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "syncContactBySnsIds failed: unknown result") def syncContacts(self, reqSeq, localContacts): """ Parameters: - reqSeq - localContacts """ self.send_syncContacts(reqSeq, localContacts) return self.recv_syncContacts() def send_syncContacts(self, reqSeq, localContacts): self._oprot.writeMessageBegin('syncContacts', TMessageType.CALL, self._seqid) args = syncContacts_args() args.reqSeq = reqSeq args.localContacts = localContacts args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_syncContacts(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = syncContacts_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "syncContacts failed: unknown result") def trySendMessage(self, seq, message): """ Parameters: - seq - message """ self.send_trySendMessage(seq, message) return self.recv_trySendMessage() def send_trySendMessage(self, seq, message): self._oprot.writeMessageBegin('trySendMessage', TMessageType.CALL, self._seqid) args = trySendMessage_args() args.seq = seq args.message = message args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_trySendMessage(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = trySendMessage_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "trySendMessage failed: unknown result") def unblockContact(self, reqSeq, id): """ Parameters: - reqSeq - id """ self.send_unblockContact(reqSeq, id) self.recv_unblockContact() def send_unblockContact(self, reqSeq, id): self._oprot.writeMessageBegin('unblockContact', TMessageType.CALL, self._seqid) args = unblockContact_args() args.reqSeq = reqSeq args.id = id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_unblockContact(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = unblockContact_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def unblockRecommendation(self, reqSeq, id): """ Parameters: - reqSeq - id """ self.send_unblockRecommendation(reqSeq, id) self.recv_unblockRecommendation() def send_unblockRecommendation(self, reqSeq, id): self._oprot.writeMessageBegin('unblockRecommendation', TMessageType.CALL, self._seqid) args = unblockRecommendation_args() args.reqSeq = reqSeq args.id = id args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_unblockRecommendation(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = unblockRecommendation_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def unregisterUserAndDevice(self): self.send_unregisterUserAndDevice() return self.recv_unregisterUserAndDevice() def send_unregisterUserAndDevice(self): self._oprot.writeMessageBegin('unregisterUserAndDevice', TMessageType.CALL, self._seqid) args = unregisterUserAndDevice_args() args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_unregisterUserAndDevice(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = unregisterUserAndDevice_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "unregisterUserAndDevice failed: unknown result") def updateApnsDeviceToken(self, apnsDeviceToken): """ Parameters: - apnsDeviceToken """ self.send_updateApnsDeviceToken(apnsDeviceToken) self.recv_updateApnsDeviceToken() def send_updateApnsDeviceToken(self, apnsDeviceToken): self._oprot.writeMessageBegin('updateApnsDeviceToken', TMessageType.CALL, self._seqid) args = updateApnsDeviceToken_args() args.apnsDeviceToken = apnsDeviceToken args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateApnsDeviceToken(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateApnsDeviceToken_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateBuddySetting(self, key, value): """ Parameters: - key - value """ self.send_updateBuddySetting(key, value) self.recv_updateBuddySetting() def send_updateBuddySetting(self, key, value): self._oprot.writeMessageBegin('updateBuddySetting', TMessageType.CALL, self._seqid) args = updateBuddySetting_args() args.key = key args.value = value args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateBuddySetting(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateBuddySetting_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateC2DMRegistrationId(self, registrationId): """ Parameters: - registrationId """ self.send_updateC2DMRegistrationId(registrationId) self.recv_updateC2DMRegistrationId() def send_updateC2DMRegistrationId(self, registrationId): self._oprot.writeMessageBegin('updateC2DMRegistrationId', TMessageType.CALL, self._seqid) args = updateC2DMRegistrationId_args() args.registrationId = registrationId args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateC2DMRegistrationId(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateC2DMRegistrationId_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateContactSetting(self, reqSeq, mid, flag, value): """ Parameters: - reqSeq - mid - flag - value """ self.send_updateContactSetting(reqSeq, mid, flag, value) self.recv_updateContactSetting() def send_updateContactSetting(self, reqSeq, mid, flag, value): self._oprot.writeMessageBegin('updateContactSetting', TMessageType.CALL, self._seqid) args = updateContactSetting_args() args.reqSeq = reqSeq args.mid = mid args.flag = flag args.value = value args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateContactSetting(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateContactSetting_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateCustomModeSettings(self, customMode, paramMap): """ Parameters: - customMode - paramMap """ self.send_updateCustomModeSettings(customMode, paramMap) self.recv_updateCustomModeSettings() def send_updateCustomModeSettings(self, customMode, paramMap): self._oprot.writeMessageBegin('updateCustomModeSettings', TMessageType.CALL, self._seqid) args = updateCustomModeSettings_args() args.customMode = customMode args.paramMap = paramMap args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateCustomModeSettings(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateCustomModeSettings_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateDeviceInfo(self, deviceUid, deviceInfo): """ Parameters: - deviceUid - deviceInfo """ self.send_updateDeviceInfo(deviceUid, deviceInfo) self.recv_updateDeviceInfo() def send_updateDeviceInfo(self, deviceUid, deviceInfo): self._oprot.writeMessageBegin('updateDeviceInfo', TMessageType.CALL, self._seqid) args = updateDeviceInfo_args() args.deviceUid = deviceUid args.deviceInfo = deviceInfo args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateDeviceInfo(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateDeviceInfo_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateGroup(self, reqSeq, group): """ Parameters: - reqSeq - group """ self.send_updateGroup(reqSeq, group) self.recv_updateGroup() def send_updateGroup(self, reqSeq, group): self._oprot.writeMessageBegin('updateGroup', TMessageType.CALL, self._seqid) args = updateGroup_args() args.reqSeq = reqSeq args.group = group args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateGroup(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateGroup_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateNotificationToken(self, type, token): """ Parameters: - type - token """ self.send_updateNotificationToken(type, token) self.recv_updateNotificationToken() def send_updateNotificationToken(self, type, token): self._oprot.writeMessageBegin('updateNotificationToken', TMessageType.CALL, self._seqid) args = updateNotificationToken_args() args.type = type args.token = token args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateNotificationToken(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateNotificationToken_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateNotificationTokenWithBytes(self, type, token): """ Parameters: - type - token """ self.send_updateNotificationTokenWithBytes(type, token) self.recv_updateNotificationTokenWithBytes() def send_updateNotificationTokenWithBytes(self, type, token): self._oprot.writeMessageBegin('updateNotificationTokenWithBytes', TMessageType.CALL, self._seqid) args = updateNotificationTokenWithBytes_args() args.type = type args.token = token args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateNotificationTokenWithBytes(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateNotificationTokenWithBytes_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateProfile(self, reqSeq, profile): """ Parameters: - reqSeq - profile """ self.send_updateProfile(reqSeq, profile) self.recv_updateProfile() def send_updateProfile(self, reqSeq, profile): self._oprot.writeMessageBegin('updateProfile', TMessageType.CALL, self._seqid) args = updateProfile_args() args.reqSeq = reqSeq args.profile = profile args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateProfile(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateProfile_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateProfileAttribute(self, reqSeq, attr, value): """ Parameters: - reqSeq - attr - value """ self.send_updateProfileAttribute(reqSeq, attr, value) self.recv_updateProfileAttribute() def send_updateProfileAttribute(self, reqSeq, attr, value): self._oprot.writeMessageBegin('updateProfileAttribute', TMessageType.CALL, self._seqid) args = updateProfileAttribute_args() args.reqSeq = reqSeq args.attr = attr args.value = value args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateProfileAttribute(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateProfileAttribute_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateRegion(self, region): """ Parameters: - region """ self.send_updateRegion(region) self.recv_updateRegion() def send_updateRegion(self, region): self._oprot.writeMessageBegin('updateRegion', TMessageType.CALL, self._seqid) args = updateRegion_args() args.region = region args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateRegion(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateRegion_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateSettings(self, reqSeq, settings): """ Parameters: - reqSeq - settings """ self.send_updateSettings(reqSeq, settings) self.recv_updateSettings() def send_updateSettings(self, reqSeq, settings): self._oprot.writeMessageBegin('updateSettings', TMessageType.CALL, self._seqid) args = updateSettings_args() args.reqSeq = reqSeq args.settings = settings args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateSettings(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateSettings_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateSettings2(self, reqSeq, settings): """ Parameters: - reqSeq - settings """ self.send_updateSettings2(reqSeq, settings) return self.recv_updateSettings2() def send_updateSettings2(self, reqSeq, settings): self._oprot.writeMessageBegin('updateSettings2', TMessageType.CALL, self._seqid) args = updateSettings2_args() args.reqSeq = reqSeq args.settings = settings args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateSettings2(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateSettings2_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "updateSettings2 failed: unknown result") def updateSettingsAttribute(self, reqSeq, attr, value): """ Parameters: - reqSeq - attr - value """ self.send_updateSettingsAttribute(reqSeq, attr, value) self.recv_updateSettingsAttribute() def send_updateSettingsAttribute(self, reqSeq, attr, value): self._oprot.writeMessageBegin('updateSettingsAttribute', TMessageType.CALL, self._seqid) args = updateSettingsAttribute_args() args.reqSeq = reqSeq args.attr = attr args.value = value args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateSettingsAttribute(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateSettingsAttribute_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def updateSettingsAttributes(self, reqSeq, attrBitset, settings): """ Parameters: - reqSeq - attrBitset - settings """ self.send_updateSettingsAttributes(reqSeq, attrBitset, settings) return self.recv_updateSettingsAttributes() def send_updateSettingsAttributes(self, reqSeq, attrBitset, settings): self._oprot.writeMessageBegin('updateSettingsAttributes', TMessageType.CALL, self._seqid) args = updateSettingsAttributes_args() args.reqSeq = reqSeq args.attrBitset = attrBitset args.settings = settings args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_updateSettingsAttributes(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = updateSettingsAttributes_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "updateSettingsAttributes failed: unknown result") def verifyIdentityCredential(self, identityProvider, identifier, password): """ Parameters: - identityProvider - identifier - password """ self.send_verifyIdentityCredential(identityProvider, identifier, password) self.recv_verifyIdentityCredential() def send_verifyIdentityCredential(self, identityProvider, identifier, password): self._oprot.writeMessageBegin('verifyIdentityCredential', TMessageType.CALL, self._seqid) args = verifyIdentityCredential_args() args.identityProvider = identityProvider args.identifier = identifier args.password = password args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_verifyIdentityCredential(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = verifyIdentityCredential_result() result.read(iprot) iprot.readMessageEnd() if result.e is not None: raise result.e return def verifyIdentityCredentialWithResult(self, identityCredential): """ Parameters: - identityCredential """ self.send_verifyIdentityCredentialWithResult(identityCredential) return self.recv_verifyIdentityCredentialWithResult() def send_verifyIdentityCredentialWithResult(self, identityCredential): self._oprot.writeMessageBegin('verifyIdentityCredentialWithResult', TMessageType.CALL, self._seqid) args = verifyIdentityCredentialWithResult_args() args.identityCredential = identityCredential args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_verifyIdentityCredentialWithResult(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = verifyIdentityCredentialWithResult_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "verifyIdentityCredentialWithResult failed: unknown result") def verifyPhone(self, sessionId, pinCode, udidHash): """ Parameters: - sessionId - pinCode - udidHash """ self.send_verifyPhone(sessionId, pinCode, udidHash) return self.recv_verifyPhone() def send_verifyPhone(self, sessionId, pinCode, udidHash): self._oprot.writeMessageBegin('verifyPhone', TMessageType.CALL, self._seqid) args = verifyPhone_args() args.sessionId = sessionId args.pinCode = pinCode args.udidHash = udidHash args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_verifyPhone(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = verifyPhone_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "verifyPhone failed: unknown result") def verifyQrcode(self, verifier, pinCode): """ Parameters: - verifier - pinCode """ self.send_verifyQrcode(verifier, pinCode) return self.recv_verifyQrcode() def send_verifyQrcode(self, verifier, pinCode): self._oprot.writeMessageBegin('verifyQrcode', TMessageType.CALL, self._seqid) args = verifyQrcode_args() args.verifier = verifier args.pinCode = pinCode args.write(self._oprot) self._oprot.writeMessageEnd() self._oprot.trans.flush() def recv_verifyQrcode(self): iprot = self._iprot (fname, mtype, rseqid) = iprot.readMessageBegin() if mtype == TMessageType.EXCEPTION: x = TApplicationException() x.read(iprot) iprot.readMessageEnd() raise x result = verifyQrcode_result() result.read(iprot) iprot.readMessageEnd() if result.success is not None: return result.success if result.e is not None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "verifyQrcode failed: unknown result") class Processor(Iface, TProcessor): def __init__(self, handler): self._handler = handler self._processMap = {} self._processMap["acceptGroupInvitation"] = Processor.process_acceptGroupInvitation self._processMap["acceptGroupInvitationByTicket"] = Processor.process_acceptGroupInvitationByTicket self._processMap["acceptProximityMatches"] = Processor.process_acceptProximityMatches self._processMap["acquireCallRoute"] = Processor.process_acquireCallRoute self._processMap["acquireCallTicket"] = Processor.process_acquireCallTicket self._processMap["acquireEncryptedAccessToken"] = Processor.process_acquireEncryptedAccessToken self._processMap["addSnsId"] = Processor.process_addSnsId self._processMap["blockContact"] = Processor.process_blockContact self._processMap["blockRecommendation"] = Processor.process_blockRecommendation self._processMap["cancelGroupInvitation"] = Processor.process_cancelGroupInvitation self._processMap["changeVerificationMethod"] = Processor.process_changeVerificationMethod self._processMap["clearIdentityCredential"] = Processor.process_clearIdentityCredential self._processMap["clearMessageBox"] = Processor.process_clearMessageBox self._processMap["closeProximityMatch"] = Processor.process_closeProximityMatch self._processMap["commitSendMessage"] = Processor.process_commitSendMessage self._processMap["commitSendMessages"] = Processor.process_commitSendMessages self._processMap["commitUpdateProfile"] = Processor.process_commitUpdateProfile self._processMap["confirmEmail"] = Processor.process_confirmEmail self._processMap["createGroup"] = Processor.process_createGroup self._processMap["createQrcodeBase64Image"] = Processor.process_createQrcodeBase64Image self._processMap["createRoom"] = Processor.process_createRoom self._processMap["createSession"] = Processor.process_createSession self._processMap["fetchAnnouncements"] = Processor.process_fetchAnnouncements self._processMap["fetchMessages"] = Processor.process_fetchMessages self._processMap["fetchOperations"] = Processor.process_fetchOperations self._processMap["fetchOps"] = Processor.process_fetchOps self._processMap["findAndAddContactsByEmail"] = Processor.process_findAndAddContactsByEmail self._processMap["findAndAddContactsByMid"] = Processor.process_findAndAddContactsByMid self._processMap["findAndAddContactsByPhone"] = Processor.process_findAndAddContactsByPhone self._processMap["findAndAddContactsByUserid"] = Processor.process_findAndAddContactsByUserid self._processMap["findContactByUserid"] = Processor.process_findContactByUserid self._processMap["findContactByUserTicket"] = Processor.process_findContactByUserTicket self._processMap["findContactsByEmail"] = Processor.process_findContactsByEmail self._processMap["findContactsByPhone"] = Processor.process_findContactsByPhone self._processMap["findSnsIdUserStatus"] = Processor.process_findSnsIdUserStatus self._processMap["finishUpdateVerification"] = Processor.process_finishUpdateVerification self._processMap["generateUserTicket"] = Processor.process_generateUserTicket self._processMap["getAcceptedProximityMatches"] = Processor.process_getAcceptedProximityMatches self._processMap["getActiveBuddySubscriberIds"] = Processor.process_getActiveBuddySubscriberIds self._processMap["getAllContactIds"] = Processor.process_getAllContactIds self._processMap["getAuthQrcode"] = Processor.process_getAuthQrcode self._processMap["getBlockedContactIds"] = Processor.process_getBlockedContactIds self._processMap["getBlockedContactIdsByRange"] = Processor.process_getBlockedContactIdsByRange self._processMap["getBlockedRecommendationIds"] = Processor.process_getBlockedRecommendationIds self._processMap["getBuddyBlockerIds"] = Processor.process_getBuddyBlockerIds self._processMap["getBuddyLocation"] = Processor.process_getBuddyLocation self._processMap["getCompactContactsModifiedSince"] = Processor.process_getCompactContactsModifiedSince self._processMap["getCompactGroup"] = Processor.process_getCompactGroup self._processMap["getCompactRoom"] = Processor.process_getCompactRoom self._processMap["getContact"] = Processor.process_getContact self._processMap["getContacts"] = Processor.process_getContacts self._processMap["getCountryWithRequestIp"] = Processor.process_getCountryWithRequestIp self._processMap["getFavoriteMids"] = Processor.process_getFavoriteMids self._processMap["getGroup"] = Processor.process_getGroup self._processMap["getGroupIdsInvited"] = Processor.process_getGroupIdsInvited self._processMap["getGroupIdsJoined"] = Processor.process_getGroupIdsJoined self._processMap["getGroups"] = Processor.process_getGroups self._processMap["getHiddenContactMids"] = Processor.process_getHiddenContactMids self._processMap["getIdentityIdentifier"] = Processor.process_getIdentityIdentifier self._processMap["getLastAnnouncementIndex"] = Processor.process_getLastAnnouncementIndex self._processMap["getLastOpRevision"] = Processor.process_getLastOpRevision self._processMap["getMessageBox"] = Processor.process_getMessageBox self._processMap["getMessageBoxCompactWrapUp"] = Processor.process_getMessageBoxCompactWrapUp self._processMap["getMessageBoxCompactWrapUpList"] = Processor.process_getMessageBoxCompactWrapUpList self._processMap["getMessageBoxList"] = Processor.process_getMessageBoxList self._processMap["getMessageBoxListByStatus"] = Processor.process_getMessageBoxListByStatus self._processMap["getMessageBoxWrapUp"] = Processor.process_getMessageBoxWrapUp self._processMap["getMessageBoxWrapUpList"] = Processor.process_getMessageBoxWrapUpList self._processMap["getMessagesBySequenceNumber"] = Processor.process_getMessagesBySequenceNumber self._processMap["getNextMessages"] = Processor.process_getNextMessages self._processMap["getNotificationPolicy"] = Processor.process_getNotificationPolicy self._processMap["getPreviousMessages"] = Processor.process_getPreviousMessages self._processMap["getProfile"] = Processor.process_getProfile self._processMap["getProximityMatchCandidateList"] = Processor.process_getProximityMatchCandidateList self._processMap["getProximityMatchCandidates"] = Processor.process_getProximityMatchCandidates self._processMap["getRecentMessages"] = Processor.process_getRecentMessages self._processMap["getRecommendationIds"] = Processor.process_getRecommendationIds self._processMap["getRoom"] = Processor.process_getRoom self._processMap["getRSAKeyInfo"] = Processor.process_getRSAKeyInfo self._processMap["getServerTime"] = Processor.process_getServerTime self._processMap["getSessions"] = Processor.process_getSessions self._processMap["getSettings"] = Processor.process_getSettings self._processMap["getSettingsAttributes"] = Processor.process_getSettingsAttributes self._processMap["getSystemConfiguration"] = Processor.process_getSystemConfiguration self._processMap["getUserTicket"] = Processor.process_getUserTicket self._processMap["getWapInvitation"] = Processor.process_getWapInvitation self._processMap["invalidateUserTicket"] = Processor.process_invalidateUserTicket self._processMap["inviteFriendsBySms"] = Processor.process_inviteFriendsBySms self._processMap["inviteIntoGroup"] = Processor.process_inviteIntoGroup self._processMap["inviteIntoRoom"] = Processor.process_inviteIntoRoom self._processMap["inviteViaEmail"] = Processor.process_inviteViaEmail self._processMap["isIdentityIdentifierAvailable"] = Processor.process_isIdentityIdentifierAvailable self._processMap["isUseridAvailable"] = Processor.process_isUseridAvailable self._processMap["kickoutFromGroup"] = Processor.process_kickoutFromGroup self._processMap["reissueGroupTicket"] = Processor.process_reissueGroupTicket self._processMap["findGroupByTicket"] = Processor.process_findGroupByTicket self._processMap["leaveGroup"] = Processor.process_leaveGroup self._processMap["leaveRoom"] = Processor.process_leaveRoom self._processMap["loginWithIdentityCredential"] = Processor.process_loginWithIdentityCredential self._processMap["loginWithIdentityCredentialForCertificate"] = Processor.process_loginWithIdentityCredentialForCertificate self._processMap["loginWithVerifier"] = Processor.process_loginWithVerifier self._processMap["loginWithVerifierForCerificate"] = Processor.process_loginWithVerifierForCerificate self._processMap["loginWithVerifierForCertificate"] = Processor.process_loginWithVerifierForCertificate self._processMap["logout"] = Processor.process_logout self._processMap["logoutSession"] = Processor.process_logoutSession self._processMap["noop"] = Processor.process_noop self._processMap["notifiedRedirect"] = Processor.process_notifiedRedirect self._processMap["notifyBuddyOnAir"] = Processor.process_notifyBuddyOnAir self._processMap["notifyIndividualEvent"] = Processor.process_notifyIndividualEvent self._processMap["notifyInstalled"] = Processor.process_notifyInstalled self._processMap["notifyRegistrationComplete"] = Processor.process_notifyRegistrationComplete self._processMap["notifySleep"] = Processor.process_notifySleep self._processMap["notifyUpdated"] = Processor.process_notifyUpdated self._processMap["openProximityMatch"] = Processor.process_openProximityMatch self._processMap["registerBuddyUser"] = Processor.process_registerBuddyUser self._processMap["registerBuddyUserid"] = Processor.process_registerBuddyUserid self._processMap["registerDevice"] = Processor.process_registerDevice self._processMap["registerDeviceWithIdentityCredential"] = Processor.process_registerDeviceWithIdentityCredential self._processMap["registerDeviceWithoutPhoneNumber"] = Processor.process_registerDeviceWithoutPhoneNumber self._processMap["registerDeviceWithoutPhoneNumberWithIdentityCredential"] = Processor.process_registerDeviceWithoutPhoneNumberWithIdentityCredential self._processMap["registerUserid"] = Processor.process_registerUserid self._processMap["registerWapDevice"] = Processor.process_registerWapDevice self._processMap["registerWithExistingSnsIdAndIdentityCredential"] = Processor.process_registerWithExistingSnsIdAndIdentityCredential self._processMap["registerWithSnsId"] = Processor.process_registerWithSnsId self._processMap["registerWithSnsIdAndIdentityCredential"] = Processor.process_registerWithSnsIdAndIdentityCredential self._processMap["reissueDeviceCredential"] = Processor.process_reissueDeviceCredential self._processMap["reissueUserTicket"] = Processor.process_reissueUserTicket self._processMap["rejectGroupInvitation"] = Processor.process_rejectGroupInvitation self._processMap["releaseSession"] = Processor.process_releaseSession self._processMap["removeAllMessages"] = Processor.process_removeAllMessages self._processMap["removeBuddyLocation"] = Processor.process_removeBuddyLocation self._processMap["removeMessage"] = Processor.process_removeMessage self._processMap["removeMessageFromMyHome"] = Processor.process_removeMessageFromMyHome self._processMap["removeSnsId"] = Processor.process_removeSnsId self._processMap["report"] = Processor.process_report self._processMap["reportContacts"] = Processor.process_reportContacts self._processMap["reportGroups"] = Processor.process_reportGroups self._processMap["reportProfile"] = Processor.process_reportProfile self._processMap["reportRooms"] = Processor.process_reportRooms self._processMap["reportSettings"] = Processor.process_reportSettings self._processMap["reportSpammer"] = Processor.process_reportSpammer self._processMap["requestAccountPasswordReset"] = Processor.process_requestAccountPasswordReset self._processMap["requestEmailConfirmation"] = Processor.process_requestEmailConfirmation self._processMap["requestIdentityUnbind"] = Processor.process_requestIdentityUnbind self._processMap["resendEmailConfirmation"] = Processor.process_resendEmailConfirmation self._processMap["resendPinCode"] = Processor.process_resendPinCode self._processMap["resendPinCodeBySMS"] = Processor.process_resendPinCodeBySMS self._processMap["sendChatChecked"] = Processor.process_sendChatChecked self._processMap["sendChatRemoved"] = Processor.process_sendChatRemoved self._processMap["sendContentPreviewUpdated"] = Processor.process_sendContentPreviewUpdated self._processMap["sendContentReceipt"] = Processor.process_sendContentReceipt self._processMap["sendDummyPush"] = Processor.process_sendDummyPush self._processMap["sendEvent"] = Processor.process_sendEvent self._processMap["sendMessage"] = Processor.process_sendMessage self._processMap["sendMessageIgnored"] = Processor.process_sendMessageIgnored self._processMap["sendMessageReceipt"] = Processor.process_sendMessageReceipt self._processMap["sendMessageToMyHome"] = Processor.process_sendMessageToMyHome self._processMap["setBuddyLocation"] = Processor.process_setBuddyLocation self._processMap["setIdentityCredential"] = Processor.process_setIdentityCredential self._processMap["setNotificationsEnabled"] = Processor.process_setNotificationsEnabled self._processMap["startUpdateVerification"] = Processor.process_startUpdateVerification self._processMap["startVerification"] = Processor.process_startVerification self._processMap["storeUpdateProfileAttribute"] = Processor.process_storeUpdateProfileAttribute self._processMap["syncContactBySnsIds"] = Processor.process_syncContactBySnsIds self._processMap["syncContacts"] = Processor.process_syncContacts self._processMap["trySendMessage"] = Processor.process_trySendMessage self._processMap["unblockContact"] = Processor.process_unblockContact self._processMap["unblockRecommendation"] = Processor.process_unblockRecommendation self._processMap["unregisterUserAndDevice"] = Processor.process_unregisterUserAndDevice self._processMap["updateApnsDeviceToken"] = Processor.process_updateApnsDeviceToken self._processMap["updateBuddySetting"] = Processor.process_updateBuddySetting self._processMap["updateC2DMRegistrationId"] = Processor.process_updateC2DMRegistrationId self._processMap["updateContactSetting"] = Processor.process_updateContactSetting self._processMap["updateCustomModeSettings"] = Processor.process_updateCustomModeSettings self._processMap["updateDeviceInfo"] = Processor.process_updateDeviceInfo self._processMap["updateGroup"] = Processor.process_updateGroup self._processMap["updateNotificationToken"] = Processor.process_updateNotificationToken self._processMap["updateNotificationTokenWithBytes"] = Processor.process_updateNotificationTokenWithBytes self._processMap["updateProfile"] = Processor.process_updateProfile self._processMap["updateProfileAttribute"] = Processor.process_updateProfileAttribute self._processMap["updateRegion"] = Processor.process_updateRegion self._processMap["updateSettings"] = Processor.process_updateSettings self._processMap["updateSettings2"] = Processor.process_updateSettings2 self._processMap["updateSettingsAttribute"] = Processor.process_updateSettingsAttribute self._processMap["updateSettingsAttributes"] = Processor.process_updateSettingsAttributes self._processMap["verifyIdentityCredential"] = Processor.process_verifyIdentityCredential self._processMap["verifyIdentityCredentialWithResult"] = Processor.process_verifyIdentityCredentialWithResult self._processMap["verifyPhone"] = Processor.process_verifyPhone self._processMap["verifyQrcode"] = Processor.process_verifyQrcode def process(self, iprot, oprot): (name, type, seqid) = iprot.readMessageBegin() if name not in self._processMap: iprot.skip(TType.STRUCT) iprot.readMessageEnd() x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) x.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() return else: self._processMap[name](self, seqid, iprot, oprot) return True def process_acceptGroupInvitation(self, seqid, iprot, oprot): args = acceptGroupInvitation_args() args.read(iprot) iprot.readMessageEnd() result = acceptGroupInvitation_result() try: self._handler.acceptGroupInvitation(args.reqSeq, args.groupId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("acceptGroupInvitation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_acceptGroupInvitationByTicket(self, seqid, iprot, oprot): args = acceptGroupInvitationByTicket_args() args.read(iprot) iprot.readMessageEnd() result = acceptGroupInvitationByTicket_result() try: self._handler.acceptGroupInvitationByTicket(args.reqSeq, args.groupId, args.ticketId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("acceptGroupInvitationByTicket", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_acceptProximityMatches(self, seqid, iprot, oprot): args = acceptProximityMatches_args() args.read(iprot) iprot.readMessageEnd() result = acceptProximityMatches_result() try: self._handler.acceptProximityMatches(args.sessionId, args.ids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("acceptProximityMatches", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_acquireCallRoute(self, seqid, iprot, oprot): args = acquireCallRoute_args() args.read(iprot) iprot.readMessageEnd() result = acquireCallRoute_result() try: result.success = self._handler.acquireCallRoute(args.to) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("acquireCallRoute", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_acquireCallTicket(self, seqid, iprot, oprot): args = acquireCallTicket_args() args.read(iprot) iprot.readMessageEnd() result = acquireCallTicket_result() try: result.success = self._handler.acquireCallTicket(args.to) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("acquireCallTicket", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_acquireEncryptedAccessToken(self, seqid, iprot, oprot): args = acquireEncryptedAccessToken_args() args.read(iprot) iprot.readMessageEnd() result = acquireEncryptedAccessToken_result() try: result.success = self._handler.acquireEncryptedAccessToken(args.featureType) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("acquireEncryptedAccessToken", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_addSnsId(self, seqid, iprot, oprot): args = addSnsId_args() args.read(iprot) iprot.readMessageEnd() result = addSnsId_result() try: result.success = self._handler.addSnsId(args.snsIdType, args.snsAccessToken) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("addSnsId", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_blockContact(self, seqid, iprot, oprot): args = blockContact_args() args.read(iprot) iprot.readMessageEnd() result = blockContact_result() try: self._handler.blockContact(args.reqSeq, args.id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("blockContact", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_blockRecommendation(self, seqid, iprot, oprot): args = blockRecommendation_args() args.read(iprot) iprot.readMessageEnd() result = blockRecommendation_result() try: self._handler.blockRecommendation(args.reqSeq, args.id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("blockRecommendation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_cancelGroupInvitation(self, seqid, iprot, oprot): args = cancelGroupInvitation_args() args.read(iprot) iprot.readMessageEnd() result = cancelGroupInvitation_result() try: self._handler.cancelGroupInvitation(args.reqSeq, args.groupId, args.contactIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("cancelGroupInvitation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_changeVerificationMethod(self, seqid, iprot, oprot): args = changeVerificationMethod_args() args.read(iprot) iprot.readMessageEnd() result = changeVerificationMethod_result() try: result.success = self._handler.changeVerificationMethod(args.sessionId, args.method) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("changeVerificationMethod", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_clearIdentityCredential(self, seqid, iprot, oprot): args = clearIdentityCredential_args() args.read(iprot) iprot.readMessageEnd() result = clearIdentityCredential_result() try: self._handler.clearIdentityCredential() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("clearIdentityCredential", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_clearMessageBox(self, seqid, iprot, oprot): args = clearMessageBox_args() args.read(iprot) iprot.readMessageEnd() result = clearMessageBox_result() try: self._handler.clearMessageBox(args.channelId, args.messageBoxId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("clearMessageBox", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_closeProximityMatch(self, seqid, iprot, oprot): args = closeProximityMatch_args() args.read(iprot) iprot.readMessageEnd() result = closeProximityMatch_result() try: self._handler.closeProximityMatch(args.sessionId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("closeProximityMatch", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_commitSendMessage(self, seqid, iprot, oprot): args = commitSendMessage_args() args.read(iprot) iprot.readMessageEnd() result = commitSendMessage_result() try: result.success = self._handler.commitSendMessage(args.seq, args.messageId, args.receiverMids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("commitSendMessage", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_commitSendMessages(self, seqid, iprot, oprot): args = commitSendMessages_args() args.read(iprot) iprot.readMessageEnd() result = commitSendMessages_result() try: result.success = self._handler.commitSendMessages(args.seq, args.messageIds, args.receiverMids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("commitSendMessages", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_commitUpdateProfile(self, seqid, iprot, oprot): args = commitUpdateProfile_args() args.read(iprot) iprot.readMessageEnd() result = commitUpdateProfile_result() try: result.success = self._handler.commitUpdateProfile(args.seq, args.attrs, args.receiverMids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("commitUpdateProfile", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_confirmEmail(self, seqid, iprot, oprot): args = confirmEmail_args() args.read(iprot) iprot.readMessageEnd() result = confirmEmail_result() try: self._handler.confirmEmail(args.verifier, args.pinCode) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("confirmEmail", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_createGroup(self, seqid, iprot, oprot): args = createGroup_args() args.read(iprot) iprot.readMessageEnd() result = createGroup_result() try: result.success = self._handler.createGroup(args.seq, args.name, args.contactIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("createGroup", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_createQrcodeBase64Image(self, seqid, iprot, oprot): args = createQrcodeBase64Image_args() args.read(iprot) iprot.readMessageEnd() result = createQrcodeBase64Image_result() try: result.success = self._handler.createQrcodeBase64Image(args.url, args.characterSet, args.imageSize, args.x, args.y, args.width, args.height) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("createQrcodeBase64Image", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_createRoom(self, seqid, iprot, oprot): args = createRoom_args() args.read(iprot) iprot.readMessageEnd() result = createRoom_result() try: result.success = self._handler.createRoom(args.reqSeq, args.contactIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("createRoom", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_createSession(self, seqid, iprot, oprot): args = createSession_args() args.read(iprot) iprot.readMessageEnd() result = createSession_result() try: result.success = self._handler.createSession() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("createSession", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_fetchAnnouncements(self, seqid, iprot, oprot): args = fetchAnnouncements_args() args.read(iprot) iprot.readMessageEnd() result = fetchAnnouncements_result() try: result.success = self._handler.fetchAnnouncements(args.lastFetchedIndex) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("fetchAnnouncements", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_fetchMessages(self, seqid, iprot, oprot): args = fetchMessages_args() args.read(iprot) iprot.readMessageEnd() result = fetchMessages_result() try: result.success = self._handler.fetchMessages(args.localTs, args.count) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("fetchMessages", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_fetchOperations(self, seqid, iprot, oprot): args = fetchOperations_args() args.read(iprot) iprot.readMessageEnd() result = fetchOperations_result() try: result.success = self._handler.fetchOperations(args.localRev, args.count) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("fetchOperations", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_fetchOps(self, seqid, iprot, oprot): args = fetchOps_args() args.read(iprot) iprot.readMessageEnd() result = fetchOps_result() try: result.success = self._handler.fetchOps(args.localRev, args.count, args.globalRev, args.individualRev) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("fetchOps", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findAndAddContactsByEmail(self, seqid, iprot, oprot): args = findAndAddContactsByEmail_args() args.read(iprot) iprot.readMessageEnd() result = findAndAddContactsByEmail_result() try: result.success = self._handler.findAndAddContactsByEmail(args.reqSeq, args.emails) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findAndAddContactsByEmail", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findAndAddContactsByMid(self, seqid, iprot, oprot): args = findAndAddContactsByMid_args() args.read(iprot) iprot.readMessageEnd() result = findAndAddContactsByMid_result() try: result.success = self._handler.findAndAddContactsByMid(args.reqSeq, args.mid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findAndAddContactsByMid", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findAndAddContactsByPhone(self, seqid, iprot, oprot): args = findAndAddContactsByPhone_args() args.read(iprot) iprot.readMessageEnd() result = findAndAddContactsByPhone_result() try: result.success = self._handler.findAndAddContactsByPhone(args.reqSeq, args.phones) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findAndAddContactsByPhone", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findAndAddContactsByUserid(self, seqid, iprot, oprot): args = findAndAddContactsByUserid_args() args.read(iprot) iprot.readMessageEnd() result = findAndAddContactsByUserid_result() try: result.success = self._handler.findAndAddContactsByUserid(args.reqSeq, args.userid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findAndAddContactsByUserid", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findContactByUserid(self, seqid, iprot, oprot): args = findContactByUserid_args() args.read(iprot) iprot.readMessageEnd() result = findContactByUserid_result() try: result.success = self._handler.findContactByUserid(args.userid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findContactByUserid", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findContactByUserTicket(self, seqid, iprot, oprot): args = findContactByUserTicket_args() args.read(iprot) iprot.readMessageEnd() result = findContactByUserTicket_result() try: result.success = self._handler.findContactByUserTicket(args.ticketId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findContactByUserTicket", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findContactsByEmail(self, seqid, iprot, oprot): args = findContactsByEmail_args() args.read(iprot) iprot.readMessageEnd() result = findContactsByEmail_result() try: result.success = self._handler.findContactsByEmail(args.emails) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findContactsByEmail", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findContactsByPhone(self, seqid, iprot, oprot): args = findContactsByPhone_args() args.read(iprot) iprot.readMessageEnd() result = findContactsByPhone_result() try: result.success = self._handler.findContactsByPhone(args.phones) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findContactsByPhone", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findSnsIdUserStatus(self, seqid, iprot, oprot): args = findSnsIdUserStatus_args() args.read(iprot) iprot.readMessageEnd() result = findSnsIdUserStatus_result() try: result.success = self._handler.findSnsIdUserStatus(args.snsIdType, args.snsAccessToken, args.udidHash) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findSnsIdUserStatus", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_finishUpdateVerification(self, seqid, iprot, oprot): args = finishUpdateVerification_args() args.read(iprot) iprot.readMessageEnd() result = finishUpdateVerification_result() try: self._handler.finishUpdateVerification(args.sessionId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("finishUpdateVerification", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_generateUserTicket(self, seqid, iprot, oprot): args = generateUserTicket_args() args.read(iprot) iprot.readMessageEnd() result = generateUserTicket_result() try: result.success = self._handler.generateUserTicket(args.expirationTime, args.maxUseCount) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("generateUserTicket", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getAcceptedProximityMatches(self, seqid, iprot, oprot): args = getAcceptedProximityMatches_args() args.read(iprot) iprot.readMessageEnd() result = getAcceptedProximityMatches_result() try: result.success = self._handler.getAcceptedProximityMatches(args.sessionId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getAcceptedProximityMatches", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getActiveBuddySubscriberIds(self, seqid, iprot, oprot): args = getActiveBuddySubscriberIds_args() args.read(iprot) iprot.readMessageEnd() result = getActiveBuddySubscriberIds_result() try: result.success = self._handler.getActiveBuddySubscriberIds() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getActiveBuddySubscriberIds", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getAllContactIds(self, seqid, iprot, oprot): args = getAllContactIds_args() args.read(iprot) iprot.readMessageEnd() result = getAllContactIds_result() try: result.success = self._handler.getAllContactIds() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getAllContactIds", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getAuthQrcode(self, seqid, iprot, oprot): args = getAuthQrcode_args() args.read(iprot) iprot.readMessageEnd() result = getAuthQrcode_result() try: result.success = self._handler.getAuthQrcode(args.keepLoggedIn, args.systemName) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getAuthQrcode", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getBlockedContactIds(self, seqid, iprot, oprot): args = getBlockedContactIds_args() args.read(iprot) iprot.readMessageEnd() result = getBlockedContactIds_result() try: result.success = self._handler.getBlockedContactIds() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getBlockedContactIds", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getBlockedContactIdsByRange(self, seqid, iprot, oprot): args = getBlockedContactIdsByRange_args() args.read(iprot) iprot.readMessageEnd() result = getBlockedContactIdsByRange_result() try: result.success = self._handler.getBlockedContactIdsByRange(args.start, args.count) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getBlockedContactIdsByRange", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getBlockedRecommendationIds(self, seqid, iprot, oprot): args = getBlockedRecommendationIds_args() args.read(iprot) iprot.readMessageEnd() result = getBlockedRecommendationIds_result() try: result.success = self._handler.getBlockedRecommendationIds() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getBlockedRecommendationIds", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getBuddyBlockerIds(self, seqid, iprot, oprot): args = getBuddyBlockerIds_args() args.read(iprot) iprot.readMessageEnd() result = getBuddyBlockerIds_result() try: result.success = self._handler.getBuddyBlockerIds() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getBuddyBlockerIds", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getBuddyLocation(self, seqid, iprot, oprot): args = getBuddyLocation_args() args.read(iprot) iprot.readMessageEnd() result = getBuddyLocation_result() try: result.success = self._handler.getBuddyLocation(args.mid, args.index) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getBuddyLocation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getCompactContactsModifiedSince(self, seqid, iprot, oprot): args = getCompactContactsModifiedSince_args() args.read(iprot) iprot.readMessageEnd() result = getCompactContactsModifiedSince_result() try: result.success = self._handler.getCompactContactsModifiedSince(args.timestamp) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getCompactContactsModifiedSince", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getCompactGroup(self, seqid, iprot, oprot): args = getCompactGroup_args() args.read(iprot) iprot.readMessageEnd() result = getCompactGroup_result() try: result.success = self._handler.getCompactGroup(args.groupId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getCompactGroup", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getCompactRoom(self, seqid, iprot, oprot): args = getCompactRoom_args() args.read(iprot) iprot.readMessageEnd() result = getCompactRoom_result() try: result.success = self._handler.getCompactRoom(args.roomId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getCompactRoom", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getContact(self, seqid, iprot, oprot): args = getContact_args() args.read(iprot) iprot.readMessageEnd() result = getContact_result() try: result.success = self._handler.getContact(args.id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getContact", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getContacts(self, seqid, iprot, oprot): args = getContacts_args() args.read(iprot) iprot.readMessageEnd() result = getContacts_result() try: result.success = self._handler.getContacts(args.ids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getContacts", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getCountryWithRequestIp(self, seqid, iprot, oprot): args = getCountryWithRequestIp_args() args.read(iprot) iprot.readMessageEnd() result = getCountryWithRequestIp_result() try: result.success = self._handler.getCountryWithRequestIp() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getCountryWithRequestIp", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getFavoriteMids(self, seqid, iprot, oprot): args = getFavoriteMids_args() args.read(iprot) iprot.readMessageEnd() result = getFavoriteMids_result() try: result.success = self._handler.getFavoriteMids() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getFavoriteMids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getGroup(self, seqid, iprot, oprot): args = getGroup_args() args.read(iprot) iprot.readMessageEnd() result = getGroup_result() try: result.success = self._handler.getGroup(args.groupId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getGroup", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getGroupIdsInvited(self, seqid, iprot, oprot): args = getGroupIdsInvited_args() args.read(iprot) iprot.readMessageEnd() result = getGroupIdsInvited_result() try: result.success = self._handler.getGroupIdsInvited() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getGroupIdsInvited", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getGroupIdsJoined(self, seqid, iprot, oprot): args = getGroupIdsJoined_args() args.read(iprot) iprot.readMessageEnd() result = getGroupIdsJoined_result() try: result.success = self._handler.getGroupIdsJoined() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getGroupIdsJoined", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getGroups(self, seqid, iprot, oprot): args = getGroups_args() args.read(iprot) iprot.readMessageEnd() result = getGroups_result() try: result.success = self._handler.getGroups(args.groupIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getGroups", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getHiddenContactMids(self, seqid, iprot, oprot): args = getHiddenContactMids_args() args.read(iprot) iprot.readMessageEnd() result = getHiddenContactMids_result() try: result.success = self._handler.getHiddenContactMids() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getHiddenContactMids", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getIdentityIdentifier(self, seqid, iprot, oprot): args = getIdentityIdentifier_args() args.read(iprot) iprot.readMessageEnd() result = getIdentityIdentifier_result() try: result.success = self._handler.getIdentityIdentifier() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getIdentityIdentifier", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getLastAnnouncementIndex(self, seqid, iprot, oprot): args = getLastAnnouncementIndex_args() args.read(iprot) iprot.readMessageEnd() result = getLastAnnouncementIndex_result() try: result.success = self._handler.getLastAnnouncementIndex() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getLastAnnouncementIndex", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getLastOpRevision(self, seqid, iprot, oprot): args = getLastOpRevision_args() args.read(iprot) iprot.readMessageEnd() result = getLastOpRevision_result() try: result.success = self._handler.getLastOpRevision() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getLastOpRevision", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getMessageBox(self, seqid, iprot, oprot): args = getMessageBox_args() args.read(iprot) iprot.readMessageEnd() result = getMessageBox_result() try: result.success = self._handler.getMessageBox(args.channelId, args.messageBoxId, args.lastMessagesCount) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getMessageBox", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getMessageBoxCompactWrapUp(self, seqid, iprot, oprot): args = getMessageBoxCompactWrapUp_args() args.read(iprot) iprot.readMessageEnd() result = getMessageBoxCompactWrapUp_result() try: result.success = self._handler.getMessageBoxCompactWrapUp(args.mid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getMessageBoxCompactWrapUp", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getMessageBoxCompactWrapUpList(self, seqid, iprot, oprot): args = getMessageBoxCompactWrapUpList_args() args.read(iprot) iprot.readMessageEnd() result = getMessageBoxCompactWrapUpList_result() try: result.success = self._handler.getMessageBoxCompactWrapUpList(args.start, args.messageBoxCount) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getMessageBoxCompactWrapUpList", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getMessageBoxList(self, seqid, iprot, oprot): args = getMessageBoxList_args() args.read(iprot) iprot.readMessageEnd() result = getMessageBoxList_result() try: result.success = self._handler.getMessageBoxList(args.channelId, args.lastMessagesCount) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getMessageBoxList", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getMessageBoxListByStatus(self, seqid, iprot, oprot): args = getMessageBoxListByStatus_args() args.read(iprot) iprot.readMessageEnd() result = getMessageBoxListByStatus_result() try: result.success = self._handler.getMessageBoxListByStatus(args.channelId, args.lastMessagesCount, args.status) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getMessageBoxListByStatus", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getMessageBoxWrapUp(self, seqid, iprot, oprot): args = getMessageBoxWrapUp_args() args.read(iprot) iprot.readMessageEnd() result = getMessageBoxWrapUp_result() try: result.success = self._handler.getMessageBoxWrapUp(args.mid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getMessageBoxWrapUp", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getMessageBoxWrapUpList(self, seqid, iprot, oprot): args = getMessageBoxWrapUpList_args() args.read(iprot) iprot.readMessageEnd() result = getMessageBoxWrapUpList_result() try: result.success = self._handler.getMessageBoxWrapUpList(args.start, args.messageBoxCount) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getMessageBoxWrapUpList", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getMessagesBySequenceNumber(self, seqid, iprot, oprot): args = getMessagesBySequenceNumber_args() args.read(iprot) iprot.readMessageEnd() result = getMessagesBySequenceNumber_result() try: result.success = self._handler.getMessagesBySequenceNumber(args.channelId, args.messageBoxId, args.startSeq, args.endSeq) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getMessagesBySequenceNumber", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getNextMessages(self, seqid, iprot, oprot): args = getNextMessages_args() args.read(iprot) iprot.readMessageEnd() result = getNextMessages_result() try: result.success = self._handler.getNextMessages(args.messageBoxId, args.startSeq, args.messagesCount) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getNextMessages", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getNotificationPolicy(self, seqid, iprot, oprot): args = getNotificationPolicy_args() args.read(iprot) iprot.readMessageEnd() result = getNotificationPolicy_result() try: result.success = self._handler.getNotificationPolicy(args.carrier) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getNotificationPolicy", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getPreviousMessages(self, seqid, iprot, oprot): args = getPreviousMessages_args() args.read(iprot) iprot.readMessageEnd() result = getPreviousMessages_result() try: result.success = self._handler.getPreviousMessages(args.messageBoxId, args.endSeq, args.messagesCount) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getPreviousMessages", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getProfile(self, seqid, iprot, oprot): args = getProfile_args() args.read(iprot) iprot.readMessageEnd() result = getProfile_result() try: result.success = self._handler.getProfile() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getProfile", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getProximityMatchCandidateList(self, seqid, iprot, oprot): args = getProximityMatchCandidateList_args() args.read(iprot) iprot.readMessageEnd() result = getProximityMatchCandidateList_result() try: result.success = self._handler.getProximityMatchCandidateList(args.sessionId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getProximityMatchCandidateList", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getProximityMatchCandidates(self, seqid, iprot, oprot): args = getProximityMatchCandidates_args() args.read(iprot) iprot.readMessageEnd() result = getProximityMatchCandidates_result() try: result.success = self._handler.getProximityMatchCandidates(args.sessionId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getProximityMatchCandidates", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getRecentMessages(self, seqid, iprot, oprot): args = getRecentMessages_args() args.read(iprot) iprot.readMessageEnd() result = getRecentMessages_result() try: result.success = self._handler.getRecentMessages(args.messageBoxId, args.messagesCount) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getRecentMessages", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getRecommendationIds(self, seqid, iprot, oprot): args = getRecommendationIds_args() args.read(iprot) iprot.readMessageEnd() result = getRecommendationIds_result() try: result.success = self._handler.getRecommendationIds() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getRecommendationIds", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getRoom(self, seqid, iprot, oprot): args = getRoom_args() args.read(iprot) iprot.readMessageEnd() result = getRoom_result() try: result.success = self._handler.getRoom(args.roomId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getRoom", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getRSAKeyInfo(self, seqid, iprot, oprot): args = getRSAKeyInfo_args() args.read(iprot) iprot.readMessageEnd() result = getRSAKeyInfo_result() try: result.success = self._handler.getRSAKeyInfo(args.provider) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getRSAKeyInfo", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getServerTime(self, seqid, iprot, oprot): args = getServerTime_args() args.read(iprot) iprot.readMessageEnd() result = getServerTime_result() try: result.success = self._handler.getServerTime() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getServerTime", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getSessions(self, seqid, iprot, oprot): args = getSessions_args() args.read(iprot) iprot.readMessageEnd() result = getSessions_result() try: result.success = self._handler.getSessions() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getSessions", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getSettings(self, seqid, iprot, oprot): args = getSettings_args() args.read(iprot) iprot.readMessageEnd() result = getSettings_result() try: result.success = self._handler.getSettings() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getSettings", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getSettingsAttributes(self, seqid, iprot, oprot): args = getSettingsAttributes_args() args.read(iprot) iprot.readMessageEnd() result = getSettingsAttributes_result() try: result.success = self._handler.getSettingsAttributes(args.attrBitset) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getSettingsAttributes", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getSystemConfiguration(self, seqid, iprot, oprot): args = getSystemConfiguration_args() args.read(iprot) iprot.readMessageEnd() result = getSystemConfiguration_result() try: result.success = self._handler.getSystemConfiguration() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getSystemConfiguration", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getUserTicket(self, seqid, iprot, oprot): args = getUserTicket_args() args.read(iprot) iprot.readMessageEnd() result = getUserTicket_result() try: result.success = self._handler.getUserTicket() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getUserTicket", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_getWapInvitation(self, seqid, iprot, oprot): args = getWapInvitation_args() args.read(iprot) iprot.readMessageEnd() result = getWapInvitation_result() try: result.success = self._handler.getWapInvitation(args.invitationHash) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("getWapInvitation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_invalidateUserTicket(self, seqid, iprot, oprot): args = invalidateUserTicket_args() args.read(iprot) iprot.readMessageEnd() result = invalidateUserTicket_result() try: self._handler.invalidateUserTicket() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("invalidateUserTicket", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_inviteFriendsBySms(self, seqid, iprot, oprot): args = inviteFriendsBySms_args() args.read(iprot) iprot.readMessageEnd() result = inviteFriendsBySms_result() try: self._handler.inviteFriendsBySms(args.phoneNumberList) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("inviteFriendsBySms", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_inviteIntoGroup(self, seqid, iprot, oprot): args = inviteIntoGroup_args() args.read(iprot) iprot.readMessageEnd() result = inviteIntoGroup_result() try: self._handler.inviteIntoGroup(args.reqSeq, args.groupId, args.contactIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("inviteIntoGroup", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_inviteIntoRoom(self, seqid, iprot, oprot): args = inviteIntoRoom_args() args.read(iprot) iprot.readMessageEnd() result = inviteIntoRoom_result() try: self._handler.inviteIntoRoom(args.reqSeq, args.roomId, args.contactIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("inviteIntoRoom", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_inviteViaEmail(self, seqid, iprot, oprot): args = inviteViaEmail_args() args.read(iprot) iprot.readMessageEnd() result = inviteViaEmail_result() try: self._handler.inviteViaEmail(args.reqSeq, args.email, args.name) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("inviteViaEmail", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_isIdentityIdentifierAvailable(self, seqid, iprot, oprot): args = isIdentityIdentifierAvailable_args() args.read(iprot) iprot.readMessageEnd() result = isIdentityIdentifierAvailable_result() try: result.success = self._handler.isIdentityIdentifierAvailable(args.provider, args.identifier) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("isIdentityIdentifierAvailable", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_isUseridAvailable(self, seqid, iprot, oprot): args = isUseridAvailable_args() args.read(iprot) iprot.readMessageEnd() result = isUseridAvailable_result() try: result.success = self._handler.isUseridAvailable(args.userid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("isUseridAvailable", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_kickoutFromGroup(self, seqid, iprot, oprot): args = kickoutFromGroup_args() args.read(iprot) iprot.readMessageEnd() result = kickoutFromGroup_result() try: self._handler.kickoutFromGroup(args.reqSeq, args.groupId, args.contactIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("kickoutFromGroup", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_reissueGroupTicket(self, seqid, iprot, oprot): args = reissueGroupTicket_args() args.read(iprot) iprot.readMessageEnd() result = reissueGroupTicket_result() try: result.success = self._handler.reissueGroupTicket(args.groupId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reissueGroupTicket", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_findGroupByTicket(self, seqid, iprot, oprot): args = findGroupByTicket_args() args.read(iprot) iprot.readMessageEnd() result = findGroupByTicket_result() try: result.success = self._handler.findGroupByTicket(args.ticketId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("findGroupByTicket", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_leaveGroup(self, seqid, iprot, oprot): args = leaveGroup_args() args.read(iprot) iprot.readMessageEnd() result = leaveGroup_result() try: self._handler.leaveGroup(args.reqSeq, args.groupId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("leaveGroup", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_leaveRoom(self, seqid, iprot, oprot): args = leaveRoom_args() args.read(iprot) iprot.readMessageEnd() result = leaveRoom_result() try: self._handler.leaveRoom(args.reqSeq, args.roomId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("leaveRoom", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_loginWithIdentityCredential(self, seqid, iprot, oprot): args = loginWithIdentityCredential_args() args.read(iprot) iprot.readMessageEnd() result = loginWithIdentityCredential_result() try: result.success = self._handler.loginWithIdentityCredential(args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("loginWithIdentityCredential", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_loginWithIdentityCredentialForCertificate(self, seqid, iprot, oprot): args = loginWithIdentityCredentialForCertificate_args() args.read(iprot) iprot.readMessageEnd() result = loginWithIdentityCredentialForCertificate_result() try: result.success = self._handler.loginWithIdentityCredentialForCertificate(args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("loginWithIdentityCredentialForCertificate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_loginWithVerifier(self, seqid, iprot, oprot): args = loginWithVerifier_args() args.read(iprot) iprot.readMessageEnd() result = loginWithVerifier_result() try: result.success = self._handler.loginWithVerifier(args.verifier) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("loginWithVerifier", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_loginWithVerifierForCerificate(self, seqid, iprot, oprot): args = loginWithVerifierForCerificate_args() args.read(iprot) iprot.readMessageEnd() result = loginWithVerifierForCerificate_result() try: result.success = self._handler.loginWithVerifierForCerificate(args.verifier) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("loginWithVerifierForCerificate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_loginWithVerifierForCertificate(self, seqid, iprot, oprot): args = loginWithVerifierForCertificate_args() args.read(iprot) iprot.readMessageEnd() result = loginWithVerifierForCertificate_result() try: result.success = self._handler.loginWithVerifierForCertificate(args.verifier) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("loginWithVerifierForCertificate", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_logout(self, seqid, iprot, oprot): args = logout_args() args.read(iprot) iprot.readMessageEnd() result = logout_result() try: self._handler.logout() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("logout", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_logoutSession(self, seqid, iprot, oprot): args = logoutSession_args() args.read(iprot) iprot.readMessageEnd() result = logoutSession_result() try: self._handler.logoutSession(args.tokenKey) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("logoutSession", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_noop(self, seqid, iprot, oprot): args = noop_args() args.read(iprot) iprot.readMessageEnd() result = noop_result() try: self._handler.noop() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("noop", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_notifiedRedirect(self, seqid, iprot, oprot): args = notifiedRedirect_args() args.read(iprot) iprot.readMessageEnd() result = notifiedRedirect_result() try: self._handler.notifiedRedirect(args.paramMap) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("notifiedRedirect", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_notifyBuddyOnAir(self, seqid, iprot, oprot): args = notifyBuddyOnAir_args() args.read(iprot) iprot.readMessageEnd() result = notifyBuddyOnAir_result() try: result.success = self._handler.notifyBuddyOnAir(args.seq, args.receiverMids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("notifyBuddyOnAir", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_notifyIndividualEvent(self, seqid, iprot, oprot): args = notifyIndividualEvent_args() args.read(iprot) iprot.readMessageEnd() result = notifyIndividualEvent_result() try: self._handler.notifyIndividualEvent(args.notificationStatus, args.receiverMids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("notifyIndividualEvent", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_notifyInstalled(self, seqid, iprot, oprot): args = notifyInstalled_args() args.read(iprot) iprot.readMessageEnd() result = notifyInstalled_result() try: self._handler.notifyInstalled(args.udidHash, args.applicationTypeWithExtensions) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("notifyInstalled", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_notifyRegistrationComplete(self, seqid, iprot, oprot): args = notifyRegistrationComplete_args() args.read(iprot) iprot.readMessageEnd() result = notifyRegistrationComplete_result() try: self._handler.notifyRegistrationComplete(args.udidHash, args.applicationTypeWithExtensions) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("notifyRegistrationComplete", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_notifySleep(self, seqid, iprot, oprot): args = notifySleep_args() args.read(iprot) iprot.readMessageEnd() result = notifySleep_result() try: self._handler.notifySleep(args.lastRev, args.badge) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("notifySleep", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_notifyUpdated(self, seqid, iprot, oprot): args = notifyUpdated_args() args.read(iprot) iprot.readMessageEnd() result = notifyUpdated_result() try: self._handler.notifyUpdated(args.lastRev, args.deviceInfo) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("notifyUpdated", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_openProximityMatch(self, seqid, iprot, oprot): args = openProximityMatch_args() args.read(iprot) iprot.readMessageEnd() result = openProximityMatch_result() try: result.success = self._handler.openProximityMatch(args.location) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("openProximityMatch", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerBuddyUser(self, seqid, iprot, oprot): args = registerBuddyUser_args() args.read(iprot) iprot.readMessageEnd() result = registerBuddyUser_result() try: result.success = self._handler.registerBuddyUser(args.buddyId, args.registrarPassword) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerBuddyUser", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerBuddyUserid(self, seqid, iprot, oprot): args = registerBuddyUserid_args() args.read(iprot) iprot.readMessageEnd() result = registerBuddyUserid_result() try: self._handler.registerBuddyUserid(args.seq, args.userid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerBuddyUserid", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerDevice(self, seqid, iprot, oprot): args = registerDevice_args() args.read(iprot) iprot.readMessageEnd() result = registerDevice_result() try: result.success = self._handler.registerDevice(args.sessionId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerDevice", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerDeviceWithIdentityCredential(self, seqid, iprot, oprot): args = registerDeviceWithIdentityCredential_args() args.read(iprot) iprot.readMessageEnd() result = registerDeviceWithIdentityCredential_result() try: result.success = self._handler.registerDeviceWithIdentityCredential(args.sessionId, args.provider, args.identifier, args.verifier) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerDeviceWithIdentityCredential", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerDeviceWithoutPhoneNumber(self, seqid, iprot, oprot): args = registerDeviceWithoutPhoneNumber_args() args.read(iprot) iprot.readMessageEnd() result = registerDeviceWithoutPhoneNumber_result() try: result.success = self._handler.registerDeviceWithoutPhoneNumber(args.region, args.udidHash, args.deviceInfo) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerDeviceWithoutPhoneNumber", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerDeviceWithoutPhoneNumberWithIdentityCredential(self, seqid, iprot, oprot): args = registerDeviceWithoutPhoneNumberWithIdentityCredential_args() args.read(iprot) iprot.readMessageEnd() result = registerDeviceWithoutPhoneNumberWithIdentityCredential_result() try: result.success = self._handler.registerDeviceWithoutPhoneNumberWithIdentityCredential(args.region, args.udidHash, args.deviceInfo, args.provider, args.identifier, args.verifier, args.mid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerUserid(self, seqid, iprot, oprot): args = registerUserid_args() args.read(iprot) iprot.readMessageEnd() result = registerUserid_result() try: result.success = self._handler.registerUserid(args.reqSeq, args.userid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerUserid", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerWapDevice(self, seqid, iprot, oprot): args = registerWapDevice_args() args.read(iprot) iprot.readMessageEnd() result = registerWapDevice_result() try: result.success = self._handler.registerWapDevice(args.invitationHash, args.guidHash, args.email, args.deviceInfo) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerWapDevice", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerWithExistingSnsIdAndIdentityCredential(self, seqid, iprot, oprot): args = registerWithExistingSnsIdAndIdentityCredential_args() args.read(iprot) iprot.readMessageEnd() result = registerWithExistingSnsIdAndIdentityCredential_result() try: result.success = self._handler.registerWithExistingSnsIdAndIdentityCredential(args.identityCredential, args.region, args.udidHash, args.deviceInfo) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerWithSnsId(self, seqid, iprot, oprot): args = registerWithSnsId_args() args.read(iprot) iprot.readMessageEnd() result = registerWithSnsId_result() try: result.success = self._handler.registerWithSnsId(args.snsIdType, args.snsAccessToken, args.region, args.udidHash, args.deviceInfo, args.mid) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerWithSnsId", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_registerWithSnsIdAndIdentityCredential(self, seqid, iprot, oprot): args = registerWithSnsIdAndIdentityCredential_args() args.read(iprot) iprot.readMessageEnd() result = registerWithSnsIdAndIdentityCredential_result() try: result.success = self._handler.registerWithSnsIdAndIdentityCredential(args.snsIdType, args.snsAccessToken, args.identityCredential, args.region, args.udidHash, args.deviceInfo) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("registerWithSnsIdAndIdentityCredential", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_reissueDeviceCredential(self, seqid, iprot, oprot): args = reissueDeviceCredential_args() args.read(iprot) iprot.readMessageEnd() result = reissueDeviceCredential_result() try: result.success = self._handler.reissueDeviceCredential() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reissueDeviceCredential", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_reissueUserTicket(self, seqid, iprot, oprot): args = reissueUserTicket_args() args.read(iprot) iprot.readMessageEnd() result = reissueUserTicket_result() try: result.success = self._handler.reissueUserTicket(args.expirationTime, args.maxUseCount) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reissueUserTicket", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_rejectGroupInvitation(self, seqid, iprot, oprot): args = rejectGroupInvitation_args() args.read(iprot) iprot.readMessageEnd() result = rejectGroupInvitation_result() try: self._handler.rejectGroupInvitation(args.reqSeq, args.groupId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("rejectGroupInvitation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_releaseSession(self, seqid, iprot, oprot): args = releaseSession_args() args.read(iprot) iprot.readMessageEnd() result = releaseSession_result() try: self._handler.releaseSession() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("releaseSession", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_removeAllMessages(self, seqid, iprot, oprot): args = removeAllMessages_args() args.read(iprot) iprot.readMessageEnd() result = removeAllMessages_result() try: self._handler.removeAllMessages(args.seq, args.lastMessageId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("removeAllMessages", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_removeBuddyLocation(self, seqid, iprot, oprot): args = removeBuddyLocation_args() args.read(iprot) iprot.readMessageEnd() result = removeBuddyLocation_result() try: self._handler.removeBuddyLocation(args.mid, args.index) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("removeBuddyLocation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_removeMessage(self, seqid, iprot, oprot): args = removeMessage_args() args.read(iprot) iprot.readMessageEnd() result = removeMessage_result() try: result.success = self._handler.removeMessage(args.messageId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("removeMessage", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_removeMessageFromMyHome(self, seqid, iprot, oprot): args = removeMessageFromMyHome_args() args.read(iprot) iprot.readMessageEnd() result = removeMessageFromMyHome_result() try: result.success = self._handler.removeMessageFromMyHome(args.messageId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("removeMessageFromMyHome", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_removeSnsId(self, seqid, iprot, oprot): args = removeSnsId_args() args.read(iprot) iprot.readMessageEnd() result = removeSnsId_result() try: result.success = self._handler.removeSnsId(args.snsIdType) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("removeSnsId", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_report(self, seqid, iprot, oprot): args = report_args() args.read(iprot) iprot.readMessageEnd() result = report_result() try: self._handler.report(args.syncOpRevision, args.category, args.report) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("report", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_reportContacts(self, seqid, iprot, oprot): args = reportContacts_args() args.read(iprot) iprot.readMessageEnd() result = reportContacts_result() try: result.success = self._handler.reportContacts(args.syncOpRevision, args.category, args.contactReports, args.actionType) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reportContacts", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_reportGroups(self, seqid, iprot, oprot): args = reportGroups_args() args.read(iprot) iprot.readMessageEnd() result = reportGroups_result() try: self._handler.reportGroups(args.syncOpRevision, args.groups) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reportGroups", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_reportProfile(self, seqid, iprot, oprot): args = reportProfile_args() args.read(iprot) iprot.readMessageEnd() result = reportProfile_result() try: self._handler.reportProfile(args.syncOpRevision, args.profile) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reportProfile", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_reportRooms(self, seqid, iprot, oprot): args = reportRooms_args() args.read(iprot) iprot.readMessageEnd() result = reportRooms_result() try: self._handler.reportRooms(args.syncOpRevision, args.rooms) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reportRooms", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_reportSettings(self, seqid, iprot, oprot): args = reportSettings_args() args.read(iprot) iprot.readMessageEnd() result = reportSettings_result() try: self._handler.reportSettings(args.syncOpRevision, args.settings) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reportSettings", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_reportSpammer(self, seqid, iprot, oprot): args = reportSpammer_args() args.read(iprot) iprot.readMessageEnd() result = reportSpammer_result() try: self._handler.reportSpammer(args.spammerMid, args.spammerReasons, args.spamMessageIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("reportSpammer", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_requestAccountPasswordReset(self, seqid, iprot, oprot): args = requestAccountPasswordReset_args() args.read(iprot) iprot.readMessageEnd() result = requestAccountPasswordReset_result() try: self._handler.requestAccountPasswordReset(args.provider, args.identifier, args.locale) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("requestAccountPasswordReset", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_requestEmailConfirmation(self, seqid, iprot, oprot): args = requestEmailConfirmation_args() args.read(iprot) iprot.readMessageEnd() result = requestEmailConfirmation_result() try: result.success = self._handler.requestEmailConfirmation(args.emailConfirmation) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("requestEmailConfirmation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_requestIdentityUnbind(self, seqid, iprot, oprot): args = requestIdentityUnbind_args() args.read(iprot) iprot.readMessageEnd() result = requestIdentityUnbind_result() try: self._handler.requestIdentityUnbind(args.provider, args.identifier) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("requestIdentityUnbind", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_resendEmailConfirmation(self, seqid, iprot, oprot): args = resendEmailConfirmation_args() args.read(iprot) iprot.readMessageEnd() result = resendEmailConfirmation_result() try: result.success = self._handler.resendEmailConfirmation(args.verifier) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resendEmailConfirmation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_resendPinCode(self, seqid, iprot, oprot): args = resendPinCode_args() args.read(iprot) iprot.readMessageEnd() result = resendPinCode_result() try: self._handler.resendPinCode(args.sessionId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resendPinCode", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_resendPinCodeBySMS(self, seqid, iprot, oprot): args = resendPinCodeBySMS_args() args.read(iprot) iprot.readMessageEnd() result = resendPinCodeBySMS_result() try: self._handler.resendPinCodeBySMS(args.sessionId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("resendPinCodeBySMS", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendChatChecked(self, seqid, iprot, oprot): args = sendChatChecked_args() args.read(iprot) iprot.readMessageEnd() result = sendChatChecked_result() try: self._handler.sendChatChecked(args.seq, args.consumer, args.lastMessageId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendChatChecked", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendChatRemoved(self, seqid, iprot, oprot): args = sendChatRemoved_args() args.read(iprot) iprot.readMessageEnd() result = sendChatRemoved_result() try: self._handler.sendChatRemoved(args.seq, args.consumer, args.lastMessageId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendChatRemoved", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendContentPreviewUpdated(self, seqid, iprot, oprot): args = sendContentPreviewUpdated_args() args.read(iprot) iprot.readMessageEnd() result = sendContentPreviewUpdated_result() try: result.success = self._handler.sendContentPreviewUpdated(args.esq, args.messageId, args.receiverMids) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendContentPreviewUpdated", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendContentReceipt(self, seqid, iprot, oprot): args = sendContentReceipt_args() args.read(iprot) iprot.readMessageEnd() result = sendContentReceipt_result() try: self._handler.sendContentReceipt(args.seq, args.consumer, args.messageId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendContentReceipt", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendDummyPush(self, seqid, iprot, oprot): args = sendDummyPush_args() args.read(iprot) iprot.readMessageEnd() result = sendDummyPush_result() try: self._handler.sendDummyPush() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendDummyPush", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendEvent(self, seqid, iprot, oprot): args = sendEvent_args() args.read(iprot) iprot.readMessageEnd() result = sendEvent_result() try: result.success = self._handler.sendEvent(args.seq, args.message) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendEvent", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendMessage(self, seqid, iprot, oprot): args = sendMessage_args() args.read(iprot) iprot.readMessageEnd() result = sendMessage_result() try: result.success = self._handler.sendMessage(args.seq, args.message) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendMessage", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendMessageIgnored(self, seqid, iprot, oprot): args = sendMessageIgnored_args() args.read(iprot) iprot.readMessageEnd() result = sendMessageIgnored_result() try: self._handler.sendMessageIgnored(args.seq, args.consumer, args.messageIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendMessageIgnored", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendMessageReceipt(self, seqid, iprot, oprot): args = sendMessageReceipt_args() args.read(iprot) iprot.readMessageEnd() result = sendMessageReceipt_result() try: self._handler.sendMessageReceipt(args.seq, args.consumer, args.messageIds) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendMessageReceipt", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_sendMessageToMyHome(self, seqid, iprot, oprot): args = sendMessageToMyHome_args() args.read(iprot) iprot.readMessageEnd() result = sendMessageToMyHome_result() try: result.success = self._handler.sendMessageToMyHome(args.seq, args.message) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("sendMessageToMyHome", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_setBuddyLocation(self, seqid, iprot, oprot): args = setBuddyLocation_args() args.read(iprot) iprot.readMessageEnd() result = setBuddyLocation_result() try: self._handler.setBuddyLocation(args.mid, args.index, args.location) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("setBuddyLocation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_setIdentityCredential(self, seqid, iprot, oprot): args = setIdentityCredential_args() args.read(iprot) iprot.readMessageEnd() result = setIdentityCredential_result() try: self._handler.setIdentityCredential(args.provider, args.identifier, args.verifier) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("setIdentityCredential", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_setNotificationsEnabled(self, seqid, iprot, oprot): args = setNotificationsEnabled_args() args.read(iprot) iprot.readMessageEnd() result = setNotificationsEnabled_result() try: self._handler.setNotificationsEnabled(args.reqSeq, args.type, args.target, args.enablement) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("setNotificationsEnabled", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_startUpdateVerification(self, seqid, iprot, oprot): args = startUpdateVerification_args() args.read(iprot) iprot.readMessageEnd() result = startUpdateVerification_result() try: result.success = self._handler.startUpdateVerification(args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.locale) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("startUpdateVerification", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_startVerification(self, seqid, iprot, oprot): args = startVerification_args() args.read(iprot) iprot.readMessageEnd() result = startVerification_result() try: result.success = self._handler.startVerification(args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.mid, args.locale) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("startVerification", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_storeUpdateProfileAttribute(self, seqid, iprot, oprot): args = storeUpdateProfileAttribute_args() args.read(iprot) iprot.readMessageEnd() result = storeUpdateProfileAttribute_result() try: self._handler.storeUpdateProfileAttribute(args.seq, args.profileAttribute, args.value) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("storeUpdateProfileAttribute", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_syncContactBySnsIds(self, seqid, iprot, oprot): args = syncContactBySnsIds_args() args.read(iprot) iprot.readMessageEnd() result = syncContactBySnsIds_result() try: result.success = self._handler.syncContactBySnsIds(args.reqSeq, args.modifications) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("syncContactBySnsIds", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_syncContacts(self, seqid, iprot, oprot): args = syncContacts_args() args.read(iprot) iprot.readMessageEnd() result = syncContacts_result() try: result.success = self._handler.syncContacts(args.reqSeq, args.localContacts) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("syncContacts", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_trySendMessage(self, seqid, iprot, oprot): args = trySendMessage_args() args.read(iprot) iprot.readMessageEnd() result = trySendMessage_result() try: result.success = self._handler.trySendMessage(args.seq, args.message) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("trySendMessage", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_unblockContact(self, seqid, iprot, oprot): args = unblockContact_args() args.read(iprot) iprot.readMessageEnd() result = unblockContact_result() try: self._handler.unblockContact(args.reqSeq, args.id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("unblockContact", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_unblockRecommendation(self, seqid, iprot, oprot): args = unblockRecommendation_args() args.read(iprot) iprot.readMessageEnd() result = unblockRecommendation_result() try: self._handler.unblockRecommendation(args.reqSeq, args.id) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("unblockRecommendation", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_unregisterUserAndDevice(self, seqid, iprot, oprot): args = unregisterUserAndDevice_args() args.read(iprot) iprot.readMessageEnd() result = unregisterUserAndDevice_result() try: result.success = self._handler.unregisterUserAndDevice() msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("unregisterUserAndDevice", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateApnsDeviceToken(self, seqid, iprot, oprot): args = updateApnsDeviceToken_args() args.read(iprot) iprot.readMessageEnd() result = updateApnsDeviceToken_result() try: self._handler.updateApnsDeviceToken(args.apnsDeviceToken) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateApnsDeviceToken", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateBuddySetting(self, seqid, iprot, oprot): args = updateBuddySetting_args() args.read(iprot) iprot.readMessageEnd() result = updateBuddySetting_result() try: self._handler.updateBuddySetting(args.key, args.value) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateBuddySetting", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateC2DMRegistrationId(self, seqid, iprot, oprot): args = updateC2DMRegistrationId_args() args.read(iprot) iprot.readMessageEnd() result = updateC2DMRegistrationId_result() try: self._handler.updateC2DMRegistrationId(args.registrationId) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateC2DMRegistrationId", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateContactSetting(self, seqid, iprot, oprot): args = updateContactSetting_args() args.read(iprot) iprot.readMessageEnd() result = updateContactSetting_result() try: self._handler.updateContactSetting(args.reqSeq, args.mid, args.flag, args.value) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateContactSetting", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateCustomModeSettings(self, seqid, iprot, oprot): args = updateCustomModeSettings_args() args.read(iprot) iprot.readMessageEnd() result = updateCustomModeSettings_result() try: self._handler.updateCustomModeSettings(args.customMode, args.paramMap) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateCustomModeSettings", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateDeviceInfo(self, seqid, iprot, oprot): args = updateDeviceInfo_args() args.read(iprot) iprot.readMessageEnd() result = updateDeviceInfo_result() try: self._handler.updateDeviceInfo(args.deviceUid, args.deviceInfo) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateDeviceInfo", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateGroup(self, seqid, iprot, oprot): args = updateGroup_args() args.read(iprot) iprot.readMessageEnd() result = updateGroup_result() try: self._handler.updateGroup(args.reqSeq, args.group) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateGroup", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateNotificationToken(self, seqid, iprot, oprot): args = updateNotificationToken_args() args.read(iprot) iprot.readMessageEnd() result = updateNotificationToken_result() try: self._handler.updateNotificationToken(args.type, args.token) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateNotificationToken", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateNotificationTokenWithBytes(self, seqid, iprot, oprot): args = updateNotificationTokenWithBytes_args() args.read(iprot) iprot.readMessageEnd() result = updateNotificationTokenWithBytes_result() try: self._handler.updateNotificationTokenWithBytes(args.type, args.token) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateNotificationTokenWithBytes", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateProfile(self, seqid, iprot, oprot): args = updateProfile_args() args.read(iprot) iprot.readMessageEnd() result = updateProfile_result() try: self._handler.updateProfile(args.reqSeq, args.profile) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateProfile", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateProfileAttribute(self, seqid, iprot, oprot): args = updateProfileAttribute_args() args.read(iprot) iprot.readMessageEnd() result = updateProfileAttribute_result() try: self._handler.updateProfileAttribute(args.reqSeq, args.attr, args.value) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateProfileAttribute", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateRegion(self, seqid, iprot, oprot): args = updateRegion_args() args.read(iprot) iprot.readMessageEnd() result = updateRegion_result() try: self._handler.updateRegion(args.region) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateRegion", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateSettings(self, seqid, iprot, oprot): args = updateSettings_args() args.read(iprot) iprot.readMessageEnd() result = updateSettings_result() try: self._handler.updateSettings(args.reqSeq, args.settings) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateSettings", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateSettings2(self, seqid, iprot, oprot): args = updateSettings2_args() args.read(iprot) iprot.readMessageEnd() result = updateSettings2_result() try: result.success = self._handler.updateSettings2(args.reqSeq, args.settings) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateSettings2", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateSettingsAttribute(self, seqid, iprot, oprot): args = updateSettingsAttribute_args() args.read(iprot) iprot.readMessageEnd() result = updateSettingsAttribute_result() try: self._handler.updateSettingsAttribute(args.reqSeq, args.attr, args.value) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateSettingsAttribute", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_updateSettingsAttributes(self, seqid, iprot, oprot): args = updateSettingsAttributes_args() args.read(iprot) iprot.readMessageEnd() result = updateSettingsAttributes_result() try: result.success = self._handler.updateSettingsAttributes(args.reqSeq, args.attrBitset, args.settings) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("updateSettingsAttributes", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_verifyIdentityCredential(self, seqid, iprot, oprot): args = verifyIdentityCredential_args() args.read(iprot) iprot.readMessageEnd() result = verifyIdentityCredential_result() try: self._handler.verifyIdentityCredential(args.identityProvider, args.identifier, args.password) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("verifyIdentityCredential", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_verifyIdentityCredentialWithResult(self, seqid, iprot, oprot): args = verifyIdentityCredentialWithResult_args() args.read(iprot) iprot.readMessageEnd() result = verifyIdentityCredentialWithResult_result() try: result.success = self._handler.verifyIdentityCredentialWithResult(args.identityCredential) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("verifyIdentityCredentialWithResult", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_verifyPhone(self, seqid, iprot, oprot): args = verifyPhone_args() args.read(iprot) iprot.readMessageEnd() result = verifyPhone_result() try: result.success = self._handler.verifyPhone(args.sessionId, args.pinCode, args.udidHash) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("verifyPhone", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() def process_verifyQrcode(self, seqid, iprot, oprot): args = verifyQrcode_args() args.read(iprot) iprot.readMessageEnd() result = verifyQrcode_result() try: result.success = self._handler.verifyQrcode(args.verifier, args.pinCode) msg_type = TMessageType.REPLY except TTransport.TTransportException: raise except TalkException as e: msg_type = TMessageType.REPLY result.e = e except TApplicationException as ex: logging.exception('TApplication exception in handler') msg_type = TMessageType.EXCEPTION result = ex except Exception: logging.exception('Unexpected exception in handler') msg_type = TMessageType.EXCEPTION result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') oprot.writeMessageBegin("verifyQrcode", msg_type, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() # HELPER FUNCTIONS AND STRUCTURES class acceptGroupInvitation_args(object): """ Attributes: - reqSeq - groupId """ def __init__(self, reqSeq=None, groupId=None,): self.reqSeq = reqSeq self.groupId = groupId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acceptGroupInvitation_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 2) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acceptGroupInvitation_args) acceptGroupInvitation_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'groupId', 'UTF8', None, ), # 2 ) class acceptGroupInvitation_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acceptGroupInvitation_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acceptGroupInvitation_result) acceptGroupInvitation_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class acceptGroupInvitationByTicket_args(object): """ Attributes: - reqSeq - groupId - ticketId """ def __init__(self, reqSeq=None, groupId=None, ticketId=None,): self.reqSeq = reqSeq self.groupId = groupId self.ticketId = ticketId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.ticketId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acceptGroupInvitationByTicket_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 2) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() if self.ticketId is not None: oprot.writeFieldBegin('ticketId', TType.STRING, 3) oprot.writeString(self.ticketId.encode('utf-8') if sys.version_info[0] == 2 else self.ticketId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acceptGroupInvitationByTicket_args) acceptGroupInvitationByTicket_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'groupId', 'UTF8', None, ), # 2 (3, TType.STRING, 'ticketId', 'UTF8', None, ), # 3 ) class acceptGroupInvitationByTicket_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acceptGroupInvitationByTicket_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acceptGroupInvitationByTicket_result) acceptGroupInvitationByTicket_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class acceptProximityMatches_args(object): """ Attributes: - sessionId - ids """ def __init__(self, sessionId=None, ids=None,): self.sessionId = sessionId self.ids = ids def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.SET: self.ids = set() (_etype335, _size332) = iprot.readSetBegin() for _i336 in range(_size332): _elem337 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.ids.add(_elem337) iprot.readSetEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acceptProximityMatches_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() if self.ids is not None: oprot.writeFieldBegin('ids', TType.SET, 3) oprot.writeSetBegin(TType.STRING, len(self.ids)) for iter338 in self.ids: oprot.writeString(iter338.encode('utf-8') if sys.version_info[0] == 2 else iter338) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acceptProximityMatches_args) acceptProximityMatches_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 (3, TType.SET, 'ids', (TType.STRING, 'UTF8', False), None, ), # 3 ) class acceptProximityMatches_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acceptProximityMatches_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acceptProximityMatches_result) acceptProximityMatches_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class acquireCallRoute_args(object): """ Attributes: - to """ def __init__(self, to=None,): self.to = to def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.to = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acquireCallRoute_args') if self.to is not None: oprot.writeFieldBegin('to', TType.STRING, 2) oprot.writeString(self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acquireCallRoute_args) acquireCallRoute_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'to', 'UTF8', None, ), # 2 ) class acquireCallRoute_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype342, _size339) = iprot.readListBegin() for _i343 in range(_size339): _elem344 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem344) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acquireCallRoute_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter345 in self.success: oprot.writeString(iter345.encode('utf-8') if sys.version_info[0] == 2 else iter345) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acquireCallRoute_result) acquireCallRoute_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class acquireCallTicket_args(object): """ Attributes: - to """ def __init__(self, to=None,): self.to = to def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.to = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acquireCallTicket_args') if self.to is not None: oprot.writeFieldBegin('to', TType.STRING, 2) oprot.writeString(self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acquireCallTicket_args) acquireCallTicket_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'to', 'UTF8', None, ), # 2 ) class acquireCallTicket_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acquireCallTicket_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acquireCallTicket_result) acquireCallTicket_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class acquireEncryptedAccessToken_args(object): """ Attributes: - featureType """ def __init__(self, featureType=None,): self.featureType = featureType def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.featureType = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acquireEncryptedAccessToken_args') if self.featureType is not None: oprot.writeFieldBegin('featureType', TType.I32, 2) oprot.writeI32(self.featureType) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acquireEncryptedAccessToken_args) acquireEncryptedAccessToken_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'featureType', None, None, ), # 2 ) class acquireEncryptedAccessToken_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('acquireEncryptedAccessToken_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(acquireEncryptedAccessToken_result) acquireEncryptedAccessToken_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class addSnsId_args(object): """ Attributes: - snsIdType - snsAccessToken """ def __init__(self, snsIdType=None, snsAccessToken=None,): self.snsIdType = snsIdType self.snsAccessToken = snsAccessToken def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.snsIdType = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.snsAccessToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('addSnsId_args') if self.snsIdType is not None: oprot.writeFieldBegin('snsIdType', TType.I32, 2) oprot.writeI32(self.snsIdType) oprot.writeFieldEnd() if self.snsAccessToken is not None: oprot.writeFieldBegin('snsAccessToken', TType.STRING, 3) oprot.writeString(self.snsAccessToken.encode('utf-8') if sys.version_info[0] == 2 else self.snsAccessToken) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(addSnsId_args) addSnsId_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'snsIdType', None, None, ), # 2 (3, TType.STRING, 'snsAccessToken', 'UTF8', None, ), # 3 ) class addSnsId_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('addSnsId_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(addSnsId_result) addSnsId_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class blockContact_args(object): """ Attributes: - reqSeq - id """ def __init__(self, reqSeq=None, id=None,): self.reqSeq = reqSeq self.id = id def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('blockContact_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 2) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(blockContact_args) blockContact_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'id', 'UTF8', None, ), # 2 ) class blockContact_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('blockContact_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(blockContact_result) blockContact_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class blockRecommendation_args(object): """ Attributes: - reqSeq - id """ def __init__(self, reqSeq=None, id=None,): self.reqSeq = reqSeq self.id = id def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('blockRecommendation_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 2) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(blockRecommendation_args) blockRecommendation_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'id', 'UTF8', None, ), # 2 ) class blockRecommendation_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('blockRecommendation_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(blockRecommendation_result) blockRecommendation_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class cancelGroupInvitation_args(object): """ Attributes: - reqSeq - groupId - contactIds """ def __init__(self, reqSeq=None, groupId=None, contactIds=None,): self.reqSeq = reqSeq self.groupId = groupId self.contactIds = contactIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.contactIds = [] (_etype349, _size346) = iprot.readListBegin() for _i350 in range(_size346): _elem351 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.contactIds.append(_elem351) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('cancelGroupInvitation_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 2) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() if self.contactIds is not None: oprot.writeFieldBegin('contactIds', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.contactIds)) for iter352 in self.contactIds: oprot.writeString(iter352.encode('utf-8') if sys.version_info[0] == 2 else iter352) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(cancelGroupInvitation_args) cancelGroupInvitation_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'groupId', 'UTF8', None, ), # 2 (3, TType.LIST, 'contactIds', (TType.STRING, 'UTF8', False), None, ), # 3 ) class cancelGroupInvitation_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('cancelGroupInvitation_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(cancelGroupInvitation_result) cancelGroupInvitation_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class changeVerificationMethod_args(object): """ Attributes: - sessionId - method """ def __init__(self, sessionId=None, method=None,): self.sessionId = sessionId self.method = method def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.method = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('changeVerificationMethod_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() if self.method is not None: oprot.writeFieldBegin('method', TType.I32, 3) oprot.writeI32(self.method) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(changeVerificationMethod_args) changeVerificationMethod_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 (3, TType.I32, 'method', None, None, ), # 3 ) class changeVerificationMethod_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = VerificationSessionData() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('changeVerificationMethod_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(changeVerificationMethod_result) changeVerificationMethod_result.thrift_spec = ( (0, TType.STRUCT, 'success', [VerificationSessionData, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class clearIdentityCredential_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('clearIdentityCredential_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(clearIdentityCredential_args) clearIdentityCredential_args.thrift_spec = ( ) class clearIdentityCredential_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('clearIdentityCredential_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(clearIdentityCredential_result) clearIdentityCredential_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class clearMessageBox_args(object): """ Attributes: - channelId - messageBoxId """ def __init__(self, channelId=None, messageBoxId=None,): self.channelId = channelId self.messageBoxId = messageBoxId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.messageBoxId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('clearMessageBox_args') if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 2) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.messageBoxId is not None: oprot.writeFieldBegin('messageBoxId', TType.STRING, 3) oprot.writeString(self.messageBoxId.encode('utf-8') if sys.version_info[0] == 2 else self.messageBoxId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(clearMessageBox_args) clearMessageBox_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'channelId', 'UTF8', None, ), # 2 (3, TType.STRING, 'messageBoxId', 'UTF8', None, ), # 3 ) class clearMessageBox_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('clearMessageBox_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(clearMessageBox_result) clearMessageBox_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class closeProximityMatch_args(object): """ Attributes: - sessionId """ def __init__(self, sessionId=None,): self.sessionId = sessionId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('closeProximityMatch_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(closeProximityMatch_args) closeProximityMatch_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 ) class closeProximityMatch_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('closeProximityMatch_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(closeProximityMatch_result) closeProximityMatch_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class commitSendMessage_args(object): """ Attributes: - seq - messageId - receiverMids """ def __init__(self, seq=None, messageId=None, receiverMids=None,): self.seq = seq self.messageId = messageId self.receiverMids = receiverMids def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.receiverMids = [] (_etype356, _size353) = iprot.readListBegin() for _i357 in range(_size353): _elem358 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.receiverMids.append(_elem358) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('commitSendMessage_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.messageId is not None: oprot.writeFieldBegin('messageId', TType.STRING, 2) oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId) oprot.writeFieldEnd() if self.receiverMids is not None: oprot.writeFieldBegin('receiverMids', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.receiverMids)) for iter359 in self.receiverMids: oprot.writeString(iter359.encode('utf-8') if sys.version_info[0] == 2 else iter359) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(commitSendMessage_args) commitSendMessage_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRING, 'messageId', 'UTF8', None, ), # 2 (3, TType.LIST, 'receiverMids', (TType.STRING, 'UTF8', False), None, ), # 3 ) class commitSendMessage_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype361, _vtype362, _size360) = iprot.readMapBegin() for _i364 in range(_size360): _key365 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val366 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key365] = _val366 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('commitSendMessage_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter367, viter368 in self.success.items(): oprot.writeString(kiter367.encode('utf-8') if sys.version_info[0] == 2 else kiter367) oprot.writeString(viter368.encode('utf-8') if sys.version_info[0] == 2 else viter368) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(commitSendMessage_result) commitSendMessage_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class commitSendMessages_args(object): """ Attributes: - seq - messageIds - receiverMids """ def __init__(self, seq=None, messageIds=None, receiverMids=None,): self.seq = seq self.messageIds = messageIds self.receiverMids = receiverMids def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.messageIds = [] (_etype372, _size369) = iprot.readListBegin() for _i373 in range(_size369): _elem374 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.messageIds.append(_elem374) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.receiverMids = [] (_etype378, _size375) = iprot.readListBegin() for _i379 in range(_size375): _elem380 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.receiverMids.append(_elem380) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('commitSendMessages_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.messageIds is not None: oprot.writeFieldBegin('messageIds', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.messageIds)) for iter381 in self.messageIds: oprot.writeString(iter381.encode('utf-8') if sys.version_info[0] == 2 else iter381) oprot.writeListEnd() oprot.writeFieldEnd() if self.receiverMids is not None: oprot.writeFieldBegin('receiverMids', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.receiverMids)) for iter382 in self.receiverMids: oprot.writeString(iter382.encode('utf-8') if sys.version_info[0] == 2 else iter382) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(commitSendMessages_args) commitSendMessages_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.LIST, 'messageIds', (TType.STRING, 'UTF8', False), None, ), # 2 (3, TType.LIST, 'receiverMids', (TType.STRING, 'UTF8', False), None, ), # 3 ) class commitSendMessages_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype384, _vtype385, _size383) = iprot.readMapBegin() for _i387 in range(_size383): _key388 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val389 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key388] = _val389 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('commitSendMessages_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter390, viter391 in self.success.items(): oprot.writeString(kiter390.encode('utf-8') if sys.version_info[0] == 2 else kiter390) oprot.writeString(viter391.encode('utf-8') if sys.version_info[0] == 2 else viter391) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(commitSendMessages_result) commitSendMessages_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class commitUpdateProfile_args(object): """ Attributes: - seq - attrs - receiverMids """ def __init__(self, seq=None, attrs=None, receiverMids=None,): self.seq = seq self.attrs = attrs self.receiverMids = receiverMids def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.attrs = [] (_etype395, _size392) = iprot.readListBegin() for _i396 in range(_size392): _elem397 = iprot.readI32() self.attrs.append(_elem397) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.receiverMids = [] (_etype401, _size398) = iprot.readListBegin() for _i402 in range(_size398): _elem403 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.receiverMids.append(_elem403) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('commitUpdateProfile_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.attrs is not None: oprot.writeFieldBegin('attrs', TType.LIST, 2) oprot.writeListBegin(TType.I32, len(self.attrs)) for iter404 in self.attrs: oprot.writeI32(iter404) oprot.writeListEnd() oprot.writeFieldEnd() if self.receiverMids is not None: oprot.writeFieldBegin('receiverMids', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.receiverMids)) for iter405 in self.receiverMids: oprot.writeString(iter405.encode('utf-8') if sys.version_info[0] == 2 else iter405) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(commitUpdateProfile_args) commitUpdateProfile_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.LIST, 'attrs', (TType.I32, None, False), None, ), # 2 (3, TType.LIST, 'receiverMids', (TType.STRING, 'UTF8', False), None, ), # 3 ) class commitUpdateProfile_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype407, _vtype408, _size406) = iprot.readMapBegin() for _i410 in range(_size406): _key411 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val412 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key411] = _val412 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('commitUpdateProfile_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter413, viter414 in self.success.items(): oprot.writeString(kiter413.encode('utf-8') if sys.version_info[0] == 2 else kiter413) oprot.writeString(viter414.encode('utf-8') if sys.version_info[0] == 2 else viter414) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(commitUpdateProfile_result) commitUpdateProfile_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class confirmEmail_args(object): """ Attributes: - verifier - pinCode """ def __init__(self, verifier=None, pinCode=None,): self.verifier = verifier self.pinCode = pinCode def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.pinCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('confirmEmail_args') if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 2) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() if self.pinCode is not None: oprot.writeFieldBegin('pinCode', TType.STRING, 3) oprot.writeString(self.pinCode.encode('utf-8') if sys.version_info[0] == 2 else self.pinCode) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(confirmEmail_args) confirmEmail_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'verifier', 'UTF8', None, ), # 2 (3, TType.STRING, 'pinCode', 'UTF8', None, ), # 3 ) class confirmEmail_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('confirmEmail_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(confirmEmail_result) confirmEmail_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class createGroup_args(object): """ Attributes: - seq - name - contactIds """ def __init__(self, seq=None, name=None, contactIds=None,): self.seq = seq self.name = name self.contactIds = contactIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.contactIds = [] (_etype418, _size415) = iprot.readListBegin() for _i419 in range(_size415): _elem420 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.contactIds.append(_elem420) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('createGroup_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 2) oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.contactIds is not None: oprot.writeFieldBegin('contactIds', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.contactIds)) for iter421 in self.contactIds: oprot.writeString(iter421.encode('utf-8') if sys.version_info[0] == 2 else iter421) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(createGroup_args) createGroup_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRING, 'name', 'UTF8', None, ), # 2 (3, TType.LIST, 'contactIds', (TType.STRING, 'UTF8', False), None, ), # 3 ) class createGroup_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Group() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('createGroup_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(createGroup_result) createGroup_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Group, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class createQrcodeBase64Image_args(object): """ Attributes: - url - characterSet - imageSize - x - y - width - height """ def __init__(self, url=None, characterSet=None, imageSize=None, x=None, y=None, width=None, height=None,): self.url = url self.characterSet = characterSet self.imageSize = imageSize self.x = x self.y = y self.width = width self.height = height def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.url = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.characterSet = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.imageSize = iprot.readI32() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.x = iprot.readI32() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.I32: self.y = iprot.readI32() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.I32: self.width = iprot.readI32() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.I32: self.height = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('createQrcodeBase64Image_args') if self.url is not None: oprot.writeFieldBegin('url', TType.STRING, 2) oprot.writeString(self.url.encode('utf-8') if sys.version_info[0] == 2 else self.url) oprot.writeFieldEnd() if self.characterSet is not None: oprot.writeFieldBegin('characterSet', TType.STRING, 3) oprot.writeString(self.characterSet.encode('utf-8') if sys.version_info[0] == 2 else self.characterSet) oprot.writeFieldEnd() if self.imageSize is not None: oprot.writeFieldBegin('imageSize', TType.I32, 4) oprot.writeI32(self.imageSize) oprot.writeFieldEnd() if self.x is not None: oprot.writeFieldBegin('x', TType.I32, 5) oprot.writeI32(self.x) oprot.writeFieldEnd() if self.y is not None: oprot.writeFieldBegin('y', TType.I32, 6) oprot.writeI32(self.y) oprot.writeFieldEnd() if self.width is not None: oprot.writeFieldBegin('width', TType.I32, 7) oprot.writeI32(self.width) oprot.writeFieldEnd() if self.height is not None: oprot.writeFieldBegin('height', TType.I32, 8) oprot.writeI32(self.height) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(createQrcodeBase64Image_args) createQrcodeBase64Image_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'url', 'UTF8', None, ), # 2 (3, TType.STRING, 'characterSet', 'UTF8', None, ), # 3 (4, TType.I32, 'imageSize', None, None, ), # 4 (5, TType.I32, 'x', None, None, ), # 5 (6, TType.I32, 'y', None, None, ), # 6 (7, TType.I32, 'width', None, None, ), # 7 (8, TType.I32, 'height', None, None, ), # 8 ) class createQrcodeBase64Image_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('createQrcodeBase64Image_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(createQrcodeBase64Image_result) createQrcodeBase64Image_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class createRoom_args(object): """ Attributes: - reqSeq - contactIds """ def __init__(self, reqSeq=None, contactIds=None,): self.reqSeq = reqSeq self.contactIds = contactIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.contactIds = [] (_etype425, _size422) = iprot.readListBegin() for _i426 in range(_size422): _elem427 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.contactIds.append(_elem427) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('createRoom_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.contactIds is not None: oprot.writeFieldBegin('contactIds', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.contactIds)) for iter428 in self.contactIds: oprot.writeString(iter428.encode('utf-8') if sys.version_info[0] == 2 else iter428) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(createRoom_args) createRoom_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.LIST, 'contactIds', (TType.STRING, 'UTF8', False), None, ), # 2 ) class createRoom_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Room() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('createRoom_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(createRoom_result) createRoom_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Room, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class createSession_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('createSession_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(createSession_args) createSession_args.thrift_spec = ( ) class createSession_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('createSession_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(createSession_result) createSession_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class fetchAnnouncements_args(object): """ Attributes: - lastFetchedIndex """ def __init__(self, lastFetchedIndex=None,): self.lastFetchedIndex = lastFetchedIndex def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.lastFetchedIndex = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('fetchAnnouncements_args') if self.lastFetchedIndex is not None: oprot.writeFieldBegin('lastFetchedIndex', TType.I32, 2) oprot.writeI32(self.lastFetchedIndex) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(fetchAnnouncements_args) fetchAnnouncements_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'lastFetchedIndex', None, None, ), # 2 ) class fetchAnnouncements_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype432, _size429) = iprot.readListBegin() for _i433 in range(_size429): _elem434 = Announcement() _elem434.read(iprot) self.success.append(_elem434) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('fetchAnnouncements_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter435 in self.success: iter435.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(fetchAnnouncements_result) fetchAnnouncements_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Announcement, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class fetchMessages_args(object): """ Attributes: - localTs - count """ def __init__(self, localTs=None, count=None,): self.localTs = localTs self.count = count def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.localTs = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.count = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('fetchMessages_args') if self.localTs is not None: oprot.writeFieldBegin('localTs', TType.I64, 2) oprot.writeI64(self.localTs) oprot.writeFieldEnd() if self.count is not None: oprot.writeFieldBegin('count', TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(fetchMessages_args) fetchMessages_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'localTs', None, None, ), # 2 (3, TType.I32, 'count', None, None, ), # 3 ) class fetchMessages_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype439, _size436) = iprot.readListBegin() for _i440 in range(_size436): _elem441 = Message() _elem441.read(iprot) self.success.append(_elem441) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('fetchMessages_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter442 in self.success: iter442.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(fetchMessages_result) fetchMessages_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Message, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class fetchOperations_args(object): """ Attributes: - localRev - count """ def __init__(self, localRev=None, count=None,): self.localRev = localRev self.count = count def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.localRev = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.count = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('fetchOperations_args') if self.localRev is not None: oprot.writeFieldBegin('localRev', TType.I64, 2) oprot.writeI64(self.localRev) oprot.writeFieldEnd() if self.count is not None: oprot.writeFieldBegin('count', TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(fetchOperations_args) fetchOperations_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'localRev', None, None, ), # 2 (3, TType.I32, 'count', None, None, ), # 3 ) class fetchOperations_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype446, _size443) = iprot.readListBegin() for _i447 in range(_size443): _elem448 = Operation() _elem448.read(iprot) self.success.append(_elem448) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('fetchOperations_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter449 in self.success: iter449.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(fetchOperations_result) fetchOperations_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Operation, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class fetchOps_args(object): """ Attributes: - localRev - count - globalRev - individualRev """ def __init__(self, localRev=None, count=None, globalRev=None, individualRev=None,): self.localRev = localRev self.count = count self.globalRev = globalRev self.individualRev = individualRev def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.localRev = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.count = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I64: self.globalRev = iprot.readI64() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I64: self.individualRev = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('fetchOps_args') if self.localRev is not None: oprot.writeFieldBegin('localRev', TType.I64, 2) oprot.writeI64(self.localRev) oprot.writeFieldEnd() if self.count is not None: oprot.writeFieldBegin('count', TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() if self.globalRev is not None: oprot.writeFieldBegin('globalRev', TType.I64, 4) oprot.writeI64(self.globalRev) oprot.writeFieldEnd() if self.individualRev is not None: oprot.writeFieldBegin('individualRev', TType.I64, 5) oprot.writeI64(self.individualRev) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(fetchOps_args) fetchOps_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'localRev', None, None, ), # 2 (3, TType.I32, 'count', None, None, ), # 3 (4, TType.I64, 'globalRev', None, None, ), # 4 (5, TType.I64, 'individualRev', None, None, ), # 5 ) class fetchOps_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype453, _size450) = iprot.readListBegin() for _i454 in range(_size450): _elem455 = Operation() _elem455.read(iprot) self.success.append(_elem455) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('fetchOps_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter456 in self.success: iter456.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(fetchOps_result) fetchOps_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Operation, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findAndAddContactsByEmail_args(object): """ Attributes: - reqSeq - emails """ def __init__(self, reqSeq=None, emails=None,): self.reqSeq = reqSeq self.emails = emails def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.SET: self.emails = set() (_etype460, _size457) = iprot.readSetBegin() for _i461 in range(_size457): _elem462 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.emails.add(_elem462) iprot.readSetEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findAndAddContactsByEmail_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.emails is not None: oprot.writeFieldBegin('emails', TType.SET, 2) oprot.writeSetBegin(TType.STRING, len(self.emails)) for iter463 in self.emails: oprot.writeString(iter463.encode('utf-8') if sys.version_info[0] == 2 else iter463) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findAndAddContactsByEmail_args) findAndAddContactsByEmail_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.SET, 'emails', (TType.STRING, 'UTF8', False), None, ), # 2 ) class findAndAddContactsByEmail_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype465, _vtype466, _size464) = iprot.readMapBegin() for _i468 in range(_size464): _key469 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val470 = Contact() _val470.read(iprot) self.success[_key469] = _val470 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findAndAddContactsByEmail_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) for kiter471, viter472 in self.success.items(): oprot.writeString(kiter471.encode('utf-8') if sys.version_info[0] == 2 else kiter471) viter472.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findAndAddContactsByEmail_result) findAndAddContactsByEmail_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRUCT, [Contact, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findAndAddContactsByMid_args(object): """ Attributes: - reqSeq - mid """ def __init__(self, reqSeq=None, mid=None,): self.reqSeq = reqSeq self.mid = mid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findAndAddContactsByMid_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 2) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findAndAddContactsByMid_args) findAndAddContactsByMid_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 ) class findAndAddContactsByMid_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype474, _vtype475, _size473) = iprot.readMapBegin() for _i477 in range(_size473): _key478 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val479 = Contact() _val479.read(iprot) self.success[_key478] = _val479 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findAndAddContactsByMid_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) for kiter480, viter481 in self.success.items(): oprot.writeString(kiter480.encode('utf-8') if sys.version_info[0] == 2 else kiter480) viter481.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findAndAddContactsByMid_result) findAndAddContactsByMid_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRUCT, [Contact, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findAndAddContactsByPhone_args(object): """ Attributes: - reqSeq - phones """ def __init__(self, reqSeq=None, phones=None,): self.reqSeq = reqSeq self.phones = phones def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.SET: self.phones = set() (_etype485, _size482) = iprot.readSetBegin() for _i486 in range(_size482): _elem487 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.phones.add(_elem487) iprot.readSetEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findAndAddContactsByPhone_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.phones is not None: oprot.writeFieldBegin('phones', TType.SET, 2) oprot.writeSetBegin(TType.STRING, len(self.phones)) for iter488 in self.phones: oprot.writeString(iter488.encode('utf-8') if sys.version_info[0] == 2 else iter488) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findAndAddContactsByPhone_args) findAndAddContactsByPhone_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.SET, 'phones', (TType.STRING, 'UTF8', False), None, ), # 2 ) class findAndAddContactsByPhone_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype490, _vtype491, _size489) = iprot.readMapBegin() for _i493 in range(_size489): _key494 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val495 = Contact() _val495.read(iprot) self.success[_key494] = _val495 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findAndAddContactsByPhone_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) for kiter496, viter497 in self.success.items(): oprot.writeString(kiter496.encode('utf-8') if sys.version_info[0] == 2 else kiter496) viter497.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findAndAddContactsByPhone_result) findAndAddContactsByPhone_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRUCT, [Contact, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findAndAddContactsByUserid_args(object): """ Attributes: - reqSeq - userid """ def __init__(self, reqSeq=None, userid=None,): self.reqSeq = reqSeq self.userid = userid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.userid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findAndAddContactsByUserid_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.userid is not None: oprot.writeFieldBegin('userid', TType.STRING, 2) oprot.writeString(self.userid.encode('utf-8') if sys.version_info[0] == 2 else self.userid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findAndAddContactsByUserid_args) findAndAddContactsByUserid_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'userid', 'UTF8', None, ), # 2 ) class findAndAddContactsByUserid_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype499, _vtype500, _size498) = iprot.readMapBegin() for _i502 in range(_size498): _key503 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val504 = Contact() _val504.read(iprot) self.success[_key503] = _val504 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findAndAddContactsByUserid_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) for kiter505, viter506 in self.success.items(): oprot.writeString(kiter505.encode('utf-8') if sys.version_info[0] == 2 else kiter505) viter506.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findAndAddContactsByUserid_result) findAndAddContactsByUserid_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRUCT, [Contact, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findContactByUserid_args(object): """ Attributes: - userid """ def __init__(self, userid=None,): self.userid = userid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.userid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findContactByUserid_args') if self.userid is not None: oprot.writeFieldBegin('userid', TType.STRING, 2) oprot.writeString(self.userid.encode('utf-8') if sys.version_info[0] == 2 else self.userid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findContactByUserid_args) findContactByUserid_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'userid', 'UTF8', None, ), # 2 ) class findContactByUserid_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Contact() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findContactByUserid_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findContactByUserid_result) findContactByUserid_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Contact, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findContactByUserTicket_args(object): """ Attributes: - ticketId """ def __init__(self, ticketId=None,): self.ticketId = ticketId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.ticketId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findContactByUserTicket_args') if self.ticketId is not None: oprot.writeFieldBegin('ticketId', TType.STRING, 2) oprot.writeString(self.ticketId.encode('utf-8') if sys.version_info[0] == 2 else self.ticketId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findContactByUserTicket_args) findContactByUserTicket_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'ticketId', 'UTF8', None, ), # 2 ) class findContactByUserTicket_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Contact() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findContactByUserTicket_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findContactByUserTicket_result) findContactByUserTicket_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Contact, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findContactsByEmail_args(object): """ Attributes: - emails """ def __init__(self, emails=None,): self.emails = emails def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.SET: self.emails = set() (_etype510, _size507) = iprot.readSetBegin() for _i511 in range(_size507): _elem512 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.emails.add(_elem512) iprot.readSetEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findContactsByEmail_args') if self.emails is not None: oprot.writeFieldBegin('emails', TType.SET, 2) oprot.writeSetBegin(TType.STRING, len(self.emails)) for iter513 in self.emails: oprot.writeString(iter513.encode('utf-8') if sys.version_info[0] == 2 else iter513) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findContactsByEmail_args) findContactsByEmail_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.SET, 'emails', (TType.STRING, 'UTF8', False), None, ), # 2 ) class findContactsByEmail_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype515, _vtype516, _size514) = iprot.readMapBegin() for _i518 in range(_size514): _key519 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val520 = Contact() _val520.read(iprot) self.success[_key519] = _val520 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findContactsByEmail_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) for kiter521, viter522 in self.success.items(): oprot.writeString(kiter521.encode('utf-8') if sys.version_info[0] == 2 else kiter521) viter522.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findContactsByEmail_result) findContactsByEmail_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRUCT, [Contact, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findContactsByPhone_args(object): """ Attributes: - phones """ def __init__(self, phones=None,): self.phones = phones def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.SET: self.phones = set() (_etype526, _size523) = iprot.readSetBegin() for _i527 in range(_size523): _elem528 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.phones.add(_elem528) iprot.readSetEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findContactsByPhone_args') if self.phones is not None: oprot.writeFieldBegin('phones', TType.SET, 2) oprot.writeSetBegin(TType.STRING, len(self.phones)) for iter529 in self.phones: oprot.writeString(iter529.encode('utf-8') if sys.version_info[0] == 2 else iter529) oprot.writeSetEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findContactsByPhone_args) findContactsByPhone_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.SET, 'phones', (TType.STRING, 'UTF8', False), None, ), # 2 ) class findContactsByPhone_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype531, _vtype532, _size530) = iprot.readMapBegin() for _i534 in range(_size530): _key535 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val536 = Contact() _val536.read(iprot) self.success[_key535] = _val536 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findContactsByPhone_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) for kiter537, viter538 in self.success.items(): oprot.writeString(kiter537.encode('utf-8') if sys.version_info[0] == 2 else kiter537) viter538.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findContactsByPhone_result) findContactsByPhone_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRUCT, [Contact, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findSnsIdUserStatus_args(object): """ Attributes: - snsIdType - snsAccessToken - udidHash """ def __init__(self, snsIdType=None, snsAccessToken=None, udidHash=None,): self.snsIdType = snsIdType self.snsAccessToken = snsAccessToken self.udidHash = udidHash def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.snsIdType = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.snsAccessToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findSnsIdUserStatus_args') if self.snsIdType is not None: oprot.writeFieldBegin('snsIdType', TType.I32, 2) oprot.writeI32(self.snsIdType) oprot.writeFieldEnd() if self.snsAccessToken is not None: oprot.writeFieldBegin('snsAccessToken', TType.STRING, 3) oprot.writeString(self.snsAccessToken.encode('utf-8') if sys.version_info[0] == 2 else self.snsAccessToken) oprot.writeFieldEnd() if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 4) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findSnsIdUserStatus_args) findSnsIdUserStatus_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'snsIdType', None, None, ), # 2 (3, TType.STRING, 'snsAccessToken', 'UTF8', None, ), # 3 (4, TType.STRING, 'udidHash', 'UTF8', None, ), # 4 ) class findSnsIdUserStatus_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = SnsIdUserStatus() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findSnsIdUserStatus_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findSnsIdUserStatus_result) findSnsIdUserStatus_result.thrift_spec = ( (0, TType.STRUCT, 'success', [SnsIdUserStatus, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class finishUpdateVerification_args(object): """ Attributes: - sessionId """ def __init__(self, sessionId=None,): self.sessionId = sessionId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('finishUpdateVerification_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(finishUpdateVerification_args) finishUpdateVerification_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 ) class finishUpdateVerification_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('finishUpdateVerification_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(finishUpdateVerification_result) finishUpdateVerification_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class generateUserTicket_args(object): """ Attributes: - expirationTime - maxUseCount """ def __init__(self, expirationTime=None, maxUseCount=None,): self.expirationTime = expirationTime self.maxUseCount = maxUseCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 3: if ftype == TType.I64: self.expirationTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.maxUseCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('generateUserTicket_args') if self.expirationTime is not None: oprot.writeFieldBegin('expirationTime', TType.I64, 3) oprot.writeI64(self.expirationTime) oprot.writeFieldEnd() if self.maxUseCount is not None: oprot.writeFieldBegin('maxUseCount', TType.I32, 4) oprot.writeI32(self.maxUseCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(generateUserTicket_args) generateUserTicket_args.thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.I64, 'expirationTime', None, None, ), # 3 (4, TType.I32, 'maxUseCount', None, None, ), # 4 ) class generateUserTicket_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Ticket() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('generateUserTicket_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(generateUserTicket_result) generateUserTicket_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Ticket, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getAcceptedProximityMatches_args(object): """ Attributes: - sessionId """ def __init__(self, sessionId=None,): self.sessionId = sessionId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getAcceptedProximityMatches_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getAcceptedProximityMatches_args) getAcceptedProximityMatches_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 ) class getAcceptedProximityMatches_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.SET: self.success = set() (_etype542, _size539) = iprot.readSetBegin() for _i543 in range(_size539): _elem544 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.add(_elem544) iprot.readSetEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getAcceptedProximityMatches_result') if self.success is not None: oprot.writeFieldBegin('success', TType.SET, 0) oprot.writeSetBegin(TType.STRING, len(self.success)) for iter545 in self.success: oprot.writeString(iter545.encode('utf-8') if sys.version_info[0] == 2 else iter545) oprot.writeSetEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getAcceptedProximityMatches_result) getAcceptedProximityMatches_result.thrift_spec = ( (0, TType.SET, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getActiveBuddySubscriberIds_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getActiveBuddySubscriberIds_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getActiveBuddySubscriberIds_args) getActiveBuddySubscriberIds_args.thrift_spec = ( ) class getActiveBuddySubscriberIds_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype549, _size546) = iprot.readListBegin() for _i550 in range(_size546): _elem551 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem551) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getActiveBuddySubscriberIds_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter552 in self.success: oprot.writeString(iter552.encode('utf-8') if sys.version_info[0] == 2 else iter552) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getActiveBuddySubscriberIds_result) getActiveBuddySubscriberIds_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getAllContactIds_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getAllContactIds_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getAllContactIds_args) getAllContactIds_args.thrift_spec = ( ) class getAllContactIds_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype556, _size553) = iprot.readListBegin() for _i557 in range(_size553): _elem558 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem558) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getAllContactIds_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter559 in self.success: oprot.writeString(iter559.encode('utf-8') if sys.version_info[0] == 2 else iter559) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getAllContactIds_result) getAllContactIds_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getAuthQrcode_args(object): """ Attributes: - keepLoggedIn - systemName """ def __init__(self, keepLoggedIn=None, systemName=None,): self.keepLoggedIn = keepLoggedIn self.systemName = systemName def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.BOOL: self.keepLoggedIn = iprot.readBool() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.systemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getAuthQrcode_args') if self.keepLoggedIn is not None: oprot.writeFieldBegin('keepLoggedIn', TType.BOOL, 2) oprot.writeBool(self.keepLoggedIn) oprot.writeFieldEnd() if self.systemName is not None: oprot.writeFieldBegin('systemName', TType.STRING, 3) oprot.writeString(self.systemName.encode('utf-8') if sys.version_info[0] == 2 else self.systemName) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getAuthQrcode_args) getAuthQrcode_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.BOOL, 'keepLoggedIn', None, None, ), # 2 (3, TType.STRING, 'systemName', 'UTF8', None, ), # 3 ) class getAuthQrcode_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = AuthQrcode() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getAuthQrcode_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getAuthQrcode_result) getAuthQrcode_result.thrift_spec = ( (0, TType.STRUCT, 'success', [AuthQrcode, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getBlockedContactIds_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBlockedContactIds_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBlockedContactIds_args) getBlockedContactIds_args.thrift_spec = ( ) class getBlockedContactIds_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype563, _size560) = iprot.readListBegin() for _i564 in range(_size560): _elem565 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem565) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBlockedContactIds_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter566 in self.success: oprot.writeString(iter566.encode('utf-8') if sys.version_info[0] == 2 else iter566) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBlockedContactIds_result) getBlockedContactIds_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getBlockedContactIdsByRange_args(object): """ Attributes: - start - count """ def __init__(self, start=None, count=None,): self.start = start self.count = count def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.start = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.count = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBlockedContactIdsByRange_args') if self.start is not None: oprot.writeFieldBegin('start', TType.I32, 2) oprot.writeI32(self.start) oprot.writeFieldEnd() if self.count is not None: oprot.writeFieldBegin('count', TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBlockedContactIdsByRange_args) getBlockedContactIdsByRange_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'start', None, None, ), # 2 (3, TType.I32, 'count', None, None, ), # 3 ) class getBlockedContactIdsByRange_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype570, _size567) = iprot.readListBegin() for _i571 in range(_size567): _elem572 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem572) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBlockedContactIdsByRange_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter573 in self.success: oprot.writeString(iter573.encode('utf-8') if sys.version_info[0] == 2 else iter573) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBlockedContactIdsByRange_result) getBlockedContactIdsByRange_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getBlockedRecommendationIds_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBlockedRecommendationIds_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBlockedRecommendationIds_args) getBlockedRecommendationIds_args.thrift_spec = ( ) class getBlockedRecommendationIds_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype577, _size574) = iprot.readListBegin() for _i578 in range(_size574): _elem579 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem579) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBlockedRecommendationIds_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter580 in self.success: oprot.writeString(iter580.encode('utf-8') if sys.version_info[0] == 2 else iter580) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBlockedRecommendationIds_result) getBlockedRecommendationIds_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getBuddyBlockerIds_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBuddyBlockerIds_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBuddyBlockerIds_args) getBuddyBlockerIds_args.thrift_spec = ( ) class getBuddyBlockerIds_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype584, _size581) = iprot.readListBegin() for _i585 in range(_size581): _elem586 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem586) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBuddyBlockerIds_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter587 in self.success: oprot.writeString(iter587.encode('utf-8') if sys.version_info[0] == 2 else iter587) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBuddyBlockerIds_result) getBuddyBlockerIds_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getBuddyLocation_args(object): """ Attributes: - mid - index """ def __init__(self, mid=None, index=None,): self.mid = mid self.index = index def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.index = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBuddyLocation_args') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 2) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.index is not None: oprot.writeFieldBegin('index', TType.I32, 3) oprot.writeI32(self.index) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBuddyLocation_args) getBuddyLocation_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 (3, TType.I32, 'index', None, None, ), # 3 ) class getBuddyLocation_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Geolocation() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getBuddyLocation_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getBuddyLocation_result) getBuddyLocation_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Geolocation, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getCompactContactsModifiedSince_args(object): """ Attributes: - timestamp """ def __init__(self, timestamp=None,): self.timestamp = timestamp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.timestamp = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getCompactContactsModifiedSince_args') if self.timestamp is not None: oprot.writeFieldBegin('timestamp', TType.I64, 2) oprot.writeI64(self.timestamp) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getCompactContactsModifiedSince_args) getCompactContactsModifiedSince_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'timestamp', None, None, ), # 2 ) class getCompactContactsModifiedSince_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype591, _size588) = iprot.readListBegin() for _i592 in range(_size588): _elem593 = CompactContact() _elem593.read(iprot) self.success.append(_elem593) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getCompactContactsModifiedSince_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter594 in self.success: iter594.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getCompactContactsModifiedSince_result) getCompactContactsModifiedSince_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [CompactContact, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getCompactGroup_args(object): """ Attributes: - groupId """ def __init__(self, groupId=None,): self.groupId = groupId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getCompactGroup_args') if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 2) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getCompactGroup_args) getCompactGroup_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'groupId', 'UTF8', None, ), # 2 ) class getCompactGroup_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Group() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getCompactGroup_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getCompactGroup_result) getCompactGroup_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Group, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getCompactRoom_args(object): """ Attributes: - roomId """ def __init__(self, roomId=None,): self.roomId = roomId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.roomId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getCompactRoom_args') if self.roomId is not None: oprot.writeFieldBegin('roomId', TType.STRING, 2) oprot.writeString(self.roomId.encode('utf-8') if sys.version_info[0] == 2 else self.roomId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getCompactRoom_args) getCompactRoom_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'roomId', 'UTF8', None, ), # 2 ) class getCompactRoom_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Room() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getCompactRoom_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getCompactRoom_result) getCompactRoom_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Room, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getContact_args(object): """ Attributes: - id """ def __init__(self, id=None,): self.id = id def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getContact_args') if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 2) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getContact_args) getContact_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'id', 'UTF8', None, ), # 2 ) class getContact_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Contact() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getContact_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getContact_result) getContact_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Contact, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getContacts_args(object): """ Attributes: - ids """ def __init__(self, ids=None,): self.ids = ids def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.LIST: self.ids = [] (_etype598, _size595) = iprot.readListBegin() for _i599 in range(_size595): _elem600 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.ids.append(_elem600) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getContacts_args') if self.ids is not None: oprot.writeFieldBegin('ids', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.ids)) for iter601 in self.ids: oprot.writeString(iter601.encode('utf-8') if sys.version_info[0] == 2 else iter601) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getContacts_args) getContacts_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.LIST, 'ids', (TType.STRING, 'UTF8', False), None, ), # 2 ) class getContacts_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype605, _size602) = iprot.readListBegin() for _i606 in range(_size602): _elem607 = Contact() _elem607.read(iprot) self.success.append(_elem607) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getContacts_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter608 in self.success: iter608.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getContacts_result) getContacts_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Contact, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getCountryWithRequestIp_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getCountryWithRequestIp_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getCountryWithRequestIp_args) getCountryWithRequestIp_args.thrift_spec = ( ) class getCountryWithRequestIp_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getCountryWithRequestIp_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getCountryWithRequestIp_result) getCountryWithRequestIp_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getFavoriteMids_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getFavoriteMids_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getFavoriteMids_args) getFavoriteMids_args.thrift_spec = ( ) class getFavoriteMids_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype612, _size609) = iprot.readListBegin() for _i613 in range(_size609): _elem614 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem614) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getFavoriteMids_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter615 in self.success: oprot.writeString(iter615.encode('utf-8') if sys.version_info[0] == 2 else iter615) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getFavoriteMids_result) getFavoriteMids_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getGroup_args(object): """ Attributes: - groupId """ def __init__(self, groupId=None,): self.groupId = groupId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getGroup_args') if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 2) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getGroup_args) getGroup_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'groupId', 'UTF8', None, ), # 2 ) class getGroup_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Group() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getGroup_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getGroup_result) getGroup_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Group, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getGroupIdsInvited_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getGroupIdsInvited_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getGroupIdsInvited_args) getGroupIdsInvited_args.thrift_spec = ( ) class getGroupIdsInvited_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype619, _size616) = iprot.readListBegin() for _i620 in range(_size616): _elem621 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem621) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getGroupIdsInvited_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter622 in self.success: oprot.writeString(iter622.encode('utf-8') if sys.version_info[0] == 2 else iter622) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getGroupIdsInvited_result) getGroupIdsInvited_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getGroupIdsJoined_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getGroupIdsJoined_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getGroupIdsJoined_args) getGroupIdsJoined_args.thrift_spec = ( ) class getGroupIdsJoined_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype626, _size623) = iprot.readListBegin() for _i627 in range(_size623): _elem628 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem628) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getGroupIdsJoined_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter629 in self.success: oprot.writeString(iter629.encode('utf-8') if sys.version_info[0] == 2 else iter629) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getGroupIdsJoined_result) getGroupIdsJoined_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getGroups_args(object): """ Attributes: - groupIds """ def __init__(self, groupIds=None,): self.groupIds = groupIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.LIST: self.groupIds = [] (_etype633, _size630) = iprot.readListBegin() for _i634 in range(_size630): _elem635 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.groupIds.append(_elem635) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getGroups_args') if self.groupIds is not None: oprot.writeFieldBegin('groupIds', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.groupIds)) for iter636 in self.groupIds: oprot.writeString(iter636.encode('utf-8') if sys.version_info[0] == 2 else iter636) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getGroups_args) getGroups_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.LIST, 'groupIds', (TType.STRING, 'UTF8', False), None, ), # 2 ) class getGroups_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype640, _size637) = iprot.readListBegin() for _i641 in range(_size637): _elem642 = Group() _elem642.read(iprot) self.success.append(_elem642) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getGroups_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter643 in self.success: iter643.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getGroups_result) getGroups_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Group, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getHiddenContactMids_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getHiddenContactMids_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getHiddenContactMids_args) getHiddenContactMids_args.thrift_spec = ( ) class getHiddenContactMids_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype647, _size644) = iprot.readListBegin() for _i648 in range(_size644): _elem649 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem649) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getHiddenContactMids_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter650 in self.success: oprot.writeString(iter650.encode('utf-8') if sys.version_info[0] == 2 else iter650) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getHiddenContactMids_result) getHiddenContactMids_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getIdentityIdentifier_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getIdentityIdentifier_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getIdentityIdentifier_args) getIdentityIdentifier_args.thrift_spec = ( ) class getIdentityIdentifier_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getIdentityIdentifier_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getIdentityIdentifier_result) getIdentityIdentifier_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getLastAnnouncementIndex_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getLastAnnouncementIndex_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getLastAnnouncementIndex_args) getLastAnnouncementIndex_args.thrift_spec = ( ) class getLastAnnouncementIndex_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.I32: self.success = iprot.readI32() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getLastAnnouncementIndex_result') if self.success is not None: oprot.writeFieldBegin('success', TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getLastAnnouncementIndex_result) getLastAnnouncementIndex_result.thrift_spec = ( (0, TType.I32, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getLastOpRevision_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getLastOpRevision_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getLastOpRevision_args) getLastOpRevision_args.thrift_spec = ( ) class getLastOpRevision_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.I64: self.success = iprot.readI64() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getLastOpRevision_result') if self.success is not None: oprot.writeFieldBegin('success', TType.I64, 0) oprot.writeI64(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getLastOpRevision_result) getLastOpRevision_result.thrift_spec = ( (0, TType.I64, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getMessageBox_args(object): """ Attributes: - channelId - messageBoxId - lastMessagesCount """ def __init__(self, channelId=None, messageBoxId=None, lastMessagesCount=None,): self.channelId = channelId self.messageBoxId = messageBoxId self.lastMessagesCount = lastMessagesCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.messageBoxId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.lastMessagesCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBox_args') if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 2) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.messageBoxId is not None: oprot.writeFieldBegin('messageBoxId', TType.STRING, 3) oprot.writeString(self.messageBoxId.encode('utf-8') if sys.version_info[0] == 2 else self.messageBoxId) oprot.writeFieldEnd() if self.lastMessagesCount is not None: oprot.writeFieldBegin('lastMessagesCount', TType.I32, 4) oprot.writeI32(self.lastMessagesCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBox_args) getMessageBox_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'channelId', 'UTF8', None, ), # 2 (3, TType.STRING, 'messageBoxId', 'UTF8', None, ), # 3 (4, TType.I32, 'lastMessagesCount', None, None, ), # 4 ) class getMessageBox_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = TMessageBox() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBox_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBox_result) getMessageBox_result.thrift_spec = ( (0, TType.STRUCT, 'success', [TMessageBox, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getMessageBoxCompactWrapUp_args(object): """ Attributes: - mid """ def __init__(self, mid=None,): self.mid = mid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxCompactWrapUp_args') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 2) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxCompactWrapUp_args) getMessageBoxCompactWrapUp_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 ) class getMessageBoxCompactWrapUp_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = TMessageBoxWrapUp() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxCompactWrapUp_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxCompactWrapUp_result) getMessageBoxCompactWrapUp_result.thrift_spec = ( (0, TType.STRUCT, 'success', [TMessageBoxWrapUp, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getMessageBoxCompactWrapUpList_args(object): """ Attributes: - start - messageBoxCount """ def __init__(self, start=None, messageBoxCount=None,): self.start = start self.messageBoxCount = messageBoxCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.start = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.messageBoxCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxCompactWrapUpList_args') if self.start is not None: oprot.writeFieldBegin('start', TType.I32, 2) oprot.writeI32(self.start) oprot.writeFieldEnd() if self.messageBoxCount is not None: oprot.writeFieldBegin('messageBoxCount', TType.I32, 3) oprot.writeI32(self.messageBoxCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxCompactWrapUpList_args) getMessageBoxCompactWrapUpList_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'start', None, None, ), # 2 (3, TType.I32, 'messageBoxCount', None, None, ), # 3 ) class getMessageBoxCompactWrapUpList_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = TMessageBoxWrapUpResponse() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxCompactWrapUpList_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxCompactWrapUpList_result) getMessageBoxCompactWrapUpList_result.thrift_spec = ( (0, TType.STRUCT, 'success', [TMessageBoxWrapUpResponse, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getMessageBoxList_args(object): """ Attributes: - channelId - lastMessagesCount """ def __init__(self, channelId=None, lastMessagesCount=None,): self.channelId = channelId self.lastMessagesCount = lastMessagesCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.lastMessagesCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxList_args') if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 2) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.lastMessagesCount is not None: oprot.writeFieldBegin('lastMessagesCount', TType.I32, 3) oprot.writeI32(self.lastMessagesCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxList_args) getMessageBoxList_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'channelId', 'UTF8', None, ), # 2 (3, TType.I32, 'lastMessagesCount', None, None, ), # 3 ) class getMessageBoxList_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype654, _size651) = iprot.readListBegin() for _i655 in range(_size651): _elem656 = TMessageBox() _elem656.read(iprot) self.success.append(_elem656) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxList_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter657 in self.success: iter657.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxList_result) getMessageBoxList_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [TMessageBox, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getMessageBoxListByStatus_args(object): """ Attributes: - channelId - lastMessagesCount - status """ def __init__(self, channelId=None, lastMessagesCount=None, status=None,): self.channelId = channelId self.lastMessagesCount = lastMessagesCount self.status = status def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.lastMessagesCount = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.status = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxListByStatus_args') if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 2) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.lastMessagesCount is not None: oprot.writeFieldBegin('lastMessagesCount', TType.I32, 3) oprot.writeI32(self.lastMessagesCount) oprot.writeFieldEnd() if self.status is not None: oprot.writeFieldBegin('status', TType.I32, 4) oprot.writeI32(self.status) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxListByStatus_args) getMessageBoxListByStatus_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'channelId', 'UTF8', None, ), # 2 (3, TType.I32, 'lastMessagesCount', None, None, ), # 3 (4, TType.I32, 'status', None, None, ), # 4 ) class getMessageBoxListByStatus_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype661, _size658) = iprot.readListBegin() for _i662 in range(_size658): _elem663 = TMessageBox() _elem663.read(iprot) self.success.append(_elem663) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxListByStatus_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter664 in self.success: iter664.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxListByStatus_result) getMessageBoxListByStatus_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [TMessageBox, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getMessageBoxWrapUp_args(object): """ Attributes: - mid """ def __init__(self, mid=None,): self.mid = mid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxWrapUp_args') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 2) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxWrapUp_args) getMessageBoxWrapUp_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 ) class getMessageBoxWrapUp_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = TMessageBoxWrapUp() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxWrapUp_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxWrapUp_result) getMessageBoxWrapUp_result.thrift_spec = ( (0, TType.STRUCT, 'success', [TMessageBoxWrapUp, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getMessageBoxWrapUpList_args(object): """ Attributes: - start - messageBoxCount """ def __init__(self, start=None, messageBoxCount=None,): self.start = start self.messageBoxCount = messageBoxCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.start = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.messageBoxCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxWrapUpList_args') if self.start is not None: oprot.writeFieldBegin('start', TType.I32, 2) oprot.writeI32(self.start) oprot.writeFieldEnd() if self.messageBoxCount is not None: oprot.writeFieldBegin('messageBoxCount', TType.I32, 3) oprot.writeI32(self.messageBoxCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxWrapUpList_args) getMessageBoxWrapUpList_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'start', None, None, ), # 2 (3, TType.I32, 'messageBoxCount', None, None, ), # 3 ) class getMessageBoxWrapUpList_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = TMessageBoxWrapUpResponse() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessageBoxWrapUpList_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessageBoxWrapUpList_result) getMessageBoxWrapUpList_result.thrift_spec = ( (0, TType.STRUCT, 'success', [TMessageBoxWrapUpResponse, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getMessagesBySequenceNumber_args(object): """ Attributes: - channelId - messageBoxId - startSeq - endSeq """ def __init__(self, channelId=None, messageBoxId=None, startSeq=None, endSeq=None,): self.channelId = channelId self.messageBoxId = messageBoxId self.startSeq = startSeq self.endSeq = endSeq def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.messageBoxId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I64: self.startSeq = iprot.readI64() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I64: self.endSeq = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessagesBySequenceNumber_args') if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 2) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.messageBoxId is not None: oprot.writeFieldBegin('messageBoxId', TType.STRING, 3) oprot.writeString(self.messageBoxId.encode('utf-8') if sys.version_info[0] == 2 else self.messageBoxId) oprot.writeFieldEnd() if self.startSeq is not None: oprot.writeFieldBegin('startSeq', TType.I64, 4) oprot.writeI64(self.startSeq) oprot.writeFieldEnd() if self.endSeq is not None: oprot.writeFieldBegin('endSeq', TType.I64, 5) oprot.writeI64(self.endSeq) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessagesBySequenceNumber_args) getMessagesBySequenceNumber_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'channelId', 'UTF8', None, ), # 2 (3, TType.STRING, 'messageBoxId', 'UTF8', None, ), # 3 (4, TType.I64, 'startSeq', None, None, ), # 4 (5, TType.I64, 'endSeq', None, None, ), # 5 ) class getMessagesBySequenceNumber_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype668, _size665) = iprot.readListBegin() for _i669 in range(_size665): _elem670 = Message() _elem670.read(iprot) self.success.append(_elem670) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getMessagesBySequenceNumber_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter671 in self.success: iter671.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getMessagesBySequenceNumber_result) getMessagesBySequenceNumber_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Message, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getNextMessages_args(object): """ Attributes: - messageBoxId - startSeq - messagesCount """ def __init__(self, messageBoxId=None, startSeq=None, messagesCount=None,): self.messageBoxId = messageBoxId self.startSeq = startSeq self.messagesCount = messagesCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.messageBoxId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I64: self.startSeq = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.messagesCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getNextMessages_args') if self.messageBoxId is not None: oprot.writeFieldBegin('messageBoxId', TType.STRING, 2) oprot.writeString(self.messageBoxId.encode('utf-8') if sys.version_info[0] == 2 else self.messageBoxId) oprot.writeFieldEnd() if self.startSeq is not None: oprot.writeFieldBegin('startSeq', TType.I64, 3) oprot.writeI64(self.startSeq) oprot.writeFieldEnd() if self.messagesCount is not None: oprot.writeFieldBegin('messagesCount', TType.I32, 4) oprot.writeI32(self.messagesCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getNextMessages_args) getNextMessages_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'messageBoxId', 'UTF8', None, ), # 2 (3, TType.I64, 'startSeq', None, None, ), # 3 (4, TType.I32, 'messagesCount', None, None, ), # 4 ) class getNextMessages_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype675, _size672) = iprot.readListBegin() for _i676 in range(_size672): _elem677 = Message() _elem677.read(iprot) self.success.append(_elem677) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getNextMessages_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter678 in self.success: iter678.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getNextMessages_result) getNextMessages_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Message, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getNotificationPolicy_args(object): """ Attributes: - carrier """ def __init__(self, carrier=None,): self.carrier = carrier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.carrier = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getNotificationPolicy_args') if self.carrier is not None: oprot.writeFieldBegin('carrier', TType.I32, 2) oprot.writeI32(self.carrier) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getNotificationPolicy_args) getNotificationPolicy_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'carrier', None, None, ), # 2 ) class getNotificationPolicy_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype682, _size679) = iprot.readListBegin() for _i683 in range(_size679): _elem684 = iprot.readI32() self.success.append(_elem684) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getNotificationPolicy_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.I32, len(self.success)) for iter685 in self.success: oprot.writeI32(iter685) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getNotificationPolicy_result) getNotificationPolicy_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.I32, None, False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getPreviousMessages_args(object): """ Attributes: - messageBoxId - endSeq - messagesCount """ def __init__(self, messageBoxId=None, endSeq=None, messagesCount=None,): self.messageBoxId = messageBoxId self.endSeq = endSeq self.messagesCount = messagesCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.messageBoxId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I64: self.endSeq = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.messagesCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getPreviousMessages_args') if self.messageBoxId is not None: oprot.writeFieldBegin('messageBoxId', TType.STRING, 2) oprot.writeString(self.messageBoxId.encode('utf-8') if sys.version_info[0] == 2 else self.messageBoxId) oprot.writeFieldEnd() if self.endSeq is not None: oprot.writeFieldBegin('endSeq', TType.I64, 3) oprot.writeI64(self.endSeq) oprot.writeFieldEnd() if self.messagesCount is not None: oprot.writeFieldBegin('messagesCount', TType.I32, 4) oprot.writeI32(self.messagesCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getPreviousMessages_args) getPreviousMessages_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'messageBoxId', 'UTF8', None, ), # 2 (3, TType.I64, 'endSeq', None, None, ), # 3 (4, TType.I32, 'messagesCount', None, None, ), # 4 ) class getPreviousMessages_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype689, _size686) = iprot.readListBegin() for _i690 in range(_size686): _elem691 = Message() _elem691.read(iprot) self.success.append(_elem691) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getPreviousMessages_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter692 in self.success: iter692.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getPreviousMessages_result) getPreviousMessages_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Message, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getProfile_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getProfile_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getProfile_args) getProfile_args.thrift_spec = ( ) class getProfile_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Profile() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getProfile_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getProfile_result) getProfile_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Profile, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getProximityMatchCandidateList_args(object): """ Attributes: - sessionId """ def __init__(self, sessionId=None,): self.sessionId = sessionId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getProximityMatchCandidateList_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getProximityMatchCandidateList_args) getProximityMatchCandidateList_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 ) class getProximityMatchCandidateList_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = ProximityMatchCandidateResult() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getProximityMatchCandidateList_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getProximityMatchCandidateList_result) getProximityMatchCandidateList_result.thrift_spec = ( (0, TType.STRUCT, 'success', [ProximityMatchCandidateResult, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getProximityMatchCandidates_args(object): """ Attributes: - sessionId """ def __init__(self, sessionId=None,): self.sessionId = sessionId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getProximityMatchCandidates_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getProximityMatchCandidates_args) getProximityMatchCandidates_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 ) class getProximityMatchCandidates_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.SET: self.success = set() (_etype696, _size693) = iprot.readSetBegin() for _i697 in range(_size693): _elem698 = Contact() _elem698.read(iprot) self.success.add(_elem698) iprot.readSetEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getProximityMatchCandidates_result') if self.success is not None: oprot.writeFieldBegin('success', TType.SET, 0) oprot.writeSetBegin(TType.STRUCT, len(self.success)) for iter699 in self.success: iter699.write(oprot) oprot.writeSetEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getProximityMatchCandidates_result) getProximityMatchCandidates_result.thrift_spec = ( (0, TType.SET, 'success', (TType.STRUCT, [Contact, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getRecentMessages_args(object): """ Attributes: - messageBoxId - messagesCount """ def __init__(self, messageBoxId=None, messagesCount=None,): self.messageBoxId = messageBoxId self.messagesCount = messagesCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.messageBoxId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.messagesCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getRecentMessages_args') if self.messageBoxId is not None: oprot.writeFieldBegin('messageBoxId', TType.STRING, 2) oprot.writeString(self.messageBoxId.encode('utf-8') if sys.version_info[0] == 2 else self.messageBoxId) oprot.writeFieldEnd() if self.messagesCount is not None: oprot.writeFieldBegin('messagesCount', TType.I32, 3) oprot.writeI32(self.messagesCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getRecentMessages_args) getRecentMessages_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'messageBoxId', 'UTF8', None, ), # 2 (3, TType.I32, 'messagesCount', None, None, ), # 3 ) class getRecentMessages_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype703, _size700) = iprot.readListBegin() for _i704 in range(_size700): _elem705 = Message() _elem705.read(iprot) self.success.append(_elem705) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getRecentMessages_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter706 in self.success: iter706.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getRecentMessages_result) getRecentMessages_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [Message, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getRecommendationIds_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getRecommendationIds_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getRecommendationIds_args) getRecommendationIds_args.thrift_spec = ( ) class getRecommendationIds_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype710, _size707) = iprot.readListBegin() for _i711 in range(_size707): _elem712 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success.append(_elem712) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getRecommendationIds_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) for iter713 in self.success: oprot.writeString(iter713.encode('utf-8') if sys.version_info[0] == 2 else iter713) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getRecommendationIds_result) getRecommendationIds_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getRoom_args(object): """ Attributes: - roomId """ def __init__(self, roomId=None,): self.roomId = roomId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.roomId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getRoom_args') if self.roomId is not None: oprot.writeFieldBegin('roomId', TType.STRING, 2) oprot.writeString(self.roomId.encode('utf-8') if sys.version_info[0] == 2 else self.roomId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getRoom_args) getRoom_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'roomId', 'UTF8', None, ), # 2 ) class getRoom_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Room() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getRoom_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getRoom_result) getRoom_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Room, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getRSAKeyInfo_args(object): """ Attributes: - provider """ def __init__(self, provider=None,): self.provider = provider def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.provider = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getRSAKeyInfo_args') if self.provider is not None: oprot.writeFieldBegin('provider', TType.I32, 2) oprot.writeI32(self.provider) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getRSAKeyInfo_args) getRSAKeyInfo_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'provider', None, None, ), # 2 ) class getRSAKeyInfo_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = RSAKey() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getRSAKeyInfo_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getRSAKeyInfo_result) getRSAKeyInfo_result.thrift_spec = ( (0, TType.STRUCT, 'success', [RSAKey, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getServerTime_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getServerTime_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getServerTime_args) getServerTime_args.thrift_spec = ( ) class getServerTime_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.I64: self.success = iprot.readI64() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getServerTime_result') if self.success is not None: oprot.writeFieldBegin('success', TType.I64, 0) oprot.writeI64(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getServerTime_result) getServerTime_result.thrift_spec = ( (0, TType.I64, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getSessions_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getSessions_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getSessions_args) getSessions_args.thrift_spec = ( ) class getSessions_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype717, _size714) = iprot.readListBegin() for _i718 in range(_size714): _elem719 = LoginSession() _elem719.read(iprot) self.success.append(_elem719) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getSessions_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter720 in self.success: iter720.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getSessions_result) getSessions_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [LoginSession, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getSettings_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getSettings_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getSettings_args) getSettings_args.thrift_spec = ( ) class getSettings_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Settings() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getSettings_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getSettings_result) getSettings_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Settings, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getSettingsAttributes_args(object): """ Attributes: - attrBitset """ def __init__(self, attrBitset=None,): self.attrBitset = attrBitset def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.attrBitset = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getSettingsAttributes_args') if self.attrBitset is not None: oprot.writeFieldBegin('attrBitset', TType.I32, 2) oprot.writeI32(self.attrBitset) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getSettingsAttributes_args) getSettingsAttributes_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'attrBitset', None, None, ), # 2 ) class getSettingsAttributes_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Settings() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getSettingsAttributes_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getSettingsAttributes_result) getSettingsAttributes_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Settings, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getSystemConfiguration_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getSystemConfiguration_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getSystemConfiguration_args) getSystemConfiguration_args.thrift_spec = ( ) class getSystemConfiguration_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = SystemConfiguration() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getSystemConfiguration_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getSystemConfiguration_result) getSystemConfiguration_result.thrift_spec = ( (0, TType.STRUCT, 'success', [SystemConfiguration, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getUserTicket_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getUserTicket_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getUserTicket_args) getUserTicket_args.thrift_spec = ( ) class getUserTicket_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Ticket() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getUserTicket_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getUserTicket_result) getUserTicket_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Ticket, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class getWapInvitation_args(object): """ Attributes: - invitationHash """ def __init__(self, invitationHash=None,): self.invitationHash = invitationHash def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.invitationHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getWapInvitation_args') if self.invitationHash is not None: oprot.writeFieldBegin('invitationHash', TType.STRING, 2) oprot.writeString(self.invitationHash.encode('utf-8') if sys.version_info[0] == 2 else self.invitationHash) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getWapInvitation_args) getWapInvitation_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'invitationHash', 'UTF8', None, ), # 2 ) class getWapInvitation_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = WapInvitation() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('getWapInvitation_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(getWapInvitation_result) getWapInvitation_result.thrift_spec = ( (0, TType.STRUCT, 'success', [WapInvitation, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class invalidateUserTicket_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('invalidateUserTicket_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(invalidateUserTicket_args) invalidateUserTicket_args.thrift_spec = ( ) class invalidateUserTicket_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('invalidateUserTicket_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(invalidateUserTicket_result) invalidateUserTicket_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class inviteFriendsBySms_args(object): """ Attributes: - phoneNumberList """ def __init__(self, phoneNumberList=None,): self.phoneNumberList = phoneNumberList def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.LIST: self.phoneNumberList = [] (_etype724, _size721) = iprot.readListBegin() for _i725 in range(_size721): _elem726 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.phoneNumberList.append(_elem726) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('inviteFriendsBySms_args') if self.phoneNumberList is not None: oprot.writeFieldBegin('phoneNumberList', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.phoneNumberList)) for iter727 in self.phoneNumberList: oprot.writeString(iter727.encode('utf-8') if sys.version_info[0] == 2 else iter727) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(inviteFriendsBySms_args) inviteFriendsBySms_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.LIST, 'phoneNumberList', (TType.STRING, 'UTF8', False), None, ), # 2 ) class inviteFriendsBySms_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('inviteFriendsBySms_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(inviteFriendsBySms_result) inviteFriendsBySms_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class inviteIntoGroup_args(object): """ Attributes: - reqSeq - groupId - contactIds """ def __init__(self, reqSeq=None, groupId=None, contactIds=None,): self.reqSeq = reqSeq self.groupId = groupId self.contactIds = contactIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.contactIds = [] (_etype731, _size728) = iprot.readListBegin() for _i732 in range(_size728): _elem733 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.contactIds.append(_elem733) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('inviteIntoGroup_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 2) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() if self.contactIds is not None: oprot.writeFieldBegin('contactIds', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.contactIds)) for iter734 in self.contactIds: oprot.writeString(iter734.encode('utf-8') if sys.version_info[0] == 2 else iter734) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(inviteIntoGroup_args) inviteIntoGroup_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'groupId', 'UTF8', None, ), # 2 (3, TType.LIST, 'contactIds', (TType.STRING, 'UTF8', False), None, ), # 3 ) class inviteIntoGroup_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('inviteIntoGroup_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(inviteIntoGroup_result) inviteIntoGroup_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class inviteIntoRoom_args(object): """ Attributes: - reqSeq - roomId - contactIds """ def __init__(self, reqSeq=None, roomId=None, contactIds=None,): self.reqSeq = reqSeq self.roomId = roomId self.contactIds = contactIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.roomId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.contactIds = [] (_etype738, _size735) = iprot.readListBegin() for _i739 in range(_size735): _elem740 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.contactIds.append(_elem740) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('inviteIntoRoom_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.roomId is not None: oprot.writeFieldBegin('roomId', TType.STRING, 2) oprot.writeString(self.roomId.encode('utf-8') if sys.version_info[0] == 2 else self.roomId) oprot.writeFieldEnd() if self.contactIds is not None: oprot.writeFieldBegin('contactIds', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.contactIds)) for iter741 in self.contactIds: oprot.writeString(iter741.encode('utf-8') if sys.version_info[0] == 2 else iter741) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(inviteIntoRoom_args) inviteIntoRoom_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'roomId', 'UTF8', None, ), # 2 (3, TType.LIST, 'contactIds', (TType.STRING, 'UTF8', False), None, ), # 3 ) class inviteIntoRoom_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('inviteIntoRoom_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(inviteIntoRoom_result) inviteIntoRoom_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class inviteViaEmail_args(object): """ Attributes: - reqSeq - email - name """ def __init__(self, reqSeq=None, email=None, name=None,): self.reqSeq = reqSeq self.email = email self.name = name def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.email = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('inviteViaEmail_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.email is not None: oprot.writeFieldBegin('email', TType.STRING, 2) oprot.writeString(self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email) oprot.writeFieldEnd() if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 3) oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(inviteViaEmail_args) inviteViaEmail_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'email', 'UTF8', None, ), # 2 (3, TType.STRING, 'name', 'UTF8', None, ), # 3 ) class inviteViaEmail_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('inviteViaEmail_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(inviteViaEmail_result) inviteViaEmail_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class isIdentityIdentifierAvailable_args(object): """ Attributes: - provider - identifier """ def __init__(self, provider=None, identifier=None,): self.provider = provider self.identifier = identifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 3: if ftype == TType.I32: self.provider = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('isIdentityIdentifierAvailable_args') if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 2) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.provider is not None: oprot.writeFieldBegin('provider', TType.I32, 3) oprot.writeI32(self.provider) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(isIdentityIdentifierAvailable_args) isIdentityIdentifierAvailable_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'identifier', 'UTF8', None, ), # 2 (3, TType.I32, 'provider', None, None, ), # 3 ) class isIdentityIdentifierAvailable_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('isIdentityIdentifierAvailable_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(isIdentityIdentifierAvailable_result) isIdentityIdentifierAvailable_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class isUseridAvailable_args(object): """ Attributes: - userid """ def __init__(self, userid=None,): self.userid = userid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.userid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('isUseridAvailable_args') if self.userid is not None: oprot.writeFieldBegin('userid', TType.STRING, 2) oprot.writeString(self.userid.encode('utf-8') if sys.version_info[0] == 2 else self.userid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(isUseridAvailable_args) isUseridAvailable_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'userid', 'UTF8', None, ), # 2 ) class isUseridAvailable_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('isUseridAvailable_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(isUseridAvailable_result) isUseridAvailable_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class kickoutFromGroup_args(object): """ Attributes: - reqSeq - groupId - contactIds """ def __init__(self, reqSeq=None, groupId=None, contactIds=None,): self.reqSeq = reqSeq self.groupId = groupId self.contactIds = contactIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.contactIds = [] (_etype745, _size742) = iprot.readListBegin() for _i746 in range(_size742): _elem747 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.contactIds.append(_elem747) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('kickoutFromGroup_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 2) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() if self.contactIds is not None: oprot.writeFieldBegin('contactIds', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.contactIds)) for iter748 in self.contactIds: oprot.writeString(iter748.encode('utf-8') if sys.version_info[0] == 2 else iter748) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(kickoutFromGroup_args) kickoutFromGroup_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'groupId', 'UTF8', None, ), # 2 (3, TType.LIST, 'contactIds', (TType.STRING, 'UTF8', False), None, ), # 3 ) class kickoutFromGroup_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('kickoutFromGroup_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(kickoutFromGroup_result) kickoutFromGroup_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class reissueGroupTicket_args(object): """ Attributes: - groupId """ def __init__(self, groupId=None,): self.groupId = groupId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reissueGroupTicket_args') if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 1) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reissueGroupTicket_args) reissueGroupTicket_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'groupId', 'UTF8', None, ), # 1 ) class reissueGroupTicket_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reissueGroupTicket_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reissueGroupTicket_result) reissueGroupTicket_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class findGroupByTicket_args(object): """ Attributes: - ticketId """ def __init__(self, ticketId=None,): self.ticketId = ticketId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.ticketId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findGroupByTicket_args') if self.ticketId is not None: oprot.writeFieldBegin('ticketId', TType.STRING, 1) oprot.writeString(self.ticketId.encode('utf-8') if sys.version_info[0] == 2 else self.ticketId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findGroupByTicket_args) findGroupByTicket_args.thrift_spec = ( None, # 0 (1, TType.STRING, 'ticketId', 'UTF8', None, ), # 1 ) class findGroupByTicket_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Group() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('findGroupByTicket_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(findGroupByTicket_result) findGroupByTicket_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Group, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class leaveGroup_args(object): """ Attributes: - reqSeq - groupId """ def __init__(self, reqSeq=None, groupId=None,): self.reqSeq = reqSeq self.groupId = groupId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('leaveGroup_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 2) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(leaveGroup_args) leaveGroup_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'groupId', 'UTF8', None, ), # 2 ) class leaveGroup_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('leaveGroup_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(leaveGroup_result) leaveGroup_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class leaveRoom_args(object): """ Attributes: - reqSeq - roomId """ def __init__(self, reqSeq=None, roomId=None,): self.reqSeq = reqSeq self.roomId = roomId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.roomId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('leaveRoom_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.roomId is not None: oprot.writeFieldBegin('roomId', TType.STRING, 2) oprot.writeString(self.roomId.encode('utf-8') if sys.version_info[0] == 2 else self.roomId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(leaveRoom_args) leaveRoom_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'roomId', 'UTF8', None, ), # 2 ) class leaveRoom_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('leaveRoom_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(leaveRoom_result) leaveRoom_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class loginWithIdentityCredential_args(object): """ Attributes: - identityProvider - identifier - password - keepLoggedIn - accessLocation - systemName - certificate """ def __init__(self, identityProvider=None, identifier=None, password=None, keepLoggedIn=None, accessLocation=None, systemName=None, certificate=None,): self.identityProvider = identityProvider self.identifier = identifier self.password = password self.keepLoggedIn = keepLoggedIn self.accessLocation = accessLocation self.systemName = systemName self.certificate = certificate def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 8: if ftype == TType.I32: self.identityProvider = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.BOOL: self.keepLoggedIn = iprot.readBool() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.accessLocation = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: self.systemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: self.certificate = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithIdentityCredential_args') if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 3) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.password is not None: oprot.writeFieldBegin('password', TType.STRING, 4) oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) oprot.writeFieldEnd() if self.keepLoggedIn is not None: oprot.writeFieldBegin('keepLoggedIn', TType.BOOL, 5) oprot.writeBool(self.keepLoggedIn) oprot.writeFieldEnd() if self.accessLocation is not None: oprot.writeFieldBegin('accessLocation', TType.STRING, 6) oprot.writeString(self.accessLocation.encode('utf-8') if sys.version_info[0] == 2 else self.accessLocation) oprot.writeFieldEnd() if self.systemName is not None: oprot.writeFieldBegin('systemName', TType.STRING, 7) oprot.writeString(self.systemName.encode('utf-8') if sys.version_info[0] == 2 else self.systemName) oprot.writeFieldEnd() if self.identityProvider is not None: oprot.writeFieldBegin('identityProvider', TType.I32, 8) oprot.writeI32(self.identityProvider) oprot.writeFieldEnd() if self.certificate is not None: oprot.writeFieldBegin('certificate', TType.STRING, 9) oprot.writeString(self.certificate.encode('utf-8') if sys.version_info[0] == 2 else self.certificate) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithIdentityCredential_args) loginWithIdentityCredential_args.thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.STRING, 'identifier', 'UTF8', None, ), # 3 (4, TType.STRING, 'password', 'UTF8', None, ), # 4 (5, TType.BOOL, 'keepLoggedIn', None, None, ), # 5 (6, TType.STRING, 'accessLocation', 'UTF8', None, ), # 6 (7, TType.STRING, 'systemName', 'UTF8', None, ), # 7 (8, TType.I32, 'identityProvider', None, None, ), # 8 (9, TType.STRING, 'certificate', 'UTF8', None, ), # 9 ) class loginWithIdentityCredential_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithIdentityCredential_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithIdentityCredential_result) loginWithIdentityCredential_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class loginWithIdentityCredentialForCertificate_args(object): """ Attributes: - identityProvider - identifier - password - keepLoggedIn - accessLocation - systemName - certificate """ def __init__(self, identityProvider=None, identifier=None, password=None, keepLoggedIn=None, accessLocation=None, systemName=None, certificate=None,): self.identityProvider = identityProvider self.identifier = identifier self.password = password self.keepLoggedIn = keepLoggedIn self.accessLocation = accessLocation self.systemName = systemName self.certificate = certificate def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 8: if ftype == TType.I32: self.identityProvider = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.BOOL: self.keepLoggedIn = iprot.readBool() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.accessLocation = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: self.systemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: self.certificate = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithIdentityCredentialForCertificate_args') if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 3) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.password is not None: oprot.writeFieldBegin('password', TType.STRING, 4) oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) oprot.writeFieldEnd() if self.keepLoggedIn is not None: oprot.writeFieldBegin('keepLoggedIn', TType.BOOL, 5) oprot.writeBool(self.keepLoggedIn) oprot.writeFieldEnd() if self.accessLocation is not None: oprot.writeFieldBegin('accessLocation', TType.STRING, 6) oprot.writeString(self.accessLocation.encode('utf-8') if sys.version_info[0] == 2 else self.accessLocation) oprot.writeFieldEnd() if self.systemName is not None: oprot.writeFieldBegin('systemName', TType.STRING, 7) oprot.writeString(self.systemName.encode('utf-8') if sys.version_info[0] == 2 else self.systemName) oprot.writeFieldEnd() if self.identityProvider is not None: oprot.writeFieldBegin('identityProvider', TType.I32, 8) oprot.writeI32(self.identityProvider) oprot.writeFieldEnd() if self.certificate is not None: oprot.writeFieldBegin('certificate', TType.STRING, 9) oprot.writeString(self.certificate.encode('utf-8') if sys.version_info[0] == 2 else self.certificate) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithIdentityCredentialForCertificate_args) loginWithIdentityCredentialForCertificate_args.thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.STRING, 'identifier', 'UTF8', None, ), # 3 (4, TType.STRING, 'password', 'UTF8', None, ), # 4 (5, TType.BOOL, 'keepLoggedIn', None, None, ), # 5 (6, TType.STRING, 'accessLocation', 'UTF8', None, ), # 6 (7, TType.STRING, 'systemName', 'UTF8', None, ), # 7 (8, TType.I32, 'identityProvider', None, None, ), # 8 (9, TType.STRING, 'certificate', 'UTF8', None, ), # 9 ) class loginWithIdentityCredentialForCertificate_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = LoginResult() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithIdentityCredentialForCertificate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithIdentityCredentialForCertificate_result) loginWithIdentityCredentialForCertificate_result.thrift_spec = ( (0, TType.STRUCT, 'success', [LoginResult, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class loginWithVerifier_args(object): """ Attributes: - verifier """ def __init__(self, verifier=None,): self.verifier = verifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 3: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithVerifier_args') if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 3) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithVerifier_args) loginWithVerifier_args.thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.STRING, 'verifier', 'UTF8', None, ), # 3 ) class loginWithVerifier_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithVerifier_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithVerifier_result) loginWithVerifier_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class loginWithVerifierForCerificate_args(object): """ Attributes: - verifier """ def __init__(self, verifier=None,): self.verifier = verifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 3: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithVerifierForCerificate_args') if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 3) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithVerifierForCerificate_args) loginWithVerifierForCerificate_args.thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.STRING, 'verifier', 'UTF8', None, ), # 3 ) class loginWithVerifierForCerificate_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = LoginResult() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithVerifierForCerificate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithVerifierForCerificate_result) loginWithVerifierForCerificate_result.thrift_spec = ( (0, TType.STRUCT, 'success', [LoginResult, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class loginWithVerifierForCertificate_args(object): """ Attributes: - verifier """ def __init__(self, verifier=None,): self.verifier = verifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 3: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithVerifierForCertificate_args') if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 3) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithVerifierForCertificate_args) loginWithVerifierForCertificate_args.thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.STRING, 'verifier', 'UTF8', None, ), # 3 ) class loginWithVerifierForCertificate_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = LoginResult() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('loginWithVerifierForCertificate_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(loginWithVerifierForCertificate_result) loginWithVerifierForCertificate_result.thrift_spec = ( (0, TType.STRUCT, 'success', [LoginResult, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class logout_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('logout_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(logout_args) logout_args.thrift_spec = ( ) class logout_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('logout_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(logout_result) logout_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class logoutSession_args(object): """ Attributes: - tokenKey """ def __init__(self, tokenKey=None,): self.tokenKey = tokenKey def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.tokenKey = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('logoutSession_args') if self.tokenKey is not None: oprot.writeFieldBegin('tokenKey', TType.STRING, 2) oprot.writeString(self.tokenKey.encode('utf-8') if sys.version_info[0] == 2 else self.tokenKey) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(logoutSession_args) logoutSession_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'tokenKey', 'UTF8', None, ), # 2 ) class logoutSession_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('logoutSession_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(logoutSession_result) logoutSession_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class noop_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('noop_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(noop_args) noop_args.thrift_spec = ( ) class noop_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('noop_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(noop_result) noop_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class notifiedRedirect_args(object): """ Attributes: - paramMap """ def __init__(self, paramMap=None,): self.paramMap = paramMap def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.MAP: self.paramMap = {} (_ktype750, _vtype751, _size749) = iprot.readMapBegin() for _i753 in range(_size749): _key754 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val755 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.paramMap[_key754] = _val755 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifiedRedirect_args') if self.paramMap is not None: oprot.writeFieldBegin('paramMap', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.paramMap)) for kiter756, viter757 in self.paramMap.items(): oprot.writeString(kiter756.encode('utf-8') if sys.version_info[0] == 2 else kiter756) oprot.writeString(viter757.encode('utf-8') if sys.version_info[0] == 2 else viter757) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifiedRedirect_args) notifiedRedirect_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.MAP, 'paramMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 ) class notifiedRedirect_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifiedRedirect_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifiedRedirect_result) notifiedRedirect_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class notifyBuddyOnAir_args(object): """ Attributes: - seq - receiverMids """ def __init__(self, seq=None, receiverMids=None,): self.seq = seq self.receiverMids = receiverMids def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.receiverMids = [] (_etype761, _size758) = iprot.readListBegin() for _i762 in range(_size758): _elem763 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.receiverMids.append(_elem763) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyBuddyOnAir_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.receiverMids is not None: oprot.writeFieldBegin('receiverMids', TType.LIST, 2) oprot.writeListBegin(TType.STRING, len(self.receiverMids)) for iter764 in self.receiverMids: oprot.writeString(iter764.encode('utf-8') if sys.version_info[0] == 2 else iter764) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyBuddyOnAir_args) notifyBuddyOnAir_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.LIST, 'receiverMids', (TType.STRING, 'UTF8', False), None, ), # 2 ) class notifyBuddyOnAir_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype766, _vtype767, _size765) = iprot.readMapBegin() for _i769 in range(_size765): _key770 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val771 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key770] = _val771 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyBuddyOnAir_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter772, viter773 in self.success.items(): oprot.writeString(kiter772.encode('utf-8') if sys.version_info[0] == 2 else kiter772) oprot.writeString(viter773.encode('utf-8') if sys.version_info[0] == 2 else viter773) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyBuddyOnAir_result) notifyBuddyOnAir_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class notifyIndividualEvent_args(object): """ Attributes: - notificationStatus - receiverMids """ def __init__(self, notificationStatus=None, receiverMids=None,): self.notificationStatus = notificationStatus self.receiverMids = receiverMids def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.notificationStatus = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.receiverMids = [] (_etype777, _size774) = iprot.readListBegin() for _i778 in range(_size774): _elem779 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.receiverMids.append(_elem779) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyIndividualEvent_args') if self.notificationStatus is not None: oprot.writeFieldBegin('notificationStatus', TType.I32, 2) oprot.writeI32(self.notificationStatus) oprot.writeFieldEnd() if self.receiverMids is not None: oprot.writeFieldBegin('receiverMids', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.receiverMids)) for iter780 in self.receiverMids: oprot.writeString(iter780.encode('utf-8') if sys.version_info[0] == 2 else iter780) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyIndividualEvent_args) notifyIndividualEvent_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'notificationStatus', None, None, ), # 2 (3, TType.LIST, 'receiverMids', (TType.STRING, 'UTF8', False), None, ), # 3 ) class notifyIndividualEvent_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyIndividualEvent_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyIndividualEvent_result) notifyIndividualEvent_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class notifyInstalled_args(object): """ Attributes: - udidHash - applicationTypeWithExtensions """ def __init__(self, udidHash=None, applicationTypeWithExtensions=None,): self.udidHash = udidHash self.applicationTypeWithExtensions = applicationTypeWithExtensions def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.applicationTypeWithExtensions = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyInstalled_args') if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 2) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() if self.applicationTypeWithExtensions is not None: oprot.writeFieldBegin('applicationTypeWithExtensions', TType.STRING, 3) oprot.writeString(self.applicationTypeWithExtensions.encode('utf-8') if sys.version_info[0] == 2 else self.applicationTypeWithExtensions) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyInstalled_args) notifyInstalled_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'udidHash', 'UTF8', None, ), # 2 (3, TType.STRING, 'applicationTypeWithExtensions', 'UTF8', None, ), # 3 ) class notifyInstalled_result(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyInstalled_result') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyInstalled_result) notifyInstalled_result.thrift_spec = ( ) class notifyRegistrationComplete_args(object): """ Attributes: - udidHash - applicationTypeWithExtensions """ def __init__(self, udidHash=None, applicationTypeWithExtensions=None,): self.udidHash = udidHash self.applicationTypeWithExtensions = applicationTypeWithExtensions def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.applicationTypeWithExtensions = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyRegistrationComplete_args') if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 2) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() if self.applicationTypeWithExtensions is not None: oprot.writeFieldBegin('applicationTypeWithExtensions', TType.STRING, 3) oprot.writeString(self.applicationTypeWithExtensions.encode('utf-8') if sys.version_info[0] == 2 else self.applicationTypeWithExtensions) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyRegistrationComplete_args) notifyRegistrationComplete_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'udidHash', 'UTF8', None, ), # 2 (3, TType.STRING, 'applicationTypeWithExtensions', 'UTF8', None, ), # 3 ) class notifyRegistrationComplete_result(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyRegistrationComplete_result') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyRegistrationComplete_result) notifyRegistrationComplete_result.thrift_spec = ( ) class notifySleep_args(object): """ Attributes: - lastRev - badge """ def __init__(self, lastRev=None, badge=None,): self.lastRev = lastRev self.badge = badge def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.lastRev = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.badge = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifySleep_args') if self.lastRev is not None: oprot.writeFieldBegin('lastRev', TType.I64, 2) oprot.writeI64(self.lastRev) oprot.writeFieldEnd() if self.badge is not None: oprot.writeFieldBegin('badge', TType.I32, 3) oprot.writeI32(self.badge) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifySleep_args) notifySleep_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'lastRev', None, None, ), # 2 (3, TType.I32, 'badge', None, None, ), # 3 ) class notifySleep_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifySleep_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifySleep_result) notifySleep_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class notifyUpdated_args(object): """ Attributes: - lastRev - deviceInfo """ def __init__(self, lastRev=None, deviceInfo=None,): self.lastRev = lastRev self.deviceInfo = deviceInfo def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.lastRev = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyUpdated_args') if self.lastRev is not None: oprot.writeFieldBegin('lastRev', TType.I64, 2) oprot.writeI64(self.lastRev) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 3) self.deviceInfo.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyUpdated_args) notifyUpdated_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'lastRev', None, None, ), # 2 (3, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 3 ) class notifyUpdated_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('notifyUpdated_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(notifyUpdated_result) notifyUpdated_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class openProximityMatch_args(object): """ Attributes: - location """ def __init__(self, location=None,): self.location = location def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRUCT: self.location = Location() self.location.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('openProximityMatch_args') if self.location is not None: oprot.writeFieldBegin('location', TType.STRUCT, 2) self.location.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(openProximityMatch_args) openProximityMatch_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRUCT, 'location', [Location, None], None, ), # 2 ) class openProximityMatch_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('openProximityMatch_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(openProximityMatch_result) openProximityMatch_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerBuddyUser_args(object): """ Attributes: - buddyId - registrarPassword """ def __init__(self, buddyId=None, registrarPassword=None,): self.buddyId = buddyId self.registrarPassword = registrarPassword def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.buddyId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.registrarPassword = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerBuddyUser_args') if self.buddyId is not None: oprot.writeFieldBegin('buddyId', TType.STRING, 2) oprot.writeString(self.buddyId.encode('utf-8') if sys.version_info[0] == 2 else self.buddyId) oprot.writeFieldEnd() if self.registrarPassword is not None: oprot.writeFieldBegin('registrarPassword', TType.STRING, 3) oprot.writeString(self.registrarPassword.encode('utf-8') if sys.version_info[0] == 2 else self.registrarPassword) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerBuddyUser_args) registerBuddyUser_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'buddyId', 'UTF8', None, ), # 2 (3, TType.STRING, 'registrarPassword', 'UTF8', None, ), # 3 ) class registerBuddyUser_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerBuddyUser_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerBuddyUser_result) registerBuddyUser_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerBuddyUserid_args(object): """ Attributes: - seq - userid """ def __init__(self, seq=None, userid=None,): self.seq = seq self.userid = userid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.userid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerBuddyUserid_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 2) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.userid is not None: oprot.writeFieldBegin('userid', TType.STRING, 3) oprot.writeString(self.userid.encode('utf-8') if sys.version_info[0] == 2 else self.userid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerBuddyUserid_args) registerBuddyUserid_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'seq', None, None, ), # 2 (3, TType.STRING, 'userid', 'UTF8', None, ), # 3 ) class registerBuddyUserid_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerBuddyUserid_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerBuddyUserid_result) registerBuddyUserid_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerDevice_args(object): """ Attributes: - sessionId """ def __init__(self, sessionId=None,): self.sessionId = sessionId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerDevice_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerDevice_args) registerDevice_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 ) class registerDevice_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerDevice_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerDevice_result) registerDevice_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerDeviceWithIdentityCredential_args(object): """ Attributes: - sessionId - provider - identifier - verifier """ def __init__(self, sessionId=None, provider=None, identifier=None, verifier=None,): self.sessionId = sessionId self.provider = provider self.identifier = identifier self.verifier = verifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.provider = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerDeviceWithIdentityCredential_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 3) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 4) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() if self.provider is not None: oprot.writeFieldBegin('provider', TType.I32, 5) oprot.writeI32(self.provider) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerDeviceWithIdentityCredential_args) registerDeviceWithIdentityCredential_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 (3, TType.STRING, 'identifier', 'UTF8', None, ), # 3 (4, TType.STRING, 'verifier', 'UTF8', None, ), # 4 (5, TType.I32, 'provider', None, None, ), # 5 ) class registerDeviceWithIdentityCredential_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerDeviceWithIdentityCredential_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerDeviceWithIdentityCredential_result) registerDeviceWithIdentityCredential_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerDeviceWithoutPhoneNumber_args(object): """ Attributes: - region - udidHash - deviceInfo """ def __init__(self, region=None, udidHash=None, deviceInfo=None,): self.region = region self.udidHash = udidHash self.deviceInfo = deviceInfo def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerDeviceWithoutPhoneNumber_args') if self.region is not None: oprot.writeFieldBegin('region', TType.STRING, 2) oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region) oprot.writeFieldEnd() if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 3) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 4) self.deviceInfo.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerDeviceWithoutPhoneNumber_args) registerDeviceWithoutPhoneNumber_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'region', 'UTF8', None, ), # 2 (3, TType.STRING, 'udidHash', 'UTF8', None, ), # 3 (4, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 4 ) class registerDeviceWithoutPhoneNumber_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerDeviceWithoutPhoneNumber_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerDeviceWithoutPhoneNumber_result) registerDeviceWithoutPhoneNumber_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerDeviceWithoutPhoneNumberWithIdentityCredential_args(object): """ Attributes: - region - udidHash - deviceInfo - provider - identifier - verifier - mid """ def __init__(self, region=None, udidHash=None, deviceInfo=None, provider=None, identifier=None, verifier=None, mid=None,): self.region = region self.udidHash = udidHash self.deviceInfo = deviceInfo self.provider = provider self.identifier = identifier self.verifier = verifier self.mid = mid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.provider = iprot.readI32() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerDeviceWithoutPhoneNumberWithIdentityCredential_args') if self.region is not None: oprot.writeFieldBegin('region', TType.STRING, 2) oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region) oprot.writeFieldEnd() if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 3) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 4) self.deviceInfo.write(oprot) oprot.writeFieldEnd() if self.provider is not None: oprot.writeFieldBegin('provider', TType.I32, 5) oprot.writeI32(self.provider) oprot.writeFieldEnd() if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 6) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 7) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 8) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerDeviceWithoutPhoneNumberWithIdentityCredential_args) registerDeviceWithoutPhoneNumberWithIdentityCredential_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'region', 'UTF8', None, ), # 2 (3, TType.STRING, 'udidHash', 'UTF8', None, ), # 3 (4, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 4 (5, TType.I32, 'provider', None, None, ), # 5 (6, TType.STRING, 'identifier', 'UTF8', None, ), # 6 (7, TType.STRING, 'verifier', 'UTF8', None, ), # 7 (8, TType.STRING, 'mid', 'UTF8', None, ), # 8 ) class registerDeviceWithoutPhoneNumberWithIdentityCredential_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerDeviceWithoutPhoneNumberWithIdentityCredential_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerDeviceWithoutPhoneNumberWithIdentityCredential_result) registerDeviceWithoutPhoneNumberWithIdentityCredential_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerUserid_args(object): """ Attributes: - reqSeq - userid """ def __init__(self, reqSeq=None, userid=None,): self.reqSeq = reqSeq self.userid = userid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.userid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerUserid_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.userid is not None: oprot.writeFieldBegin('userid', TType.STRING, 2) oprot.writeString(self.userid.encode('utf-8') if sys.version_info[0] == 2 else self.userid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerUserid_args) registerUserid_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'userid', 'UTF8', None, ), # 2 ) class registerUserid_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerUserid_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerUserid_result) registerUserid_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerWapDevice_args(object): """ Attributes: - invitationHash - guidHash - email - deviceInfo """ def __init__(self, invitationHash=None, guidHash=None, email=None, deviceInfo=None,): self.invitationHash = invitationHash self.guidHash = guidHash self.email = email self.deviceInfo = deviceInfo def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.invitationHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.guidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.email = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerWapDevice_args') if self.invitationHash is not None: oprot.writeFieldBegin('invitationHash', TType.STRING, 2) oprot.writeString(self.invitationHash.encode('utf-8') if sys.version_info[0] == 2 else self.invitationHash) oprot.writeFieldEnd() if self.guidHash is not None: oprot.writeFieldBegin('guidHash', TType.STRING, 3) oprot.writeString(self.guidHash.encode('utf-8') if sys.version_info[0] == 2 else self.guidHash) oprot.writeFieldEnd() if self.email is not None: oprot.writeFieldBegin('email', TType.STRING, 4) oprot.writeString(self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 5) self.deviceInfo.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerWapDevice_args) registerWapDevice_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'invitationHash', 'UTF8', None, ), # 2 (3, TType.STRING, 'guidHash', 'UTF8', None, ), # 3 (4, TType.STRING, 'email', 'UTF8', None, ), # 4 (5, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 5 ) class registerWapDevice_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerWapDevice_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerWapDevice_result) registerWapDevice_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerWithExistingSnsIdAndIdentityCredential_args(object): """ Attributes: - identityCredential - region - udidHash - deviceInfo """ def __init__(self, identityCredential=None, region=None, udidHash=None, deviceInfo=None,): self.identityCredential = identityCredential self.region = region self.udidHash = udidHash self.deviceInfo = deviceInfo def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRUCT: self.identityCredential = IdentityCredential() self.identityCredential.read(iprot) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerWithExistingSnsIdAndIdentityCredential_args') if self.identityCredential is not None: oprot.writeFieldBegin('identityCredential', TType.STRUCT, 2) self.identityCredential.write(oprot) oprot.writeFieldEnd() if self.region is not None: oprot.writeFieldBegin('region', TType.STRING, 3) oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region) oprot.writeFieldEnd() if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 4) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 5) self.deviceInfo.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerWithExistingSnsIdAndIdentityCredential_args) registerWithExistingSnsIdAndIdentityCredential_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRUCT, 'identityCredential', [IdentityCredential, None], None, ), # 2 (3, TType.STRING, 'region', 'UTF8', None, ), # 3 (4, TType.STRING, 'udidHash', 'UTF8', None, ), # 4 (5, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 5 ) class registerWithExistingSnsIdAndIdentityCredential_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerWithExistingSnsIdAndIdentityCredential_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerWithExistingSnsIdAndIdentityCredential_result) registerWithExistingSnsIdAndIdentityCredential_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerWithSnsId_args(object): """ Attributes: - snsIdType - snsAccessToken - region - udidHash - deviceInfo - mid """ def __init__(self, snsIdType=None, snsAccessToken=None, region=None, udidHash=None, deviceInfo=None, mid=None,): self.snsIdType = snsIdType self.snsAccessToken = snsAccessToken self.region = region self.udidHash = udidHash self.deviceInfo = deviceInfo self.mid = mid def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.snsIdType = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.snsAccessToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerWithSnsId_args') if self.snsIdType is not None: oprot.writeFieldBegin('snsIdType', TType.I32, 2) oprot.writeI32(self.snsIdType) oprot.writeFieldEnd() if self.snsAccessToken is not None: oprot.writeFieldBegin('snsAccessToken', TType.STRING, 3) oprot.writeString(self.snsAccessToken.encode('utf-8') if sys.version_info[0] == 2 else self.snsAccessToken) oprot.writeFieldEnd() if self.region is not None: oprot.writeFieldBegin('region', TType.STRING, 4) oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region) oprot.writeFieldEnd() if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 5) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 6) self.deviceInfo.write(oprot) oprot.writeFieldEnd() if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 7) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerWithSnsId_args) registerWithSnsId_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'snsIdType', None, None, ), # 2 (3, TType.STRING, 'snsAccessToken', 'UTF8', None, ), # 3 (4, TType.STRING, 'region', 'UTF8', None, ), # 4 (5, TType.STRING, 'udidHash', 'UTF8', None, ), # 5 (6, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 6 (7, TType.STRING, 'mid', 'UTF8', None, ), # 7 ) class registerWithSnsId_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = RegisterWithSnsIdResult() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerWithSnsId_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerWithSnsId_result) registerWithSnsId_result.thrift_spec = ( (0, TType.STRUCT, 'success', [RegisterWithSnsIdResult, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class registerWithSnsIdAndIdentityCredential_args(object): """ Attributes: - snsIdType - snsAccessToken - identityCredential - region - udidHash - deviceInfo """ def __init__(self, snsIdType=None, snsAccessToken=None, identityCredential=None, region=None, udidHash=None, deviceInfo=None,): self.snsIdType = snsIdType self.snsAccessToken = snsAccessToken self.identityCredential = identityCredential self.region = region self.udidHash = udidHash self.deviceInfo = deviceInfo def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.snsIdType = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.snsAccessToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRUCT: self.identityCredential = IdentityCredential() self.identityCredential.read(iprot) else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerWithSnsIdAndIdentityCredential_args') if self.snsIdType is not None: oprot.writeFieldBegin('snsIdType', TType.I32, 2) oprot.writeI32(self.snsIdType) oprot.writeFieldEnd() if self.snsAccessToken is not None: oprot.writeFieldBegin('snsAccessToken', TType.STRING, 3) oprot.writeString(self.snsAccessToken.encode('utf-8') if sys.version_info[0] == 2 else self.snsAccessToken) oprot.writeFieldEnd() if self.identityCredential is not None: oprot.writeFieldBegin('identityCredential', TType.STRUCT, 4) self.identityCredential.write(oprot) oprot.writeFieldEnd() if self.region is not None: oprot.writeFieldBegin('region', TType.STRING, 5) oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region) oprot.writeFieldEnd() if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 6) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 7) self.deviceInfo.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerWithSnsIdAndIdentityCredential_args) registerWithSnsIdAndIdentityCredential_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'snsIdType', None, None, ), # 2 (3, TType.STRING, 'snsAccessToken', 'UTF8', None, ), # 3 (4, TType.STRUCT, 'identityCredential', [IdentityCredential, None], None, ), # 4 (5, TType.STRING, 'region', 'UTF8', None, ), # 5 (6, TType.STRING, 'udidHash', 'UTF8', None, ), # 6 (7, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 7 ) class registerWithSnsIdAndIdentityCredential_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('registerWithSnsIdAndIdentityCredential_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(registerWithSnsIdAndIdentityCredential_result) registerWithSnsIdAndIdentityCredential_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class reissueDeviceCredential_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reissueDeviceCredential_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reissueDeviceCredential_args) reissueDeviceCredential_args.thrift_spec = ( ) class reissueDeviceCredential_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reissueDeviceCredential_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reissueDeviceCredential_result) reissueDeviceCredential_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class reissueUserTicket_args(object): """ Attributes: - expirationTime - maxUseCount """ def __init__(self, expirationTime=None, maxUseCount=None,): self.expirationTime = expirationTime self.maxUseCount = maxUseCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 3: if ftype == TType.I64: self.expirationTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.maxUseCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reissueUserTicket_args') if self.expirationTime is not None: oprot.writeFieldBegin('expirationTime', TType.I64, 3) oprot.writeI64(self.expirationTime) oprot.writeFieldEnd() if self.maxUseCount is not None: oprot.writeFieldBegin('maxUseCount', TType.I32, 4) oprot.writeI32(self.maxUseCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reissueUserTicket_args) reissueUserTicket_args.thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.I64, 'expirationTime', None, None, ), # 3 (4, TType.I32, 'maxUseCount', None, None, ), # 4 ) class reissueUserTicket_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reissueUserTicket_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reissueUserTicket_result) reissueUserTicket_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class rejectGroupInvitation_args(object): """ Attributes: - reqSeq - groupId """ def __init__(self, reqSeq=None, groupId=None,): self.reqSeq = reqSeq self.groupId = groupId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('rejectGroupInvitation_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.groupId is not None: oprot.writeFieldBegin('groupId', TType.STRING, 2) oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(rejectGroupInvitation_args) rejectGroupInvitation_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'groupId', 'UTF8', None, ), # 2 ) class rejectGroupInvitation_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('rejectGroupInvitation_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(rejectGroupInvitation_result) rejectGroupInvitation_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class releaseSession_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('releaseSession_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(releaseSession_args) releaseSession_args.thrift_spec = ( ) class releaseSession_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('releaseSession_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(releaseSession_result) releaseSession_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class removeAllMessages_args(object): """ Attributes: - seq - lastMessageId """ def __init__(self, seq=None, lastMessageId=None,): self.seq = seq self.lastMessageId = lastMessageId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.lastMessageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeAllMessages_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.lastMessageId is not None: oprot.writeFieldBegin('lastMessageId', TType.STRING, 2) oprot.writeString(self.lastMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.lastMessageId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeAllMessages_args) removeAllMessages_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRING, 'lastMessageId', 'UTF8', None, ), # 2 ) class removeAllMessages_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeAllMessages_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeAllMessages_result) removeAllMessages_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class removeBuddyLocation_args(object): """ Attributes: - mid - index """ def __init__(self, mid=None, index=None,): self.mid = mid self.index = index def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.index = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeBuddyLocation_args') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 2) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.index is not None: oprot.writeFieldBegin('index', TType.I32, 3) oprot.writeI32(self.index) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeBuddyLocation_args) removeBuddyLocation_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 (3, TType.I32, 'index', None, None, ), # 3 ) class removeBuddyLocation_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeBuddyLocation_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeBuddyLocation_result) removeBuddyLocation_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class removeMessage_args(object): """ Attributes: - messageId """ def __init__(self, messageId=None,): self.messageId = messageId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeMessage_args') if self.messageId is not None: oprot.writeFieldBegin('messageId', TType.STRING, 2) oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeMessage_args) removeMessage_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'messageId', 'UTF8', None, ), # 2 ) class removeMessage_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeMessage_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeMessage_result) removeMessage_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class removeMessageFromMyHome_args(object): """ Attributes: - messageId """ def __init__(self, messageId=None,): self.messageId = messageId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeMessageFromMyHome_args') if self.messageId is not None: oprot.writeFieldBegin('messageId', TType.STRING, 2) oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeMessageFromMyHome_args) removeMessageFromMyHome_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'messageId', 'UTF8', None, ), # 2 ) class removeMessageFromMyHome_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.BOOL: self.success = iprot.readBool() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeMessageFromMyHome_result') if self.success is not None: oprot.writeFieldBegin('success', TType.BOOL, 0) oprot.writeBool(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeMessageFromMyHome_result) removeMessageFromMyHome_result.thrift_spec = ( (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class removeSnsId_args(object): """ Attributes: - snsIdType """ def __init__(self, snsIdType=None,): self.snsIdType = snsIdType def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.snsIdType = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeSnsId_args') if self.snsIdType is not None: oprot.writeFieldBegin('snsIdType', TType.I32, 2) oprot.writeI32(self.snsIdType) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeSnsId_args) removeSnsId_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'snsIdType', None, None, ), # 2 ) class removeSnsId_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('removeSnsId_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(removeSnsId_result) removeSnsId_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class report_args(object): """ Attributes: - syncOpRevision - category - report """ def __init__(self, syncOpRevision=None, category=None, report=None,): self.syncOpRevision = syncOpRevision self.category = category self.report = report def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.syncOpRevision = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.category = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.report = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('report_args') if self.syncOpRevision is not None: oprot.writeFieldBegin('syncOpRevision', TType.I64, 2) oprot.writeI64(self.syncOpRevision) oprot.writeFieldEnd() if self.category is not None: oprot.writeFieldBegin('category', TType.I32, 3) oprot.writeI32(self.category) oprot.writeFieldEnd() if self.report is not None: oprot.writeFieldBegin('report', TType.STRING, 4) oprot.writeString(self.report.encode('utf-8') if sys.version_info[0] == 2 else self.report) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(report_args) report_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'syncOpRevision', None, None, ), # 2 (3, TType.I32, 'category', None, None, ), # 3 (4, TType.STRING, 'report', 'UTF8', None, ), # 4 ) class report_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('report_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(report_result) report_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class reportContacts_args(object): """ Attributes: - syncOpRevision - category - contactReports - actionType """ def __init__(self, syncOpRevision=None, category=None, contactReports=None, actionType=None,): self.syncOpRevision = syncOpRevision self.category = category self.contactReports = contactReports self.actionType = actionType def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.syncOpRevision = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.category = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.contactReports = [] (_etype784, _size781) = iprot.readListBegin() for _i785 in range(_size781): _elem786 = ContactReport() _elem786.read(iprot) self.contactReports.append(_elem786) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.actionType = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportContacts_args') if self.syncOpRevision is not None: oprot.writeFieldBegin('syncOpRevision', TType.I64, 2) oprot.writeI64(self.syncOpRevision) oprot.writeFieldEnd() if self.category is not None: oprot.writeFieldBegin('category', TType.I32, 3) oprot.writeI32(self.category) oprot.writeFieldEnd() if self.contactReports is not None: oprot.writeFieldBegin('contactReports', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.contactReports)) for iter787 in self.contactReports: iter787.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.actionType is not None: oprot.writeFieldBegin('actionType', TType.I32, 5) oprot.writeI32(self.actionType) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportContacts_args) reportContacts_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'syncOpRevision', None, None, ), # 2 (3, TType.I32, 'category', None, None, ), # 3 (4, TType.LIST, 'contactReports', (TType.STRUCT, [ContactReport, None], False), None, ), # 4 (5, TType.I32, 'actionType', None, None, ), # 5 ) class reportContacts_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype791, _size788) = iprot.readListBegin() for _i792 in range(_size788): _elem793 = ContactReportResult() _elem793.read(iprot) self.success.append(_elem793) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportContacts_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter794 in self.success: iter794.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportContacts_result) reportContacts_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [ContactReportResult, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class reportGroups_args(object): """ Attributes: - syncOpRevision - groups """ def __init__(self, syncOpRevision=None, groups=None,): self.syncOpRevision = syncOpRevision self.groups = groups def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.syncOpRevision = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.groups = [] (_etype798, _size795) = iprot.readListBegin() for _i799 in range(_size795): _elem800 = Group() _elem800.read(iprot) self.groups.append(_elem800) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportGroups_args') if self.syncOpRevision is not None: oprot.writeFieldBegin('syncOpRevision', TType.I64, 2) oprot.writeI64(self.syncOpRevision) oprot.writeFieldEnd() if self.groups is not None: oprot.writeFieldBegin('groups', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.groups)) for iter801 in self.groups: iter801.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportGroups_args) reportGroups_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'syncOpRevision', None, None, ), # 2 (3, TType.LIST, 'groups', (TType.STRUCT, [Group, None], False), None, ), # 3 ) class reportGroups_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportGroups_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportGroups_result) reportGroups_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class reportProfile_args(object): """ Attributes: - syncOpRevision - profile """ def __init__(self, syncOpRevision=None, profile=None,): self.syncOpRevision = syncOpRevision self.profile = profile def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.syncOpRevision = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: self.profile = Profile() self.profile.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportProfile_args') if self.syncOpRevision is not None: oprot.writeFieldBegin('syncOpRevision', TType.I64, 2) oprot.writeI64(self.syncOpRevision) oprot.writeFieldEnd() if self.profile is not None: oprot.writeFieldBegin('profile', TType.STRUCT, 3) self.profile.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportProfile_args) reportProfile_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'syncOpRevision', None, None, ), # 2 (3, TType.STRUCT, 'profile', [Profile, None], None, ), # 3 ) class reportProfile_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportProfile_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportProfile_result) reportProfile_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class reportRooms_args(object): """ Attributes: - syncOpRevision - rooms """ def __init__(self, syncOpRevision=None, rooms=None,): self.syncOpRevision = syncOpRevision self.rooms = rooms def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.syncOpRevision = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.rooms = [] (_etype805, _size802) = iprot.readListBegin() for _i806 in range(_size802): _elem807 = Room() _elem807.read(iprot) self.rooms.append(_elem807) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportRooms_args') if self.syncOpRevision is not None: oprot.writeFieldBegin('syncOpRevision', TType.I64, 2) oprot.writeI64(self.syncOpRevision) oprot.writeFieldEnd() if self.rooms is not None: oprot.writeFieldBegin('rooms', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.rooms)) for iter808 in self.rooms: iter808.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportRooms_args) reportRooms_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'syncOpRevision', None, None, ), # 2 (3, TType.LIST, 'rooms', (TType.STRUCT, [Room, None], False), None, ), # 3 ) class reportRooms_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportRooms_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportRooms_result) reportRooms_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class reportSettings_args(object): """ Attributes: - syncOpRevision - settings """ def __init__(self, syncOpRevision=None, settings=None,): self.syncOpRevision = syncOpRevision self.settings = settings def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I64: self.syncOpRevision = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: self.settings = Settings() self.settings.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportSettings_args') if self.syncOpRevision is not None: oprot.writeFieldBegin('syncOpRevision', TType.I64, 2) oprot.writeI64(self.syncOpRevision) oprot.writeFieldEnd() if self.settings is not None: oprot.writeFieldBegin('settings', TType.STRUCT, 3) self.settings.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportSettings_args) reportSettings_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I64, 'syncOpRevision', None, None, ), # 2 (3, TType.STRUCT, 'settings', [Settings, None], None, ), # 3 ) class reportSettings_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportSettings_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportSettings_result) reportSettings_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class reportSpammer_args(object): """ Attributes: - spammerMid - spammerReasons - spamMessageIds """ def __init__(self, spammerMid=None, spammerReasons=None, spamMessageIds=None,): self.spammerMid = spammerMid self.spammerReasons = spammerReasons self.spamMessageIds = spamMessageIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.spammerMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.spammerReasons = [] (_etype812, _size809) = iprot.readListBegin() for _i813 in range(_size809): _elem814 = iprot.readI32() self.spammerReasons.append(_elem814) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.spamMessageIds = [] (_etype818, _size815) = iprot.readListBegin() for _i819 in range(_size815): _elem820 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.spamMessageIds.append(_elem820) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportSpammer_args') if self.spammerMid is not None: oprot.writeFieldBegin('spammerMid', TType.STRING, 2) oprot.writeString(self.spammerMid.encode('utf-8') if sys.version_info[0] == 2 else self.spammerMid) oprot.writeFieldEnd() if self.spammerReasons is not None: oprot.writeFieldBegin('spammerReasons', TType.LIST, 3) oprot.writeListBegin(TType.I32, len(self.spammerReasons)) for iter821 in self.spammerReasons: oprot.writeI32(iter821) oprot.writeListEnd() oprot.writeFieldEnd() if self.spamMessageIds is not None: oprot.writeFieldBegin('spamMessageIds', TType.LIST, 4) oprot.writeListBegin(TType.STRING, len(self.spamMessageIds)) for iter822 in self.spamMessageIds: oprot.writeString(iter822.encode('utf-8') if sys.version_info[0] == 2 else iter822) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportSpammer_args) reportSpammer_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'spammerMid', 'UTF8', None, ), # 2 (3, TType.LIST, 'spammerReasons', (TType.I32, None, False), None, ), # 3 (4, TType.LIST, 'spamMessageIds', (TType.STRING, 'UTF8', False), None, ), # 4 ) class reportSpammer_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('reportSpammer_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(reportSpammer_result) reportSpammer_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class requestAccountPasswordReset_args(object): """ Attributes: - provider - identifier - locale """ def __init__(self, provider=None, identifier=None, locale=None,): self.provider = provider self.identifier = identifier self.locale = locale def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 4: if ftype == TType.I32: self.provider = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.locale = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('requestAccountPasswordReset_args') if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 2) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.provider is not None: oprot.writeFieldBegin('provider', TType.I32, 4) oprot.writeI32(self.provider) oprot.writeFieldEnd() if self.locale is not None: oprot.writeFieldBegin('locale', TType.STRING, 5) oprot.writeString(self.locale.encode('utf-8') if sys.version_info[0] == 2 else self.locale) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(requestAccountPasswordReset_args) requestAccountPasswordReset_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'identifier', 'UTF8', None, ), # 2 None, # 3 (4, TType.I32, 'provider', None, None, ), # 4 (5, TType.STRING, 'locale', 'UTF8', None, ), # 5 ) class requestAccountPasswordReset_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('requestAccountPasswordReset_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(requestAccountPasswordReset_result) requestAccountPasswordReset_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class requestEmailConfirmation_args(object): """ Attributes: - emailConfirmation """ def __init__(self, emailConfirmation=None,): self.emailConfirmation = emailConfirmation def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRUCT: self.emailConfirmation = EmailConfirmation() self.emailConfirmation.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('requestEmailConfirmation_args') if self.emailConfirmation is not None: oprot.writeFieldBegin('emailConfirmation', TType.STRUCT, 2) self.emailConfirmation.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(requestEmailConfirmation_args) requestEmailConfirmation_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRUCT, 'emailConfirmation', [EmailConfirmation, None], None, ), # 2 ) class requestEmailConfirmation_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = EmailConfirmationSession() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('requestEmailConfirmation_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(requestEmailConfirmation_result) requestEmailConfirmation_result.thrift_spec = ( (0, TType.STRUCT, 'success', [EmailConfirmationSession, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class requestIdentityUnbind_args(object): """ Attributes: - provider - identifier """ def __init__(self, provider=None, identifier=None,): self.provider = provider self.identifier = identifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 4: if ftype == TType.I32: self.provider = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('requestIdentityUnbind_args') if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 2) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.provider is not None: oprot.writeFieldBegin('provider', TType.I32, 4) oprot.writeI32(self.provider) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(requestIdentityUnbind_args) requestIdentityUnbind_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'identifier', 'UTF8', None, ), # 2 None, # 3 (4, TType.I32, 'provider', None, None, ), # 4 ) class requestIdentityUnbind_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('requestIdentityUnbind_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(requestIdentityUnbind_result) requestIdentityUnbind_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class resendEmailConfirmation_args(object): """ Attributes: - verifier """ def __init__(self, verifier=None,): self.verifier = verifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resendEmailConfirmation_args') if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 2) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(resendEmailConfirmation_args) resendEmailConfirmation_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'verifier', 'UTF8', None, ), # 2 ) class resendEmailConfirmation_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = EmailConfirmationSession() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resendEmailConfirmation_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(resendEmailConfirmation_result) resendEmailConfirmation_result.thrift_spec = ( (0, TType.STRUCT, 'success', [EmailConfirmationSession, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class resendPinCode_args(object): """ Attributes: - sessionId """ def __init__(self, sessionId=None,): self.sessionId = sessionId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resendPinCode_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(resendPinCode_args) resendPinCode_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 ) class resendPinCode_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resendPinCode_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(resendPinCode_result) resendPinCode_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class resendPinCodeBySMS_args(object): """ Attributes: - sessionId """ def __init__(self, sessionId=None,): self.sessionId = sessionId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resendPinCodeBySMS_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(resendPinCodeBySMS_args) resendPinCodeBySMS_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 ) class resendPinCodeBySMS_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('resendPinCodeBySMS_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(resendPinCodeBySMS_result) resendPinCodeBySMS_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendChatChecked_args(object): """ Attributes: - seq - consumer - lastMessageId """ def __init__(self, seq=None, consumer=None, lastMessageId=None,): self.seq = seq self.consumer = consumer self.lastMessageId = lastMessageId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.consumer = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.lastMessageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendChatChecked_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.consumer is not None: oprot.writeFieldBegin('consumer', TType.STRING, 2) oprot.writeString(self.consumer.encode('utf-8') if sys.version_info[0] == 2 else self.consumer) oprot.writeFieldEnd() if self.lastMessageId is not None: oprot.writeFieldBegin('lastMessageId', TType.STRING, 3) oprot.writeString(self.lastMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.lastMessageId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendChatChecked_args) sendChatChecked_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRING, 'consumer', 'UTF8', None, ), # 2 (3, TType.STRING, 'lastMessageId', 'UTF8', None, ), # 3 ) class sendChatChecked_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendChatChecked_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendChatChecked_result) sendChatChecked_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendChatRemoved_args(object): """ Attributes: - seq - consumer - lastMessageId """ def __init__(self, seq=None, consumer=None, lastMessageId=None,): self.seq = seq self.consumer = consumer self.lastMessageId = lastMessageId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.consumer = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.lastMessageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendChatRemoved_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.consumer is not None: oprot.writeFieldBegin('consumer', TType.STRING, 2) oprot.writeString(self.consumer.encode('utf-8') if sys.version_info[0] == 2 else self.consumer) oprot.writeFieldEnd() if self.lastMessageId is not None: oprot.writeFieldBegin('lastMessageId', TType.STRING, 3) oprot.writeString(self.lastMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.lastMessageId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendChatRemoved_args) sendChatRemoved_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRING, 'consumer', 'UTF8', None, ), # 2 (3, TType.STRING, 'lastMessageId', 'UTF8', None, ), # 3 ) class sendChatRemoved_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendChatRemoved_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendChatRemoved_result) sendChatRemoved_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendContentPreviewUpdated_args(object): """ Attributes: - esq - messageId - receiverMids """ def __init__(self, esq=None, messageId=None, receiverMids=None,): self.esq = esq self.messageId = messageId self.receiverMids = receiverMids def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.esq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.receiverMids = [] (_etype826, _size823) = iprot.readListBegin() for _i827 in range(_size823): _elem828 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.receiverMids.append(_elem828) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendContentPreviewUpdated_args') if self.esq is not None: oprot.writeFieldBegin('esq', TType.I32, 1) oprot.writeI32(self.esq) oprot.writeFieldEnd() if self.messageId is not None: oprot.writeFieldBegin('messageId', TType.STRING, 2) oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId) oprot.writeFieldEnd() if self.receiverMids is not None: oprot.writeFieldBegin('receiverMids', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.receiverMids)) for iter829 in self.receiverMids: oprot.writeString(iter829.encode('utf-8') if sys.version_info[0] == 2 else iter829) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendContentPreviewUpdated_args) sendContentPreviewUpdated_args.thrift_spec = ( None, # 0 (1, TType.I32, 'esq', None, None, ), # 1 (2, TType.STRING, 'messageId', 'UTF8', None, ), # 2 (3, TType.LIST, 'receiverMids', (TType.STRING, 'UTF8', False), None, ), # 3 ) class sendContentPreviewUpdated_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype831, _vtype832, _size830) = iprot.readMapBegin() for _i834 in range(_size830): _key835 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val836 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.success[_key835] = _val836 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendContentPreviewUpdated_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) for kiter837, viter838 in self.success.items(): oprot.writeString(kiter837.encode('utf-8') if sys.version_info[0] == 2 else kiter837) oprot.writeString(viter838.encode('utf-8') if sys.version_info[0] == 2 else viter838) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendContentPreviewUpdated_result) sendContentPreviewUpdated_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendContentReceipt_args(object): """ Attributes: - seq - consumer - messageId """ def __init__(self, seq=None, consumer=None, messageId=None,): self.seq = seq self.consumer = consumer self.messageId = messageId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.consumer = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendContentReceipt_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.consumer is not None: oprot.writeFieldBegin('consumer', TType.STRING, 2) oprot.writeString(self.consumer.encode('utf-8') if sys.version_info[0] == 2 else self.consumer) oprot.writeFieldEnd() if self.messageId is not None: oprot.writeFieldBegin('messageId', TType.STRING, 3) oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendContentReceipt_args) sendContentReceipt_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRING, 'consumer', 'UTF8', None, ), # 2 (3, TType.STRING, 'messageId', 'UTF8', None, ), # 3 ) class sendContentReceipt_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendContentReceipt_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendContentReceipt_result) sendContentReceipt_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendDummyPush_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendDummyPush_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendDummyPush_args) sendDummyPush_args.thrift_spec = ( ) class sendDummyPush_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendDummyPush_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendDummyPush_result) sendDummyPush_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendEvent_args(object): """ Attributes: - seq - message """ def __init__(self, seq=None, message=None,): self.seq = seq self.message = message def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.message = Message() self.message.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendEvent_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRUCT, 2) self.message.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendEvent_args) sendEvent_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRUCT, 'message', [Message, None], None, ), # 2 ) class sendEvent_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Message() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendEvent_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendEvent_result) sendEvent_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Message, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendMessage_args(object): """ Attributes: - seq - message """ def __init__(self, seq=None, message=None,): self.seq = seq self.message = message def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.message = Message() self.message.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendMessage_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRUCT, 2) self.message.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendMessage_args) sendMessage_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRUCT, 'message', [Message, None], None, ), # 2 ) class sendMessage_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Message() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendMessage_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendMessage_result) sendMessage_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Message, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendMessageIgnored_args(object): """ Attributes: - seq - consumer - messageIds """ def __init__(self, seq=None, consumer=None, messageIds=None,): self.seq = seq self.consumer = consumer self.messageIds = messageIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.consumer = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.messageIds = [] (_etype842, _size839) = iprot.readListBegin() for _i843 in range(_size839): _elem844 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.messageIds.append(_elem844) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendMessageIgnored_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.consumer is not None: oprot.writeFieldBegin('consumer', TType.STRING, 2) oprot.writeString(self.consumer.encode('utf-8') if sys.version_info[0] == 2 else self.consumer) oprot.writeFieldEnd() if self.messageIds is not None: oprot.writeFieldBegin('messageIds', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.messageIds)) for iter845 in self.messageIds: oprot.writeString(iter845.encode('utf-8') if sys.version_info[0] == 2 else iter845) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendMessageIgnored_args) sendMessageIgnored_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRING, 'consumer', 'UTF8', None, ), # 2 (3, TType.LIST, 'messageIds', (TType.STRING, 'UTF8', False), None, ), # 3 ) class sendMessageIgnored_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendMessageIgnored_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendMessageIgnored_result) sendMessageIgnored_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendMessageReceipt_args(object): """ Attributes: - seq - consumer - messageIds """ def __init__(self, seq=None, consumer=None, messageIds=None,): self.seq = seq self.consumer = consumer self.messageIds = messageIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.consumer = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.messageIds = [] (_etype849, _size846) = iprot.readListBegin() for _i850 in range(_size846): _elem851 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.messageIds.append(_elem851) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendMessageReceipt_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.consumer is not None: oprot.writeFieldBegin('consumer', TType.STRING, 2) oprot.writeString(self.consumer.encode('utf-8') if sys.version_info[0] == 2 else self.consumer) oprot.writeFieldEnd() if self.messageIds is not None: oprot.writeFieldBegin('messageIds', TType.LIST, 3) oprot.writeListBegin(TType.STRING, len(self.messageIds)) for iter852 in self.messageIds: oprot.writeString(iter852.encode('utf-8') if sys.version_info[0] == 2 else iter852) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendMessageReceipt_args) sendMessageReceipt_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRING, 'consumer', 'UTF8', None, ), # 2 (3, TType.LIST, 'messageIds', (TType.STRING, 'UTF8', False), None, ), # 3 ) class sendMessageReceipt_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendMessageReceipt_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendMessageReceipt_result) sendMessageReceipt_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class sendMessageToMyHome_args(object): """ Attributes: - seq - message """ def __init__(self, seq=None, message=None,): self.seq = seq self.message = message def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.message = Message() self.message.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendMessageToMyHome_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRUCT, 2) self.message.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendMessageToMyHome_args) sendMessageToMyHome_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRUCT, 'message', [Message, None], None, ), # 2 ) class sendMessageToMyHome_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Message() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('sendMessageToMyHome_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(sendMessageToMyHome_result) sendMessageToMyHome_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Message, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class setBuddyLocation_args(object): """ Attributes: - mid - index - location """ def __init__(self, mid=None, index=None, location=None,): self.mid = mid self.index = index self.location = location def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.index = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRUCT: self.location = Geolocation() self.location.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('setBuddyLocation_args') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 2) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.index is not None: oprot.writeFieldBegin('index', TType.I32, 3) oprot.writeI32(self.index) oprot.writeFieldEnd() if self.location is not None: oprot.writeFieldBegin('location', TType.STRUCT, 4) self.location.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(setBuddyLocation_args) setBuddyLocation_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 (3, TType.I32, 'index', None, None, ), # 3 (4, TType.STRUCT, 'location', [Geolocation, None], None, ), # 4 ) class setBuddyLocation_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('setBuddyLocation_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(setBuddyLocation_result) setBuddyLocation_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class setIdentityCredential_args(object): """ Attributes: - provider - identifier - verifier """ def __init__(self, provider=None, identifier=None, verifier=None,): self.provider = provider self.identifier = identifier self.verifier = verifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 4: if ftype == TType.I32: self.provider = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('setIdentityCredential_args') if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 2) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 3) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() if self.provider is not None: oprot.writeFieldBegin('provider', TType.I32, 4) oprot.writeI32(self.provider) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(setIdentityCredential_args) setIdentityCredential_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'identifier', 'UTF8', None, ), # 2 (3, TType.STRING, 'verifier', 'UTF8', None, ), # 3 (4, TType.I32, 'provider', None, None, ), # 4 ) class setIdentityCredential_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('setIdentityCredential_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(setIdentityCredential_result) setIdentityCredential_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class setNotificationsEnabled_args(object): """ Attributes: - reqSeq - type - target - enablement """ def __init__(self, reqSeq=None, type=None, target=None, enablement=None,): self.reqSeq = reqSeq self.type = type self.target = target self.enablement = enablement def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.target = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.BOOL: self.enablement = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('setNotificationsEnabled_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 2) oprot.writeI32(self.type) oprot.writeFieldEnd() if self.target is not None: oprot.writeFieldBegin('target', TType.STRING, 3) oprot.writeString(self.target.encode('utf-8') if sys.version_info[0] == 2 else self.target) oprot.writeFieldEnd() if self.enablement is not None: oprot.writeFieldBegin('enablement', TType.BOOL, 4) oprot.writeBool(self.enablement) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(setNotificationsEnabled_args) setNotificationsEnabled_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.I32, 'type', None, None, ), # 2 (3, TType.STRING, 'target', 'UTF8', None, ), # 3 (4, TType.BOOL, 'enablement', None, None, ), # 4 ) class setNotificationsEnabled_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('setNotificationsEnabled_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(setNotificationsEnabled_result) setNotificationsEnabled_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class startUpdateVerification_args(object): """ Attributes: - region - carrier - phone - udidHash - deviceInfo - networkCode - locale """ def __init__(self, region=None, carrier=None, phone=None, udidHash=None, deviceInfo=None, networkCode=None, locale=None,): self.region = region self.carrier = carrier self.phone = phone self.udidHash = udidHash self.deviceInfo = deviceInfo self.networkCode = networkCode self.locale = locale def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.carrier = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.phone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: self.networkCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.locale = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('startUpdateVerification_args') if self.region is not None: oprot.writeFieldBegin('region', TType.STRING, 2) oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region) oprot.writeFieldEnd() if self.carrier is not None: oprot.writeFieldBegin('carrier', TType.I32, 3) oprot.writeI32(self.carrier) oprot.writeFieldEnd() if self.phone is not None: oprot.writeFieldBegin('phone', TType.STRING, 4) oprot.writeString(self.phone.encode('utf-8') if sys.version_info[0] == 2 else self.phone) oprot.writeFieldEnd() if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 5) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 6) self.deviceInfo.write(oprot) oprot.writeFieldEnd() if self.networkCode is not None: oprot.writeFieldBegin('networkCode', TType.STRING, 7) oprot.writeString(self.networkCode.encode('utf-8') if sys.version_info[0] == 2 else self.networkCode) oprot.writeFieldEnd() if self.locale is not None: oprot.writeFieldBegin('locale', TType.STRING, 8) oprot.writeString(self.locale.encode('utf-8') if sys.version_info[0] == 2 else self.locale) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(startUpdateVerification_args) startUpdateVerification_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'region', 'UTF8', None, ), # 2 (3, TType.I32, 'carrier', None, None, ), # 3 (4, TType.STRING, 'phone', 'UTF8', None, ), # 4 (5, TType.STRING, 'udidHash', 'UTF8', None, ), # 5 (6, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 6 (7, TType.STRING, 'networkCode', 'UTF8', None, ), # 7 (8, TType.STRING, 'locale', 'UTF8', None, ), # 8 ) class startUpdateVerification_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = VerificationSessionData() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('startUpdateVerification_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(startUpdateVerification_result) startUpdateVerification_result.thrift_spec = ( (0, TType.STRUCT, 'success', [VerificationSessionData, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class startVerification_args(object): """ Attributes: - region - carrier - phone - udidHash - deviceInfo - networkCode - mid - locale """ def __init__(self, region=None, carrier=None, phone=None, udidHash=None, deviceInfo=None, networkCode=None, mid=None, locale=None,): self.region = region self.carrier = carrier self.phone = phone self.udidHash = udidHash self.deviceInfo = deviceInfo self.networkCode = networkCode self.mid = mid self.locale = locale def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.carrier = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.phone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: self.networkCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: self.locale = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('startVerification_args') if self.region is not None: oprot.writeFieldBegin('region', TType.STRING, 2) oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region) oprot.writeFieldEnd() if self.carrier is not None: oprot.writeFieldBegin('carrier', TType.I32, 3) oprot.writeI32(self.carrier) oprot.writeFieldEnd() if self.phone is not None: oprot.writeFieldBegin('phone', TType.STRING, 4) oprot.writeString(self.phone.encode('utf-8') if sys.version_info[0] == 2 else self.phone) oprot.writeFieldEnd() if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 5) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 6) self.deviceInfo.write(oprot) oprot.writeFieldEnd() if self.networkCode is not None: oprot.writeFieldBegin('networkCode', TType.STRING, 7) oprot.writeString(self.networkCode.encode('utf-8') if sys.version_info[0] == 2 else self.networkCode) oprot.writeFieldEnd() if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 8) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.locale is not None: oprot.writeFieldBegin('locale', TType.STRING, 9) oprot.writeString(self.locale.encode('utf-8') if sys.version_info[0] == 2 else self.locale) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(startVerification_args) startVerification_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'region', 'UTF8', None, ), # 2 (3, TType.I32, 'carrier', None, None, ), # 3 (4, TType.STRING, 'phone', 'UTF8', None, ), # 4 (5, TType.STRING, 'udidHash', 'UTF8', None, ), # 5 (6, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 6 (7, TType.STRING, 'networkCode', 'UTF8', None, ), # 7 (8, TType.STRING, 'mid', 'UTF8', None, ), # 8 (9, TType.STRING, 'locale', 'UTF8', None, ), # 9 ) class startVerification_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = VerificationSessionData() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('startVerification_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(startVerification_result) startVerification_result.thrift_spec = ( (0, TType.STRUCT, 'success', [VerificationSessionData, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class storeUpdateProfileAttribute_args(object): """ Attributes: - seq - profileAttribute - value """ def __init__(self, seq=None, profileAttribute=None, value=None,): self.seq = seq self.profileAttribute = profileAttribute self.value = value def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.profileAttribute = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.value = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('storeUpdateProfileAttribute_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.profileAttribute is not None: oprot.writeFieldBegin('profileAttribute', TType.I32, 2) oprot.writeI32(self.profileAttribute) oprot.writeFieldEnd() if self.value is not None: oprot.writeFieldBegin('value', TType.STRING, 3) oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(storeUpdateProfileAttribute_args) storeUpdateProfileAttribute_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.I32, 'profileAttribute', None, None, ), # 2 (3, TType.STRING, 'value', 'UTF8', None, ), # 3 ) class storeUpdateProfileAttribute_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('storeUpdateProfileAttribute_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(storeUpdateProfileAttribute_result) storeUpdateProfileAttribute_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class syncContactBySnsIds_args(object): """ Attributes: - reqSeq - modifications """ def __init__(self, reqSeq=None, modifications=None,): self.reqSeq = reqSeq self.modifications = modifications def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.modifications = [] (_etype856, _size853) = iprot.readListBegin() for _i857 in range(_size853): _elem858 = SnsFriendModification() _elem858.read(iprot) self.modifications.append(_elem858) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('syncContactBySnsIds_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.modifications is not None: oprot.writeFieldBegin('modifications', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.modifications)) for iter859 in self.modifications: iter859.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(syncContactBySnsIds_args) syncContactBySnsIds_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.LIST, 'modifications', (TType.STRUCT, [SnsFriendModification, None], False), None, ), # 2 ) class syncContactBySnsIds_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.LIST: self.success = [] (_etype863, _size860) = iprot.readListBegin() for _i864 in range(_size860): _elem865 = SnsFriendContactRegistration() _elem865.read(iprot) self.success.append(_elem865) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('syncContactBySnsIds_result') if self.success is not None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) for iter866 in self.success: iter866.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(syncContactBySnsIds_result) syncContactBySnsIds_result.thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT, [SnsFriendContactRegistration, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class syncContacts_args(object): """ Attributes: - reqSeq - localContacts """ def __init__(self, reqSeq=None, localContacts=None,): self.reqSeq = reqSeq self.localContacts = localContacts def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.localContacts = [] (_etype870, _size867) = iprot.readListBegin() for _i871 in range(_size867): _elem872 = ContactModification() _elem872.read(iprot) self.localContacts.append(_elem872) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('syncContacts_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.localContacts is not None: oprot.writeFieldBegin('localContacts', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.localContacts)) for iter873 in self.localContacts: iter873.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(syncContacts_args) syncContacts_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.LIST, 'localContacts', (TType.STRUCT, [ContactModification, None], False), None, ), # 2 ) class syncContacts_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.MAP: self.success = {} (_ktype875, _vtype876, _size874) = iprot.readMapBegin() for _i878 in range(_size874): _key879 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val880 = ContactRegistration() _val880.read(iprot) self.success[_key879] = _val880 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('syncContacts_result') if self.success is not None: oprot.writeFieldBegin('success', TType.MAP, 0) oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) for kiter881, viter882 in self.success.items(): oprot.writeString(kiter881.encode('utf-8') if sys.version_info[0] == 2 else kiter881) viter882.write(oprot) oprot.writeMapEnd() oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(syncContacts_result) syncContacts_result.thrift_spec = ( (0, TType.MAP, 'success', (TType.STRING, 'UTF8', TType.STRUCT, [ContactRegistration, None], False), None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class trySendMessage_args(object): """ Attributes: - seq - message """ def __init__(self, seq=None, message=None,): self.seq = seq self.message = message def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.seq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.message = Message() self.message.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('trySendMessage_args') if self.seq is not None: oprot.writeFieldBegin('seq', TType.I32, 1) oprot.writeI32(self.seq) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRUCT, 2) self.message.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(trySendMessage_args) trySendMessage_args.thrift_spec = ( None, # 0 (1, TType.I32, 'seq', None, None, ), # 1 (2, TType.STRUCT, 'message', [Message, None], None, ), # 2 ) class trySendMessage_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = Message() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('trySendMessage_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(trySendMessage_result) trySendMessage_result.thrift_spec = ( (0, TType.STRUCT, 'success', [Message, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class unblockContact_args(object): """ Attributes: - reqSeq - id """ def __init__(self, reqSeq=None, id=None,): self.reqSeq = reqSeq self.id = id def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('unblockContact_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 2) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(unblockContact_args) unblockContact_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'id', 'UTF8', None, ), # 2 ) class unblockContact_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('unblockContact_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(unblockContact_result) unblockContact_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class unblockRecommendation_args(object): """ Attributes: - reqSeq - id """ def __init__(self, reqSeq=None, id=None,): self.reqSeq = reqSeq self.id = id def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('unblockRecommendation_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 2) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(unblockRecommendation_args) unblockRecommendation_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'id', 'UTF8', None, ), # 2 ) class unblockRecommendation_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('unblockRecommendation_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(unblockRecommendation_result) unblockRecommendation_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class unregisterUserAndDevice_args(object): def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('unregisterUserAndDevice_args') oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(unregisterUserAndDevice_args) unregisterUserAndDevice_args.thrift_spec = ( ) class unregisterUserAndDevice_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('unregisterUserAndDevice_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(unregisterUserAndDevice_result) unregisterUserAndDevice_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateApnsDeviceToken_args(object): """ Attributes: - apnsDeviceToken """ def __init__(self, apnsDeviceToken=None,): self.apnsDeviceToken = apnsDeviceToken def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.apnsDeviceToken = iprot.readBinary() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateApnsDeviceToken_args') if self.apnsDeviceToken is not None: oprot.writeFieldBegin('apnsDeviceToken', TType.STRING, 2) oprot.writeBinary(self.apnsDeviceToken) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateApnsDeviceToken_args) updateApnsDeviceToken_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'apnsDeviceToken', 'BINARY', None, ), # 2 ) class updateApnsDeviceToken_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateApnsDeviceToken_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateApnsDeviceToken_result) updateApnsDeviceToken_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateBuddySetting_args(object): """ Attributes: - key - value """ def __init__(self, key=None, value=None,): self.key = key self.value = value def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.key = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.value = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateBuddySetting_args') if self.key is not None: oprot.writeFieldBegin('key', TType.STRING, 2) oprot.writeString(self.key.encode('utf-8') if sys.version_info[0] == 2 else self.key) oprot.writeFieldEnd() if self.value is not None: oprot.writeFieldBegin('value', TType.STRING, 3) oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateBuddySetting_args) updateBuddySetting_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'key', 'UTF8', None, ), # 2 (3, TType.STRING, 'value', 'UTF8', None, ), # 3 ) class updateBuddySetting_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateBuddySetting_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateBuddySetting_result) updateBuddySetting_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateC2DMRegistrationId_args(object): """ Attributes: - registrationId """ def __init__(self, registrationId=None,): self.registrationId = registrationId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.registrationId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateC2DMRegistrationId_args') if self.registrationId is not None: oprot.writeFieldBegin('registrationId', TType.STRING, 2) oprot.writeString(self.registrationId.encode('utf-8') if sys.version_info[0] == 2 else self.registrationId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateC2DMRegistrationId_args) updateC2DMRegistrationId_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'registrationId', 'UTF8', None, ), # 2 ) class updateC2DMRegistrationId_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateC2DMRegistrationId_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateC2DMRegistrationId_result) updateC2DMRegistrationId_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateContactSetting_args(object): """ Attributes: - reqSeq - mid - flag - value """ def __init__(self, reqSeq=None, mid=None, flag=None, value=None,): self.reqSeq = reqSeq self.mid = mid self.flag = flag self.value = value def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.flag = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.value = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateContactSetting_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 2) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.flag is not None: oprot.writeFieldBegin('flag', TType.I32, 3) oprot.writeI32(self.flag) oprot.writeFieldEnd() if self.value is not None: oprot.writeFieldBegin('value', TType.STRING, 4) oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateContactSetting_args) updateContactSetting_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 (3, TType.I32, 'flag', None, None, ), # 3 (4, TType.STRING, 'value', 'UTF8', None, ), # 4 ) class updateContactSetting_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateContactSetting_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateContactSetting_result) updateContactSetting_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateCustomModeSettings_args(object): """ Attributes: - customMode - paramMap """ def __init__(self, customMode=None, paramMap=None,): self.customMode = customMode self.paramMap = paramMap def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.I32: self.customMode = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.MAP: self.paramMap = {} (_ktype884, _vtype885, _size883) = iprot.readMapBegin() for _i887 in range(_size883): _key888 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val889 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.paramMap[_key888] = _val889 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateCustomModeSettings_args') if self.customMode is not None: oprot.writeFieldBegin('customMode', TType.I32, 2) oprot.writeI32(self.customMode) oprot.writeFieldEnd() if self.paramMap is not None: oprot.writeFieldBegin('paramMap', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.paramMap)) for kiter890, viter891 in self.paramMap.items(): oprot.writeString(kiter890.encode('utf-8') if sys.version_info[0] == 2 else kiter890) oprot.writeString(viter891.encode('utf-8') if sys.version_info[0] == 2 else viter891) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateCustomModeSettings_args) updateCustomModeSettings_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.I32, 'customMode', None, None, ), # 2 (3, TType.MAP, 'paramMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 ) class updateCustomModeSettings_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateCustomModeSettings_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateCustomModeSettings_result) updateCustomModeSettings_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateDeviceInfo_args(object): """ Attributes: - deviceUid - deviceInfo """ def __init__(self, deviceUid=None, deviceInfo=None,): self.deviceUid = deviceUid self.deviceInfo = deviceInfo def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.deviceUid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: self.deviceInfo = DeviceInfo() self.deviceInfo.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateDeviceInfo_args') if self.deviceUid is not None: oprot.writeFieldBegin('deviceUid', TType.STRING, 2) oprot.writeString(self.deviceUid.encode('utf-8') if sys.version_info[0] == 2 else self.deviceUid) oprot.writeFieldEnd() if self.deviceInfo is not None: oprot.writeFieldBegin('deviceInfo', TType.STRUCT, 3) self.deviceInfo.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateDeviceInfo_args) updateDeviceInfo_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'deviceUid', 'UTF8', None, ), # 2 (3, TType.STRUCT, 'deviceInfo', [DeviceInfo, None], None, ), # 3 ) class updateDeviceInfo_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateDeviceInfo_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateDeviceInfo_result) updateDeviceInfo_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateGroup_args(object): """ Attributes: - reqSeq - group """ def __init__(self, reqSeq=None, group=None,): self.reqSeq = reqSeq self.group = group def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.group = Group() self.group.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateGroup_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.group is not None: oprot.writeFieldBegin('group', TType.STRUCT, 2) self.group.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateGroup_args) updateGroup_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRUCT, 'group', [Group, None], None, ), # 2 ) class updateGroup_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateGroup_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateGroup_result) updateGroup_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateNotificationToken_args(object): """ Attributes: - type - token """ def __init__(self, type=None, token=None,): self.type = type self.token = token def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 3: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.token = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateNotificationToken_args') if self.token is not None: oprot.writeFieldBegin('token', TType.STRING, 2) oprot.writeString(self.token.encode('utf-8') if sys.version_info[0] == 2 else self.token) oprot.writeFieldEnd() if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 3) oprot.writeI32(self.type) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateNotificationToken_args) updateNotificationToken_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'token', 'UTF8', None, ), # 2 (3, TType.I32, 'type', None, None, ), # 3 ) class updateNotificationToken_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateNotificationToken_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateNotificationToken_result) updateNotificationToken_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateNotificationTokenWithBytes_args(object): """ Attributes: - type - token """ def __init__(self, type=None, token=None,): self.type = type self.token = token def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 3: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.token = iprot.readBinary() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateNotificationTokenWithBytes_args') if self.token is not None: oprot.writeFieldBegin('token', TType.STRING, 2) oprot.writeBinary(self.token) oprot.writeFieldEnd() if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 3) oprot.writeI32(self.type) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateNotificationTokenWithBytes_args) updateNotificationTokenWithBytes_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'token', 'BINARY', None, ), # 2 (3, TType.I32, 'type', None, None, ), # 3 ) class updateNotificationTokenWithBytes_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateNotificationTokenWithBytes_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateNotificationTokenWithBytes_result) updateNotificationTokenWithBytes_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateProfile_args(object): """ Attributes: - reqSeq - profile """ def __init__(self, reqSeq=None, profile=None,): self.reqSeq = reqSeq self.profile = profile def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.profile = Profile() self.profile.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateProfile_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.profile is not None: oprot.writeFieldBegin('profile', TType.STRUCT, 2) self.profile.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateProfile_args) updateProfile_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRUCT, 'profile', [Profile, None], None, ), # 2 ) class updateProfile_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateProfile_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateProfile_result) updateProfile_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateProfileAttribute_args(object): """ Attributes: - reqSeq - attr - value """ def __init__(self, reqSeq=None, attr=None, value=None,): self.reqSeq = reqSeq self.attr = attr self.value = value def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.attr = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.value = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateProfileAttribute_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.attr is not None: oprot.writeFieldBegin('attr', TType.I32, 2) oprot.writeI32(self.attr) oprot.writeFieldEnd() if self.value is not None: oprot.writeFieldBegin('value', TType.STRING, 3) oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateProfileAttribute_args) updateProfileAttribute_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.I32, 'attr', None, None, ), # 2 (3, TType.STRING, 'value', 'UTF8', None, ), # 3 ) class updateProfileAttribute_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateProfileAttribute_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateProfileAttribute_result) updateProfileAttribute_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateRegion_args(object): """ Attributes: - region """ def __init__(self, region=None,): self.region = region def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateRegion_args') if self.region is not None: oprot.writeFieldBegin('region', TType.STRING, 2) oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateRegion_args) updateRegion_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'region', 'UTF8', None, ), # 2 ) class updateRegion_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateRegion_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateRegion_result) updateRegion_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateSettings_args(object): """ Attributes: - reqSeq - settings """ def __init__(self, reqSeq=None, settings=None,): self.reqSeq = reqSeq self.settings = settings def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.settings = Settings() self.settings.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateSettings_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.settings is not None: oprot.writeFieldBegin('settings', TType.STRUCT, 2) self.settings.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateSettings_args) updateSettings_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRUCT, 'settings', [Settings, None], None, ), # 2 ) class updateSettings_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateSettings_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateSettings_result) updateSettings_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateSettings2_args(object): """ Attributes: - reqSeq - settings """ def __init__(self, reqSeq=None, settings=None,): self.reqSeq = reqSeq self.settings = settings def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.settings = Settings() self.settings.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateSettings2_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.settings is not None: oprot.writeFieldBegin('settings', TType.STRUCT, 2) self.settings.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateSettings2_args) updateSettings2_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.STRUCT, 'settings', [Settings, None], None, ), # 2 ) class updateSettings2_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.I32: self.success = iprot.readI32() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateSettings2_result') if self.success is not None: oprot.writeFieldBegin('success', TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateSettings2_result) updateSettings2_result.thrift_spec = ( (0, TType.I32, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateSettingsAttribute_args(object): """ Attributes: - reqSeq - attr - value """ def __init__(self, reqSeq=None, attr=None, value=None,): self.reqSeq = reqSeq self.attr = attr self.value = value def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.attr = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.value = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateSettingsAttribute_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.attr is not None: oprot.writeFieldBegin('attr', TType.I32, 2) oprot.writeI32(self.attr) oprot.writeFieldEnd() if self.value is not None: oprot.writeFieldBegin('value', TType.STRING, 3) oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateSettingsAttribute_args) updateSettingsAttribute_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.I32, 'attr', None, None, ), # 2 (3, TType.STRING, 'value', 'UTF8', None, ), # 3 ) class updateSettingsAttribute_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateSettingsAttribute_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateSettingsAttribute_result) updateSettingsAttribute_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class updateSettingsAttributes_args(object): """ Attributes: - reqSeq - attrBitset - settings """ def __init__(self, reqSeq=None, attrBitset=None, settings=None,): self.reqSeq = reqSeq self.attrBitset = attrBitset self.settings = settings def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.attrBitset = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: self.settings = Settings() self.settings.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateSettingsAttributes_args') if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 1) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.attrBitset is not None: oprot.writeFieldBegin('attrBitset', TType.I32, 2) oprot.writeI32(self.attrBitset) oprot.writeFieldEnd() if self.settings is not None: oprot.writeFieldBegin('settings', TType.STRUCT, 3) self.settings.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateSettingsAttributes_args) updateSettingsAttributes_args.thrift_spec = ( None, # 0 (1, TType.I32, 'reqSeq', None, None, ), # 1 (2, TType.I32, 'attrBitset', None, None, ), # 2 (3, TType.STRUCT, 'settings', [Settings, None], None, ), # 3 ) class updateSettingsAttributes_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.I32: self.success = iprot.readI32() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('updateSettingsAttributes_result') if self.success is not None: oprot.writeFieldBegin('success', TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(updateSettingsAttributes_result) updateSettingsAttributes_result.thrift_spec = ( (0, TType.I32, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class verifyIdentityCredential_args(object): """ Attributes: - identityProvider - identifier - password """ def __init__(self, identityProvider=None, identifier=None, password=None,): self.identityProvider = identityProvider self.identifier = identifier self.password = password def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 8: if ftype == TType.I32: self.identityProvider = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('verifyIdentityCredential_args') if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 3) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.password is not None: oprot.writeFieldBegin('password', TType.STRING, 4) oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) oprot.writeFieldEnd() if self.identityProvider is not None: oprot.writeFieldBegin('identityProvider', TType.I32, 8) oprot.writeI32(self.identityProvider) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(verifyIdentityCredential_args) verifyIdentityCredential_args.thrift_spec = ( None, # 0 None, # 1 None, # 2 (3, TType.STRING, 'identifier', 'UTF8', None, ), # 3 (4, TType.STRING, 'password', 'UTF8', None, ), # 4 None, # 5 None, # 6 None, # 7 (8, TType.I32, 'identityProvider', None, None, ), # 8 ) class verifyIdentityCredential_result(object): """ Attributes: - e """ def __init__(self, e=None,): self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('verifyIdentityCredential_result') if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(verifyIdentityCredential_result) verifyIdentityCredential_result.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class verifyIdentityCredentialWithResult_args(object): """ Attributes: - identityCredential """ def __init__(self, identityCredential=None,): self.identityCredential = identityCredential def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRUCT: self.identityCredential = IdentityCredential() self.identityCredential.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('verifyIdentityCredentialWithResult_args') if self.identityCredential is not None: oprot.writeFieldBegin('identityCredential', TType.STRUCT, 2) self.identityCredential.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(verifyIdentityCredentialWithResult_args) verifyIdentityCredentialWithResult_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRUCT, 'identityCredential', [IdentityCredential, None], None, ), # 2 ) class verifyIdentityCredentialWithResult_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRUCT: self.success = UserAuthStatus() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('verifyIdentityCredentialWithResult_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(verifyIdentityCredentialWithResult_result) verifyIdentityCredentialWithResult_result.thrift_spec = ( (0, TType.STRUCT, 'success', [UserAuthStatus, None], None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class verifyPhone_args(object): """ Attributes: - sessionId - pinCode - udidHash """ def __init__(self, sessionId=None, pinCode=None, udidHash=None,): self.sessionId = sessionId self.pinCode = pinCode self.udidHash = udidHash def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.pinCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.udidHash = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('verifyPhone_args') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() if self.pinCode is not None: oprot.writeFieldBegin('pinCode', TType.STRING, 3) oprot.writeString(self.pinCode.encode('utf-8') if sys.version_info[0] == 2 else self.pinCode) oprot.writeFieldEnd() if self.udidHash is not None: oprot.writeFieldBegin('udidHash', TType.STRING, 4) oprot.writeString(self.udidHash.encode('utf-8') if sys.version_info[0] == 2 else self.udidHash) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(verifyPhone_args) verifyPhone_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 (3, TType.STRING, 'pinCode', 'UTF8', None, ), # 3 (4, TType.STRING, 'udidHash', 'UTF8', None, ), # 4 ) class verifyPhone_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.I32: self.success = iprot.readI32() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('verifyPhone_result') if self.success is not None: oprot.writeFieldBegin('success', TType.I32, 0) oprot.writeI32(self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(verifyPhone_result) verifyPhone_result.thrift_spec = ( (0, TType.I32, 'success', None, None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) class verifyQrcode_args(object): """ Attributes: - verifier - pinCode """ def __init__(self, verifier=None, pinCode=None,): self.verifier = verifier self.pinCode = pinCode def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 2: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.pinCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('verifyQrcode_args') if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 2) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() if self.pinCode is not None: oprot.writeFieldBegin('pinCode', TType.STRING, 3) oprot.writeString(self.pinCode.encode('utf-8') if sys.version_info[0] == 2 else self.pinCode) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(verifyQrcode_args) verifyQrcode_args.thrift_spec = ( None, # 0 None, # 1 (2, TType.STRING, 'verifier', 'UTF8', None, ), # 2 (3, TType.STRING, 'pinCode', 'UTF8', None, ), # 3 ) class verifyQrcode_result(object): """ Attributes: - success - e """ def __init__(self, success=None, e=None,): self.success = success self.e = e def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 0: if ftype == TType.STRING: self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: self.e = TalkException() self.e.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('verifyQrcode_result') if self.success is not None: oprot.writeFieldBegin('success', TType.STRING, 0) oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success) oprot.writeFieldEnd() if self.e is not None: oprot.writeFieldBegin('e', TType.STRUCT, 1) self.e.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(verifyQrcode_result) verifyQrcode_result.thrift_spec = ( (0, TType.STRING, 'success', 'UTF8', None, ), # 0 (1, TType.STRUCT, 'e', [TalkException, None], None, ), # 1 ) fix_spec(all_structs) del all_structs
yuuki-core
/yuuki_core-6.5.2.tar.gz/yuuki_core-6.5.2/yuuki_core/TalkService.py
TalkService.py
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec import sys from thrift.transport import TTransport all_structs = [] class ApplicationType(object): IOS = 16 IOS_RC = 17 IOS_BETA = 18 IOS_ALPHA = 19 ANDROID = 32 ANDROID_RC = 33 ANDROID_BETA = 34 ANDROID_ALPHA = 35 WAP = 48 WAP_RC = 49 WAP_BETA = 50 WAP_ALPHA = 51 BOT = 64 BOT_RC = 65 BOT_BETA = 66 BOT_ALPHA = 67 WEB = 80 WEB_RC = 81 WEB_BETA = 82 WEB_ALPHA = 83 DESKTOPWIN = 96 DESKTOPWIN_RC = 97 DESKTOPWIN_BETA = 98 DESKTOPWIN_ALPHA = 99 DESKTOPMAC = 112 DESKTOPMAC_RC = 113 DESKTOPMAC_BETA = 114 DESKTOPMAC_ALPHA = 115 CHANNELGW = 128 CHANNELGW_RC = 129 CHANNELGW_BETA = 130 CHANNELGW_ALPHA = 131 CHANNELCP = 144 CHANNELCP_RC = 145 CHANNELCP_BETA = 146 CHANNELCP_ALPHA = 147 WINPHONE = 160 WINPHONE_RC = 161 WINPHONE_BETA = 162 WINPHONE_ALPHA = 163 BLACKBERRY = 176 BLACKBERRY_RC = 177 BLACKBERRY_BETA = 178 BLACKBERRY_ALPHA = 179 WINMETRO = 192 WINMETRO_RC = 193 WINMETRO_BETA = 194 WINMETRO_ALPHA = 195 S40 = 208 S40_RC = 209 S40_BETA = 210 S40_ALPHA = 211 CHRONO = 224 CHRONO_RC = 225 CHRONO_BETA = 226 CHRONO_ALPHA = 227 TIZEN = 256 TIZEN_RC = 257 TIZEN_BETA = 258 TIZEN_ALPHA = 259 VIRTUAL = 272 _VALUES_TO_NAMES = { 16: "IOS", 17: "IOS_RC", 18: "IOS_BETA", 19: "IOS_ALPHA", 32: "ANDROID", 33: "ANDROID_RC", 34: "ANDROID_BETA", 35: "ANDROID_ALPHA", 48: "WAP", 49: "WAP_RC", 50: "WAP_BETA", 51: "WAP_ALPHA", 64: "BOT", 65: "BOT_RC", 66: "BOT_BETA", 67: "BOT_ALPHA", 80: "WEB", 81: "WEB_RC", 82: "WEB_BETA", 83: "WEB_ALPHA", 96: "DESKTOPWIN", 97: "DESKTOPWIN_RC", 98: "DESKTOPWIN_BETA", 99: "DESKTOPWIN_ALPHA", 112: "DESKTOPMAC", 113: "DESKTOPMAC_RC", 114: "DESKTOPMAC_BETA", 115: "DESKTOPMAC_ALPHA", 128: "CHANNELGW", 129: "CHANNELGW_RC", 130: "CHANNELGW_BETA", 131: "CHANNELGW_ALPHA", 144: "CHANNELCP", 145: "CHANNELCP_RC", 146: "CHANNELCP_BETA", 147: "CHANNELCP_ALPHA", 160: "WINPHONE", 161: "WINPHONE_RC", 162: "WINPHONE_BETA", 163: "WINPHONE_ALPHA", 176: "BLACKBERRY", 177: "BLACKBERRY_RC", 178: "BLACKBERRY_BETA", 179: "BLACKBERRY_ALPHA", 192: "WINMETRO", 193: "WINMETRO_RC", 194: "WINMETRO_BETA", 195: "WINMETRO_ALPHA", 208: "S40", 209: "S40_RC", 210: "S40_BETA", 211: "S40_ALPHA", 224: "CHRONO", 225: "CHRONO_RC", 226: "CHRONO_BETA", 227: "CHRONO_ALPHA", 256: "TIZEN", 257: "TIZEN_RC", 258: "TIZEN_BETA", 259: "TIZEN_ALPHA", 272: "VIRTUAL", } _NAMES_TO_VALUES = { "IOS": 16, "IOS_RC": 17, "IOS_BETA": 18, "IOS_ALPHA": 19, "ANDROID": 32, "ANDROID_RC": 33, "ANDROID_BETA": 34, "ANDROID_ALPHA": 35, "WAP": 48, "WAP_RC": 49, "WAP_BETA": 50, "WAP_ALPHA": 51, "BOT": 64, "BOT_RC": 65, "BOT_BETA": 66, "BOT_ALPHA": 67, "WEB": 80, "WEB_RC": 81, "WEB_BETA": 82, "WEB_ALPHA": 83, "DESKTOPWIN": 96, "DESKTOPWIN_RC": 97, "DESKTOPWIN_BETA": 98, "DESKTOPWIN_ALPHA": 99, "DESKTOPMAC": 112, "DESKTOPMAC_RC": 113, "DESKTOPMAC_BETA": 114, "DESKTOPMAC_ALPHA": 115, "CHANNELGW": 128, "CHANNELGW_RC": 129, "CHANNELGW_BETA": 130, "CHANNELGW_ALPHA": 131, "CHANNELCP": 144, "CHANNELCP_RC": 145, "CHANNELCP_BETA": 146, "CHANNELCP_ALPHA": 147, "WINPHONE": 160, "WINPHONE_RC": 161, "WINPHONE_BETA": 162, "WINPHONE_ALPHA": 163, "BLACKBERRY": 176, "BLACKBERRY_RC": 177, "BLACKBERRY_BETA": 178, "BLACKBERRY_ALPHA": 179, "WINMETRO": 192, "WINMETRO_RC": 193, "WINMETRO_BETA": 194, "WINMETRO_ALPHA": 195, "S40": 208, "S40_RC": 209, "S40_BETA": 210, "S40_ALPHA": 211, "CHRONO": 224, "CHRONO_RC": 225, "CHRONO_BETA": 226, "CHRONO_ALPHA": 227, "TIZEN": 256, "TIZEN_RC": 257, "TIZEN_BETA": 258, "TIZEN_ALPHA": 259, "VIRTUAL": 272, } class BuddyBannerLinkType(object): BUDDY_BANNER_LINK_HIDDEN = 0 BUDDY_BANNER_LINK_MID = 1 BUDDY_BANNER_LINK_URL = 2 _VALUES_TO_NAMES = { 0: "BUDDY_BANNER_LINK_HIDDEN", 1: "BUDDY_BANNER_LINK_MID", 2: "BUDDY_BANNER_LINK_URL", } _NAMES_TO_VALUES = { "BUDDY_BANNER_LINK_HIDDEN": 0, "BUDDY_BANNER_LINK_MID": 1, "BUDDY_BANNER_LINK_URL": 2, } class BuddyOnAirType(object): NORMAL = 0 LIVE = 1 VOIP = 2 _VALUES_TO_NAMES = { 0: "NORMAL", 1: "LIVE", 2: "VOIP", } _NAMES_TO_VALUES = { "NORMAL": 0, "LIVE": 1, "VOIP": 2, } class BuddyResultState(object): ACCEPTED = 1 SUCCEEDED = 2 FAILED = 3 CANCELLED = 4 NOTIFY_FAILED = 5 STORING = 11 UPLOADING = 21 NOTIFYING = 31 _VALUES_TO_NAMES = { 1: "ACCEPTED", 2: "SUCCEEDED", 3: "FAILED", 4: "CANCELLED", 5: "NOTIFY_FAILED", 11: "STORING", 21: "UPLOADING", 31: "NOTIFYING", } _NAMES_TO_VALUES = { "ACCEPTED": 1, "SUCCEEDED": 2, "FAILED": 3, "CANCELLED": 4, "NOTIFY_FAILED": 5, "STORING": 11, "UPLOADING": 21, "NOTIFYING": 31, } class BuddySearchRequestSource(object): NA = 0 FRIEND_VIEW = 1 OFFICIAL_ACCOUNT_VIEW = 2 _VALUES_TO_NAMES = { 0: "NA", 1: "FRIEND_VIEW", 2: "OFFICIAL_ACCOUNT_VIEW", } _NAMES_TO_VALUES = { "NA": 0, "FRIEND_VIEW": 1, "OFFICIAL_ACCOUNT_VIEW": 2, } class CarrierCode(object): NOT_SPECIFIED = 0 JP_DOCOMO = 1 JP_AU = 2 JP_SOFTBANK = 3 KR_SKT = 17 KR_KT = 18 KR_LGT = 19 _VALUES_TO_NAMES = { 0: "NOT_SPECIFIED", 1: "JP_DOCOMO", 2: "JP_AU", 3: "JP_SOFTBANK", 17: "KR_SKT", 18: "KR_KT", 19: "KR_LGT", } _NAMES_TO_VALUES = { "NOT_SPECIFIED": 0, "JP_DOCOMO": 1, "JP_AU": 2, "JP_SOFTBANK": 3, "KR_SKT": 17, "KR_KT": 18, "KR_LGT": 19, } class ChannelConfiguration(object): MESSAGE = 0 MESSAGE_NOTIFICATION = 1 NOTIFICATION_CENTER = 2 _VALUES_TO_NAMES = { 0: "MESSAGE", 1: "MESSAGE_NOTIFICATION", 2: "NOTIFICATION_CENTER", } _NAMES_TO_VALUES = { "MESSAGE": 0, "MESSAGE_NOTIFICATION": 1, "NOTIFICATION_CENTER": 2, } class ChannelErrorCode(object): ILLEGAL_ARGUMENT = 0 INTERNAL_ERROR = 1 CONNECTION_ERROR = 2 AUTHENTICATIONI_FAILED = 3 NEED_PERMISSION_APPROVAL = 4 COIN_NOT_USABLE = 5 _VALUES_TO_NAMES = { 0: "ILLEGAL_ARGUMENT", 1: "INTERNAL_ERROR", 2: "CONNECTION_ERROR", 3: "AUTHENTICATIONI_FAILED", 4: "NEED_PERMISSION_APPROVAL", 5: "COIN_NOT_USABLE", } _NAMES_TO_VALUES = { "ILLEGAL_ARGUMENT": 0, "INTERNAL_ERROR": 1, "CONNECTION_ERROR": 2, "AUTHENTICATIONI_FAILED": 3, "NEED_PERMISSION_APPROVAL": 4, "COIN_NOT_USABLE": 5, } class ChannelSyncType(object): SYNC = 0 REMOVE = 1 _VALUES_TO_NAMES = { 0: "SYNC", 1: "REMOVE", } _NAMES_TO_VALUES = { "SYNC": 0, "REMOVE": 1, } class ContactAttribute(object): CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL = 1 CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL = 2 CONTACT_ATTRIBUTE_CAPABLE_MY_HOME = 16 CONTACT_ATTRIBUTE_CAPABLE_BUDDY = 32 _VALUES_TO_NAMES = { 1: "CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL", 2: "CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL", 16: "CONTACT_ATTRIBUTE_CAPABLE_MY_HOME", 32: "CONTACT_ATTRIBUTE_CAPABLE_BUDDY", } _NAMES_TO_VALUES = { "CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL": 1, "CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL": 2, "CONTACT_ATTRIBUTE_CAPABLE_MY_HOME": 16, "CONTACT_ATTRIBUTE_CAPABLE_BUDDY": 32, } class ContactCategory(object): NORMAL = 0 RECOMMEND = 1 _VALUES_TO_NAMES = { 0: "NORMAL", 1: "RECOMMEND", } _NAMES_TO_VALUES = { "NORMAL": 0, "RECOMMEND": 1, } class ContactRelation(object): ONEWAY = 0 BOTH = 1 NOT_REGISTERED = 2 _VALUES_TO_NAMES = { 0: "ONEWAY", 1: "BOTH", 2: "NOT_REGISTERED", } _NAMES_TO_VALUES = { "ONEWAY": 0, "BOTH": 1, "NOT_REGISTERED": 2, } class ContactSetting(object): CONTACT_SETTING_NOTIFICATION_DISABLE = 1 CONTACT_SETTING_DISPLAY_NAME_OVERRIDE = 2 CONTACT_SETTING_CONTACT_HIDE = 4 CONTACT_SETTING_FAVORITE = 8 CONTACT_SETTING_DELETE = 16 _VALUES_TO_NAMES = { 1: "CONTACT_SETTING_NOTIFICATION_DISABLE", 2: "CONTACT_SETTING_DISPLAY_NAME_OVERRIDE", 4: "CONTACT_SETTING_CONTACT_HIDE", 8: "CONTACT_SETTING_FAVORITE", 16: "CONTACT_SETTING_DELETE", } _NAMES_TO_VALUES = { "CONTACT_SETTING_NOTIFICATION_DISABLE": 1, "CONTACT_SETTING_DISPLAY_NAME_OVERRIDE": 2, "CONTACT_SETTING_CONTACT_HIDE": 4, "CONTACT_SETTING_FAVORITE": 8, "CONTACT_SETTING_DELETE": 16, } class ContactStatus(object): UNSPECIFIED = 0 FRIEND = 1 FRIEND_BLOCKED = 2 RECOMMEND = 3 RECOMMEND_BLOCKED = 4 DELETED = 5 DELETED_BLOCKED = 6 _VALUES_TO_NAMES = { 0: "UNSPECIFIED", 1: "FRIEND", 2: "FRIEND_BLOCKED", 3: "RECOMMEND", 4: "RECOMMEND_BLOCKED", 5: "DELETED", 6: "DELETED_BLOCKED", } _NAMES_TO_VALUES = { "UNSPECIFIED": 0, "FRIEND": 1, "FRIEND_BLOCKED": 2, "RECOMMEND": 3, "RECOMMEND_BLOCKED": 4, "DELETED": 5, "DELETED_BLOCKED": 6, } class ContactType(object): MID = 0 PHONE = 1 EMAIL = 2 USERID = 3 PROXIMITY = 4 GROUP = 5 USER = 6 QRCODE = 7 PROMOTION_BOT = 8 REPAIR = 128 FACEBOOK = 2305 SINA = 2306 RENREN = 2307 FEIXIN = 2308 _VALUES_TO_NAMES = { 0: "MID", 1: "PHONE", 2: "EMAIL", 3: "USERID", 4: "PROXIMITY", 5: "GROUP", 6: "USER", 7: "QRCODE", 8: "PROMOTION_BOT", 128: "REPAIR", 2305: "FACEBOOK", 2306: "SINA", 2307: "RENREN", 2308: "FEIXIN", } _NAMES_TO_VALUES = { "MID": 0, "PHONE": 1, "EMAIL": 2, "USERID": 3, "PROXIMITY": 4, "GROUP": 5, "USER": 6, "QRCODE": 7, "PROMOTION_BOT": 8, "REPAIR": 128, "FACEBOOK": 2305, "SINA": 2306, "RENREN": 2307, "FEIXIN": 2308, } class ContentType(object): NONE = 0 IMAGE = 1 VIDEO = 2 AUDIO = 3 HTML = 4 PDF = 5 CALL = 6 STICKER = 7 PRESENCE = 8 GIFT = 9 GROUPBOARD = 10 APPLINK = 11 LINK = 12 CONTACT = 13 FILE = 14 LOCATION = 15 POSTNOTIFICATION = 16 RICH = 17 CHATEVENT = 18 _VALUES_TO_NAMES = { 0: "NONE", 1: "IMAGE", 2: "VIDEO", 3: "AUDIO", 4: "HTML", 5: "PDF", 6: "CALL", 7: "STICKER", 8: "PRESENCE", 9: "GIFT", 10: "GROUPBOARD", 11: "APPLINK", 12: "LINK", 13: "CONTACT", 14: "FILE", 15: "LOCATION", 16: "POSTNOTIFICATION", 17: "RICH", 18: "CHATEVENT", } _NAMES_TO_VALUES = { "NONE": 0, "IMAGE": 1, "VIDEO": 2, "AUDIO": 3, "HTML": 4, "PDF": 5, "CALL": 6, "STICKER": 7, "PRESENCE": 8, "GIFT": 9, "GROUPBOARD": 10, "APPLINK": 11, "LINK": 12, "CONTACT": 13, "FILE": 14, "LOCATION": 15, "POSTNOTIFICATION": 16, "RICH": 17, "CHATEVENT": 18, } class CustomMode(object): PROMOTION_FRIENDS_INVITE = 1 CAPABILITY_SERVER_SIDE_SMS = 2 LINE_CLIENT_ANALYTICS_CONFIGURATION = 3 _VALUES_TO_NAMES = { 1: "PROMOTION_FRIENDS_INVITE", 2: "CAPABILITY_SERVER_SIDE_SMS", 3: "LINE_CLIENT_ANALYTICS_CONFIGURATION", } _NAMES_TO_VALUES = { "PROMOTION_FRIENDS_INVITE": 1, "CAPABILITY_SERVER_SIDE_SMS": 2, "LINE_CLIENT_ANALYTICS_CONFIGURATION": 3, } class EmailConfirmationStatus(object): NOT_SPECIFIED = 0 NOT_YET = 1 DONE = 3 _VALUES_TO_NAMES = { 0: "NOT_SPECIFIED", 1: "NOT_YET", 3: "DONE", } _NAMES_TO_VALUES = { "NOT_SPECIFIED": 0, "NOT_YET": 1, "DONE": 3, } class EmailConfirmationType(object): SERVER_SIDE_EMAIL = 0 CLIENT_SIDE_EMAIL = 1 _VALUES_TO_NAMES = { 0: "SERVER_SIDE_EMAIL", 1: "CLIENT_SIDE_EMAIL", } _NAMES_TO_VALUES = { "SERVER_SIDE_EMAIL": 0, "CLIENT_SIDE_EMAIL": 1, } class ErrorCode(object): ILLEGAL_ARGUMENT = 0 AUTHENTICATION_FAILED = 1 DB_FAILED = 2 INVALID_STATE = 3 EXCESSIVE_ACCESS = 4 NOT_FOUND = 5 INVALID_LENGTH = 6 NOT_AVAILABLE_USER = 7 NOT_AUTHORIZED_DEVICE = 8 INVALID_MID = 9 NOT_A_MEMBER = 10 INCOMPATIBLE_APP_VERSION = 11 NOT_READY = 12 NOT_AVAILABLE_SESSION = 13 NOT_AUTHORIZED_SESSION = 14 SYSTEM_ERROR = 15 NO_AVAILABLE_VERIFICATION_METHOD = 16 NOT_AUTHENTICATED = 17 INVALID_IDENTITY_CREDENTIAL = 18 NOT_AVAILABLE_IDENTITY_IDENTIFIER = 19 INTERNAL_ERROR = 20 NO_SUCH_IDENTITY_IDENFIER = 21 DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY = 22 ILLEGAL_IDENTITY_CREDENTIAL = 23 UNKNOWN_CHANNEL = 24 NO_SUCH_MESSAGE_BOX = 25 NOT_AVAILABLE_MESSAGE_BOX = 26 CHANNEL_DOES_NOT_MATCH = 27 NOT_YOUR_MESSAGE = 28 MESSAGE_DEFINED_ERROR = 29 USER_CANNOT_ACCEPT_PRESENTS = 30 USER_NOT_STICKER_OWNER = 32 MAINTENANCE_ERROR = 33 ACCOUNT_NOT_MATCHED = 34 ABUSE_BLOCK = 35 NOT_FRIEND = 36 NOT_ALLOWED_CALL = 37 BLOCK_FRIEND = 38 INCOMPATIBLE_VOIP_VERSION = 39 INVALID_SNS_ACCESS_TOKEN = 40 EXTERNAL_SERVICE_NOT_AVAILABLE = 41 NOT_ALLOWED_ADD_CONTACT = 42 NOT_CERTIFICATED = 43 NOT_ALLOWED_SECONDARY_DEVICE = 44 INVALID_PIN_CODE = 45 NOT_FOUND_IDENTITY_CREDENTIAL = 46 EXCEED_FILE_MAX_SIZE = 47 EXCEED_DAILY_QUOTA = 48 NOT_SUPPORT_SEND_FILE = 49 MUST_UPGRADE = 50 NOT_AVAILABLE_PIN_CODE_SESSION = 51 _VALUES_TO_NAMES = { 0: "ILLEGAL_ARGUMENT", 1: "AUTHENTICATION_FAILED", 2: "DB_FAILED", 3: "INVALID_STATE", 4: "EXCESSIVE_ACCESS", 5: "NOT_FOUND", 6: "INVALID_LENGTH", 7: "NOT_AVAILABLE_USER", 8: "NOT_AUTHORIZED_DEVICE", 9: "INVALID_MID", 10: "NOT_A_MEMBER", 11: "INCOMPATIBLE_APP_VERSION", 12: "NOT_READY", 13: "NOT_AVAILABLE_SESSION", 14: "NOT_AUTHORIZED_SESSION", 15: "SYSTEM_ERROR", 16: "NO_AVAILABLE_VERIFICATION_METHOD", 17: "NOT_AUTHENTICATED", 18: "INVALID_IDENTITY_CREDENTIAL", 19: "NOT_AVAILABLE_IDENTITY_IDENTIFIER", 20: "INTERNAL_ERROR", 21: "NO_SUCH_IDENTITY_IDENFIER", 22: "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY", 23: "ILLEGAL_IDENTITY_CREDENTIAL", 24: "UNKNOWN_CHANNEL", 25: "NO_SUCH_MESSAGE_BOX", 26: "NOT_AVAILABLE_MESSAGE_BOX", 27: "CHANNEL_DOES_NOT_MATCH", 28: "NOT_YOUR_MESSAGE", 29: "MESSAGE_DEFINED_ERROR", 30: "USER_CANNOT_ACCEPT_PRESENTS", 32: "USER_NOT_STICKER_OWNER", 33: "MAINTENANCE_ERROR", 34: "ACCOUNT_NOT_MATCHED", 35: "ABUSE_BLOCK", 36: "NOT_FRIEND", 37: "NOT_ALLOWED_CALL", 38: "BLOCK_FRIEND", 39: "INCOMPATIBLE_VOIP_VERSION", 40: "INVALID_SNS_ACCESS_TOKEN", 41: "EXTERNAL_SERVICE_NOT_AVAILABLE", 42: "NOT_ALLOWED_ADD_CONTACT", 43: "NOT_CERTIFICATED", 44: "NOT_ALLOWED_SECONDARY_DEVICE", 45: "INVALID_PIN_CODE", 46: "NOT_FOUND_IDENTITY_CREDENTIAL", 47: "EXCEED_FILE_MAX_SIZE", 48: "EXCEED_DAILY_QUOTA", 49: "NOT_SUPPORT_SEND_FILE", 50: "MUST_UPGRADE", 51: "NOT_AVAILABLE_PIN_CODE_SESSION", } _NAMES_TO_VALUES = { "ILLEGAL_ARGUMENT": 0, "AUTHENTICATION_FAILED": 1, "DB_FAILED": 2, "INVALID_STATE": 3, "EXCESSIVE_ACCESS": 4, "NOT_FOUND": 5, "INVALID_LENGTH": 6, "NOT_AVAILABLE_USER": 7, "NOT_AUTHORIZED_DEVICE": 8, "INVALID_MID": 9, "NOT_A_MEMBER": 10, "INCOMPATIBLE_APP_VERSION": 11, "NOT_READY": 12, "NOT_AVAILABLE_SESSION": 13, "NOT_AUTHORIZED_SESSION": 14, "SYSTEM_ERROR": 15, "NO_AVAILABLE_VERIFICATION_METHOD": 16, "NOT_AUTHENTICATED": 17, "INVALID_IDENTITY_CREDENTIAL": 18, "NOT_AVAILABLE_IDENTITY_IDENTIFIER": 19, "INTERNAL_ERROR": 20, "NO_SUCH_IDENTITY_IDENFIER": 21, "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY": 22, "ILLEGAL_IDENTITY_CREDENTIAL": 23, "UNKNOWN_CHANNEL": 24, "NO_SUCH_MESSAGE_BOX": 25, "NOT_AVAILABLE_MESSAGE_BOX": 26, "CHANNEL_DOES_NOT_MATCH": 27, "NOT_YOUR_MESSAGE": 28, "MESSAGE_DEFINED_ERROR": 29, "USER_CANNOT_ACCEPT_PRESENTS": 30, "USER_NOT_STICKER_OWNER": 32, "MAINTENANCE_ERROR": 33, "ACCOUNT_NOT_MATCHED": 34, "ABUSE_BLOCK": 35, "NOT_FRIEND": 36, "NOT_ALLOWED_CALL": 37, "BLOCK_FRIEND": 38, "INCOMPATIBLE_VOIP_VERSION": 39, "INVALID_SNS_ACCESS_TOKEN": 40, "EXTERNAL_SERVICE_NOT_AVAILABLE": 41, "NOT_ALLOWED_ADD_CONTACT": 42, "NOT_CERTIFICATED": 43, "NOT_ALLOWED_SECONDARY_DEVICE": 44, "INVALID_PIN_CODE": 45, "NOT_FOUND_IDENTITY_CREDENTIAL": 46, "EXCEED_FILE_MAX_SIZE": 47, "EXCEED_DAILY_QUOTA": 48, "NOT_SUPPORT_SEND_FILE": 49, "MUST_UPGRADE": 50, "NOT_AVAILABLE_PIN_CODE_SESSION": 51, } class FeatureType(object): OBJECT_STORAGE = 1 _VALUES_TO_NAMES = { 1: "OBJECT_STORAGE", } _NAMES_TO_VALUES = { "OBJECT_STORAGE": 1, } class GroupAttribute(object): NAME = 1 PICTURE_STATUS = 2 ALL = 255 PREVENTED_JOIN_BY_TICKET = 4 NOTIFICATION_SETTING = 8 _VALUES_TO_NAMES = { 1: "NAME", 2: "PICTURE_STATUS", 255: "ALL", 4: "PREVENTED_JOIN_BY_TICKET", 8: "NOTIFICATION_SETTING", } _NAMES_TO_VALUES = { "NAME": 1, "PICTURE_STATUS": 2, "ALL": 255, "PREVENTED_JOIN_BY_TICKET": 4, "NOTIFICATION_SETTING": 8, } class IdentityProvider(object): UNKNOWN = 0 LINE = 1 NAVER_KR = 2 _VALUES_TO_NAMES = { 0: "UNKNOWN", 1: "LINE", 2: "NAVER_KR", } _NAMES_TO_VALUES = { "UNKNOWN": 0, "LINE": 1, "NAVER_KR": 2, } class LoginResultType(object): SUCCESS = 1 REQUIRE_QRCODE = 2 REQUIRE_DEVICE_CONFIRM = 3 _VALUES_TO_NAMES = { 1: "SUCCESS", 2: "REQUIRE_QRCODE", 3: "REQUIRE_DEVICE_CONFIRM", } _NAMES_TO_VALUES = { "SUCCESS": 1, "REQUIRE_QRCODE": 2, "REQUIRE_DEVICE_CONFIRM": 3, } class MessageOperationType(object): SEND_MESSAGE = 1 RECEIVE_MESSAGE = 2 READ_MESSAGE = 3 NOTIFIED_READ_MESSAGE = 4 NOTIFIED_JOIN_CHAT = 5 FAILED_SEND_MESSAGE = 6 SEND_CONTENT = 7 SEND_CONTENT_RECEIPT = 8 SEND_CHAT_REMOVED = 9 REMOVE_ALL_MESSAGES = 10 _VALUES_TO_NAMES = { 1: "SEND_MESSAGE", 2: "RECEIVE_MESSAGE", 3: "READ_MESSAGE", 4: "NOTIFIED_READ_MESSAGE", 5: "NOTIFIED_JOIN_CHAT", 6: "FAILED_SEND_MESSAGE", 7: "SEND_CONTENT", 8: "SEND_CONTENT_RECEIPT", 9: "SEND_CHAT_REMOVED", 10: "REMOVE_ALL_MESSAGES", } _NAMES_TO_VALUES = { "SEND_MESSAGE": 1, "RECEIVE_MESSAGE": 2, "READ_MESSAGE": 3, "NOTIFIED_READ_MESSAGE": 4, "NOTIFIED_JOIN_CHAT": 5, "FAILED_SEND_MESSAGE": 6, "SEND_CONTENT": 7, "SEND_CONTENT_RECEIPT": 8, "SEND_CHAT_REMOVED": 9, "REMOVE_ALL_MESSAGES": 10, } class MIDType(object): USER = 0 ROOM = 1 GROUP = 2 _VALUES_TO_NAMES = { 0: "USER", 1: "ROOM", 2: "GROUP", } _NAMES_TO_VALUES = { "USER": 0, "ROOM": 1, "GROUP": 2, } class ModificationType(object): ADD = 0 REMOVE = 1 MODIFY = 2 _VALUES_TO_NAMES = { 0: "ADD", 1: "REMOVE", 2: "MODIFY", } _NAMES_TO_VALUES = { "ADD": 0, "REMOVE": 1, "MODIFY": 2, } class NotificationItemFetchMode(object): ALL = 0 APPEND = 1 _VALUES_TO_NAMES = { 0: "ALL", 1: "APPEND", } _NAMES_TO_VALUES = { "ALL": 0, "APPEND": 1, } class NotificationQueueType(object): GLOBAL = 1 MESSAGE = 2 PRIMARY = 3 _VALUES_TO_NAMES = { 1: "GLOBAL", 2: "MESSAGE", 3: "PRIMARY", } _NAMES_TO_VALUES = { "GLOBAL": 1, "MESSAGE": 2, "PRIMARY": 3, } class NotificationStatus(object): NOTIFICATION_ITEM_EXIST = 1 TIMELINE_ITEM_EXIST = 2 NOTE_GROUP_NEW_ITEM_EXIST = 4 TIMELINE_BUDDYGROUP_CHANGED = 8 NOTE_ONE_TO_ONE_NEW_ITEM_EXIST = 16 ALBUM_ITEM_EXIST = 32 TIMELINE_ITEM_DELETED = 64 _VALUES_TO_NAMES = { 1: "NOTIFICATION_ITEM_EXIST", 2: "TIMELINE_ITEM_EXIST", 4: "NOTE_GROUP_NEW_ITEM_EXIST", 8: "TIMELINE_BUDDYGROUP_CHANGED", 16: "NOTE_ONE_TO_ONE_NEW_ITEM_EXIST", 32: "ALBUM_ITEM_EXIST", 64: "TIMELINE_ITEM_DELETED", } _NAMES_TO_VALUES = { "NOTIFICATION_ITEM_EXIST": 1, "TIMELINE_ITEM_EXIST": 2, "NOTE_GROUP_NEW_ITEM_EXIST": 4, "TIMELINE_BUDDYGROUP_CHANGED": 8, "NOTE_ONE_TO_ONE_NEW_ITEM_EXIST": 16, "ALBUM_ITEM_EXIST": 32, "TIMELINE_ITEM_DELETED": 64, } class NotificationType(object): APPLE_APNS = 1 GOOGLE_C2DM = 2 NHN_NNI = 3 SKT_AOM = 4 MS_MPNS = 5 RIM_BIS = 6 GOOGLE_GCM = 7 NOKIA_NNAPI = 8 TIZEN = 9 LINE_BOT = 17 LINE_WAP = 18 _VALUES_TO_NAMES = { 1: "APPLE_APNS", 2: "GOOGLE_C2DM", 3: "NHN_NNI", 4: "SKT_AOM", 5: "MS_MPNS", 6: "RIM_BIS", 7: "GOOGLE_GCM", 8: "NOKIA_NNAPI", 9: "TIZEN", 17: "LINE_BOT", 18: "LINE_WAP", } _NAMES_TO_VALUES = { "APPLE_APNS": 1, "GOOGLE_C2DM": 2, "NHN_NNI": 3, "SKT_AOM": 4, "MS_MPNS": 5, "RIM_BIS": 6, "GOOGLE_GCM": 7, "NOKIA_NNAPI": 8, "TIZEN": 9, "LINE_BOT": 17, "LINE_WAP": 18, } class OpStatus(object): NORMAL = 0 ALERT_DISABLED = 1 _VALUES_TO_NAMES = { 0: "NORMAL", 1: "ALERT_DISABLED", } _NAMES_TO_VALUES = { "NORMAL": 0, "ALERT_DISABLED": 1, } class OpType(object): END_OF_OPERATION = 0 UPDATE_PROFILE = 1 NOTIFIED_UPDATE_PROFILE = 2 REGISTER_USERID = 3 ADD_CONTACT = 4 NOTIFIED_ADD_CONTACT = 5 BLOCK_CONTACT = 6 UNBLOCK_CONTACT = 7 NOTIFIED_RECOMMEND_CONTACT = 8 CREATE_GROUP = 9 UPDATE_GROUP = 10 NOTIFIED_UPDATE_GROUP = 11 INVITE_INTO_GROUP = 12 NOTIFIED_INVITE_INTO_GROUP = 13 LEAVE_GROUP = 14 NOTIFIED_LEAVE_GROUP = 15 ACCEPT_GROUP_INVITATION = 16 NOTIFIED_ACCEPT_GROUP_INVITATION = 17 KICKOUT_FROM_GROUP = 18 NOTIFIED_KICKOUT_FROM_GROUP = 19 CREATE_ROOM = 20 INVITE_INTO_ROOM = 21 NOTIFIED_INVITE_INTO_ROOM = 22 LEAVE_ROOM = 23 NOTIFIED_LEAVE_ROOM = 24 SEND_MESSAGE = 25 RECEIVE_MESSAGE = 26 SEND_MESSAGE_RECEIPT = 27 RECEIVE_MESSAGE_RECEIPT = 28 SEND_CONTENT_RECEIPT = 29 RECEIVE_ANNOUNCEMENT = 30 CANCEL_INVITATION_GROUP = 31 NOTIFIED_CANCEL_INVITATION_GROUP = 32 NOTIFIED_UNREGISTER_USER = 33 REJECT_GROUP_INVITATION = 34 NOTIFIED_REJECT_GROUP_INVITATION = 35 UPDATE_SETTINGS = 36 NOTIFIED_REGISTER_USER = 37 INVITE_VIA_EMAIL = 38 NOTIFIED_REQUEST_RECOVERY = 39 SEND_CHAT_CHECKED = 40 SEND_CHAT_REMOVED = 41 NOTIFIED_FORCE_SYNC = 42 SEND_CONTENT = 43 SEND_MESSAGE_MYHOME = 44 NOTIFIED_UPDATE_CONTENT_PREVIEW = 45 REMOVE_ALL_MESSAGES = 46 NOTIFIED_UPDATE_PURCHASES = 47 DUMMY = 48 UPDATE_CONTACT = 49 NOTIFIED_RECEIVED_CALL = 50 CANCEL_CALL = 51 NOTIFIED_REDIRECT = 52 NOTIFIED_CHANNEL_SYNC = 53 FAILED_SEND_MESSAGE = 54 NOTIFIED_READ_MESSAGE = 55 FAILED_EMAIL_CONFIRMATION = 56 NOTIFIED_CHAT_CONTENT = 58 NOTIFIED_PUSH_NOTICENTER_ITEM = 59 _VALUES_TO_NAMES = { 0: "END_OF_OPERATION", 1: "UPDATE_PROFILE", 2: "NOTIFIED_UPDATE_PROFILE", 3: "REGISTER_USERID", 4: "ADD_CONTACT", 5: "NOTIFIED_ADD_CONTACT", 6: "BLOCK_CONTACT", 7: "UNBLOCK_CONTACT", 8: "NOTIFIED_RECOMMEND_CONTACT", 9: "CREATE_GROUP", 10: "UPDATE_GROUP", 11: "NOTIFIED_UPDATE_GROUP", 12: "INVITE_INTO_GROUP", 13: "NOTIFIED_INVITE_INTO_GROUP", 14: "LEAVE_GROUP", 15: "NOTIFIED_LEAVE_GROUP", 16: "ACCEPT_GROUP_INVITATION", 17: "NOTIFIED_ACCEPT_GROUP_INVITATION", 18: "KICKOUT_FROM_GROUP", 19: "NOTIFIED_KICKOUT_FROM_GROUP", 20: "CREATE_ROOM", 21: "INVITE_INTO_ROOM", 22: "NOTIFIED_INVITE_INTO_ROOM", 23: "LEAVE_ROOM", 24: "NOTIFIED_LEAVE_ROOM", 25: "SEND_MESSAGE", 26: "RECEIVE_MESSAGE", 27: "SEND_MESSAGE_RECEIPT", 28: "RECEIVE_MESSAGE_RECEIPT", 29: "SEND_CONTENT_RECEIPT", 30: "RECEIVE_ANNOUNCEMENT", 31: "CANCEL_INVITATION_GROUP", 32: "NOTIFIED_CANCEL_INVITATION_GROUP", 33: "NOTIFIED_UNREGISTER_USER", 34: "REJECT_GROUP_INVITATION", 35: "NOTIFIED_REJECT_GROUP_INVITATION", 36: "UPDATE_SETTINGS", 37: "NOTIFIED_REGISTER_USER", 38: "INVITE_VIA_EMAIL", 39: "NOTIFIED_REQUEST_RECOVERY", 40: "SEND_CHAT_CHECKED", 41: "SEND_CHAT_REMOVED", 42: "NOTIFIED_FORCE_SYNC", 43: "SEND_CONTENT", 44: "SEND_MESSAGE_MYHOME", 45: "NOTIFIED_UPDATE_CONTENT_PREVIEW", 46: "REMOVE_ALL_MESSAGES", 47: "NOTIFIED_UPDATE_PURCHASES", 48: "DUMMY", 49: "UPDATE_CONTACT", 50: "NOTIFIED_RECEIVED_CALL", 51: "CANCEL_CALL", 52: "NOTIFIED_REDIRECT", 53: "NOTIFIED_CHANNEL_SYNC", 54: "FAILED_SEND_MESSAGE", 55: "NOTIFIED_READ_MESSAGE", 56: "FAILED_EMAIL_CONFIRMATION", 58: "NOTIFIED_CHAT_CONTENT", 59: "NOTIFIED_PUSH_NOTICENTER_ITEM", } _NAMES_TO_VALUES = { "END_OF_OPERATION": 0, "UPDATE_PROFILE": 1, "NOTIFIED_UPDATE_PROFILE": 2, "REGISTER_USERID": 3, "ADD_CONTACT": 4, "NOTIFIED_ADD_CONTACT": 5, "BLOCK_CONTACT": 6, "UNBLOCK_CONTACT": 7, "NOTIFIED_RECOMMEND_CONTACT": 8, "CREATE_GROUP": 9, "UPDATE_GROUP": 10, "NOTIFIED_UPDATE_GROUP": 11, "INVITE_INTO_GROUP": 12, "NOTIFIED_INVITE_INTO_GROUP": 13, "LEAVE_GROUP": 14, "NOTIFIED_LEAVE_GROUP": 15, "ACCEPT_GROUP_INVITATION": 16, "NOTIFIED_ACCEPT_GROUP_INVITATION": 17, "KICKOUT_FROM_GROUP": 18, "NOTIFIED_KICKOUT_FROM_GROUP": 19, "CREATE_ROOM": 20, "INVITE_INTO_ROOM": 21, "NOTIFIED_INVITE_INTO_ROOM": 22, "LEAVE_ROOM": 23, "NOTIFIED_LEAVE_ROOM": 24, "SEND_MESSAGE": 25, "RECEIVE_MESSAGE": 26, "SEND_MESSAGE_RECEIPT": 27, "RECEIVE_MESSAGE_RECEIPT": 28, "SEND_CONTENT_RECEIPT": 29, "RECEIVE_ANNOUNCEMENT": 30, "CANCEL_INVITATION_GROUP": 31, "NOTIFIED_CANCEL_INVITATION_GROUP": 32, "NOTIFIED_UNREGISTER_USER": 33, "REJECT_GROUP_INVITATION": 34, "NOTIFIED_REJECT_GROUP_INVITATION": 35, "UPDATE_SETTINGS": 36, "NOTIFIED_REGISTER_USER": 37, "INVITE_VIA_EMAIL": 38, "NOTIFIED_REQUEST_RECOVERY": 39, "SEND_CHAT_CHECKED": 40, "SEND_CHAT_REMOVED": 41, "NOTIFIED_FORCE_SYNC": 42, "SEND_CONTENT": 43, "SEND_MESSAGE_MYHOME": 44, "NOTIFIED_UPDATE_CONTENT_PREVIEW": 45, "REMOVE_ALL_MESSAGES": 46, "NOTIFIED_UPDATE_PURCHASES": 47, "DUMMY": 48, "UPDATE_CONTACT": 49, "NOTIFIED_RECEIVED_CALL": 50, "CANCEL_CALL": 51, "NOTIFIED_REDIRECT": 52, "NOTIFIED_CHANNEL_SYNC": 53, "FAILED_SEND_MESSAGE": 54, "NOTIFIED_READ_MESSAGE": 55, "FAILED_EMAIL_CONFIRMATION": 56, "NOTIFIED_CHAT_CONTENT": 58, "NOTIFIED_PUSH_NOTICENTER_ITEM": 59, } class PayloadType(object): PAYLOAD_BUY = 101 PAYLOAD_CS = 111 PAYLOAD_BONUS = 121 PAYLOAD_EVENT = 131 _VALUES_TO_NAMES = { 101: "PAYLOAD_BUY", 111: "PAYLOAD_CS", 121: "PAYLOAD_BONUS", 131: "PAYLOAD_EVENT", } _NAMES_TO_VALUES = { "PAYLOAD_BUY": 101, "PAYLOAD_CS": 111, "PAYLOAD_BONUS": 121, "PAYLOAD_EVENT": 131, } class PaymentPgType(object): PAYMENT_PG_NONE = 0 PAYMENT_PG_AU = 1 PAYMENT_PG_AL = 2 _VALUES_TO_NAMES = { 0: "PAYMENT_PG_NONE", 1: "PAYMENT_PG_AU", 2: "PAYMENT_PG_AL", } _NAMES_TO_VALUES = { "PAYMENT_PG_NONE": 0, "PAYMENT_PG_AU": 1, "PAYMENT_PG_AL": 2, } class PaymentType(object): PAYMENT_APPLE = 1 PAYMENT_GOOGLE = 2 _VALUES_TO_NAMES = { 1: "PAYMENT_APPLE", 2: "PAYMENT_GOOGLE", } _NAMES_TO_VALUES = { "PAYMENT_APPLE": 1, "PAYMENT_GOOGLE": 2, } class ProductBannerLinkType(object): BANNER_LINK_NONE = 0 BANNER_LINK_ITEM = 1 BANNER_LINK_URL = 2 BANNER_LINK_CATEGORY = 3 _VALUES_TO_NAMES = { 0: "BANNER_LINK_NONE", 1: "BANNER_LINK_ITEM", 2: "BANNER_LINK_URL", 3: "BANNER_LINK_CATEGORY", } _NAMES_TO_VALUES = { "BANNER_LINK_NONE": 0, "BANNER_LINK_ITEM": 1, "BANNER_LINK_URL": 2, "BANNER_LINK_CATEGORY": 3, } class ProductEventType(object): NO_EVENT = 0 CARRIER_ANY = 65537 BUDDY_ANY = 131073 INSTALL_IOS = 196609 INSTALL_ANDROID = 196610 MISSION_ANY = 262145 MUSTBUY_ANY = 327681 _VALUES_TO_NAMES = { 0: "NO_EVENT", 65537: "CARRIER_ANY", 131073: "BUDDY_ANY", 196609: "INSTALL_IOS", 196610: "INSTALL_ANDROID", 262145: "MISSION_ANY", 327681: "MUSTBUY_ANY", } _NAMES_TO_VALUES = { "NO_EVENT": 0, "CARRIER_ANY": 65537, "BUDDY_ANY": 131073, "INSTALL_IOS": 196609, "INSTALL_ANDROID": 196610, "MISSION_ANY": 262145, "MUSTBUY_ANY": 327681, } class ProfileAttribute(object): EMAIL = 1 DISPLAY_NAME = 2 PHONETIC_NAME = 4 PICTURE = 8 STATUS_MESSAGE = 16 ALLOW_SEARCH_BY_USERID = 32 ALLOW_SEARCH_BY_EMAIL = 64 BUDDY_STATUS = 128 ALL = 255 _VALUES_TO_NAMES = { 1: "EMAIL", 2: "DISPLAY_NAME", 4: "PHONETIC_NAME", 8: "PICTURE", 16: "STATUS_MESSAGE", 32: "ALLOW_SEARCH_BY_USERID", 64: "ALLOW_SEARCH_BY_EMAIL", 128: "BUDDY_STATUS", 255: "ALL", } _NAMES_TO_VALUES = { "EMAIL": 1, "DISPLAY_NAME": 2, "PHONETIC_NAME": 4, "PICTURE": 8, "STATUS_MESSAGE": 16, "ALLOW_SEARCH_BY_USERID": 32, "ALLOW_SEARCH_BY_EMAIL": 64, "BUDDY_STATUS": 128, "ALL": 255, } class PublicType(object): HIDDEN = 0 PUBLIC = 1000 _VALUES_TO_NAMES = { 0: "HIDDEN", 1000: "PUBLIC", } _NAMES_TO_VALUES = { "HIDDEN": 0, "PUBLIC": 1000, } class RedirectType(object): NONE = 0 EXPIRE_SECOND = 1 _VALUES_TO_NAMES = { 0: "NONE", 1: "EXPIRE_SECOND", } _NAMES_TO_VALUES = { "NONE": 0, "EXPIRE_SECOND": 1, } class RegistrationType(object): PHONE = 0 EMAIL_WAP = 1 FACEBOOK = 2305 SINA = 2306 RENREN = 2307 FEIXIN = 2308 _VALUES_TO_NAMES = { 0: "PHONE", 1: "EMAIL_WAP", 2305: "FACEBOOK", 2306: "SINA", 2307: "RENREN", 2308: "FEIXIN", } _NAMES_TO_VALUES = { "PHONE": 0, "EMAIL_WAP": 1, "FACEBOOK": 2305, "SINA": 2306, "RENREN": 2307, "FEIXIN": 2308, } class SettingsAttribute(object): NOTIFICATION_ENABLE = 1 NOTIFICATION_MUTE_EXPIRATION = 2 NOTIFICATION_NEW_MESSAGE = 4 NOTIFICATION_GROUP_INVITATION = 8 NOTIFICATION_SHOW_MESSAGE = 16 NOTIFICATION_INCOMING_CALL = 32 PRIVACY_SYNC_CONTACTS = 64 PRIVACY_SEARCH_BY_PHONE_NUMBER = 128 NOTIFICATION_SOUND_MESSAGE = 256 NOTIFICATION_SOUND_GROUP = 512 CONTACT_MY_TICKET = 1024 IDENTITY_PROVIDER = 2048 IDENTITY_IDENTIFIER = 4096 PRIVACY_SEARCH_BY_USERID = 8192 PRIVACY_SEARCH_BY_EMAIL = 16384 PREFERENCE_LOCALE = 32768 NOTIFICATION_DISABLED_WITH_SUB = 65536 SNS_ACCOUNT = 524288 PHONE_REGISTRATION = 1048576 PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN = 2097152 CUSTOM_MODE = 4194304 PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME = 8388608 EMAIL_CONFIRMATION_STATUS = 16777216 PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND = 33554432 ALL = 2147483647 _VALUES_TO_NAMES = { 1: "NOTIFICATION_ENABLE", 2: "NOTIFICATION_MUTE_EXPIRATION", 4: "NOTIFICATION_NEW_MESSAGE", 8: "NOTIFICATION_GROUP_INVITATION", 16: "NOTIFICATION_SHOW_MESSAGE", 32: "NOTIFICATION_INCOMING_CALL", 64: "PRIVACY_SYNC_CONTACTS", 128: "PRIVACY_SEARCH_BY_PHONE_NUMBER", 256: "NOTIFICATION_SOUND_MESSAGE", 512: "NOTIFICATION_SOUND_GROUP", 1024: "CONTACT_MY_TICKET", 2048: "IDENTITY_PROVIDER", 4096: "IDENTITY_IDENTIFIER", 8192: "PRIVACY_SEARCH_BY_USERID", 16384: "PRIVACY_SEARCH_BY_EMAIL", 32768: "PREFERENCE_LOCALE", 65536: "NOTIFICATION_DISABLED_WITH_SUB", 524288: "SNS_ACCOUNT", 1048576: "PHONE_REGISTRATION", 2097152: "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN", 4194304: "CUSTOM_MODE", 8388608: "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME", 16777216: "EMAIL_CONFIRMATION_STATUS", 33554432: "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND", 2147483647: "ALL", } _NAMES_TO_VALUES = { "NOTIFICATION_ENABLE": 1, "NOTIFICATION_MUTE_EXPIRATION": 2, "NOTIFICATION_NEW_MESSAGE": 4, "NOTIFICATION_GROUP_INVITATION": 8, "NOTIFICATION_SHOW_MESSAGE": 16, "NOTIFICATION_INCOMING_CALL": 32, "PRIVACY_SYNC_CONTACTS": 64, "PRIVACY_SEARCH_BY_PHONE_NUMBER": 128, "NOTIFICATION_SOUND_MESSAGE": 256, "NOTIFICATION_SOUND_GROUP": 512, "CONTACT_MY_TICKET": 1024, "IDENTITY_PROVIDER": 2048, "IDENTITY_IDENTIFIER": 4096, "PRIVACY_SEARCH_BY_USERID": 8192, "PRIVACY_SEARCH_BY_EMAIL": 16384, "PREFERENCE_LOCALE": 32768, "NOTIFICATION_DISABLED_WITH_SUB": 65536, "SNS_ACCOUNT": 524288, "PHONE_REGISTRATION": 1048576, "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN": 2097152, "CUSTOM_MODE": 4194304, "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME": 8388608, "EMAIL_CONFIRMATION_STATUS": 16777216, "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND": 33554432, "ALL": 2147483647, } class SnsIdType(object): FACEBOOK = 1 SINA = 2 RENREN = 3 FEIXIN = 4 _VALUES_TO_NAMES = { 1: "FACEBOOK", 2: "SINA", 3: "RENREN", 4: "FEIXIN", } _NAMES_TO_VALUES = { "FACEBOOK": 1, "SINA": 2, "RENREN": 3, "FEIXIN": 4, } class SpammerReason(object): OTHER = 0 ADVERTISING = 1 GENDER_HARASSMENT = 2 HARASSMENT = 3 _VALUES_TO_NAMES = { 0: "OTHER", 1: "ADVERTISING", 2: "GENDER_HARASSMENT", 3: "HARASSMENT", } _NAMES_TO_VALUES = { "OTHER": 0, "ADVERTISING": 1, "GENDER_HARASSMENT": 2, "HARASSMENT": 3, } class SyncActionType(object): SYNC = 0 REPORT = 1 _VALUES_TO_NAMES = { 0: "SYNC", 1: "REPORT", } _NAMES_TO_VALUES = { "SYNC": 0, "REPORT": 1, } class SyncCategory(object): PROFILE = 0 SETTINGS = 1 OPS = 2 CONTACT = 3 RECOMMEND = 4 BLOCK = 5 GROUP = 6 ROOM = 7 NOTIFICATION = 8 _VALUES_TO_NAMES = { 0: "PROFILE", 1: "SETTINGS", 2: "OPS", 3: "CONTACT", 4: "RECOMMEND", 5: "BLOCK", 6: "GROUP", 7: "ROOM", 8: "NOTIFICATION", } _NAMES_TO_VALUES = { "PROFILE": 0, "SETTINGS": 1, "OPS": 2, "CONTACT": 3, "RECOMMEND": 4, "BLOCK": 5, "GROUP": 6, "ROOM": 7, "NOTIFICATION": 8, } class TMessageBoxStatus(object): ACTIVATED = 1 UNREAD = 2 _VALUES_TO_NAMES = { 1: "ACTIVATED", 2: "UNREAD", } _NAMES_TO_VALUES = { "ACTIVATED": 1, "UNREAD": 2, } class UniversalNotificationServiceErrorCode(object): INTERNAL_ERROR = 0 INVALID_KEY = 1 ILLEGAL_ARGUMENT = 2 TOO_MANY_REQUEST = 3 AUTHENTICATION_FAILED = 4 NO_WRITE_PERMISSION = 5 _VALUES_TO_NAMES = { 0: "INTERNAL_ERROR", 1: "INVALID_KEY", 2: "ILLEGAL_ARGUMENT", 3: "TOO_MANY_REQUEST", 4: "AUTHENTICATION_FAILED", 5: "NO_WRITE_PERMISSION", } _NAMES_TO_VALUES = { "INTERNAL_ERROR": 0, "INVALID_KEY": 1, "ILLEGAL_ARGUMENT": 2, "TOO_MANY_REQUEST": 3, "AUTHENTICATION_FAILED": 4, "NO_WRITE_PERMISSION": 5, } class UnregistrationReason(object): UNREGISTRATION_REASON_UNREGISTER_USER = 1 UNREGISTRATION_REASON_UNBIND_DEVICE = 2 _VALUES_TO_NAMES = { 1: "UNREGISTRATION_REASON_UNREGISTER_USER", 2: "UNREGISTRATION_REASON_UNBIND_DEVICE", } _NAMES_TO_VALUES = { "UNREGISTRATION_REASON_UNREGISTER_USER": 1, "UNREGISTRATION_REASON_UNBIND_DEVICE": 2, } class UserAgeType(object): OVER = 1 UNDER = 2 UNDEFINED = 3 _VALUES_TO_NAMES = { 1: "OVER", 2: "UNDER", 3: "UNDEFINED", } _NAMES_TO_VALUES = { "OVER": 1, "UNDER": 2, "UNDEFINED": 3, } class VerificationMethod(object): NO_AVAILABLE = 0 PIN_VIA_SMS = 1 CALLERID_INDIGO = 2 PIN_VIA_TTS = 4 SKIP = 10 _VALUES_TO_NAMES = { 0: "NO_AVAILABLE", 1: "PIN_VIA_SMS", 2: "CALLERID_INDIGO", 4: "PIN_VIA_TTS", 10: "SKIP", } _NAMES_TO_VALUES = { "NO_AVAILABLE": 0, "PIN_VIA_SMS": 1, "CALLERID_INDIGO": 2, "PIN_VIA_TTS": 4, "SKIP": 10, } class VerificationResult(object): FAILED = 0 OK_NOT_REGISTERED_YET = 1 OK_REGISTERED_WITH_SAME_DEVICE = 2 OK_REGISTERED_WITH_ANOTHER_DEVICE = 3 _VALUES_TO_NAMES = { 0: "FAILED", 1: "OK_NOT_REGISTERED_YET", 2: "OK_REGISTERED_WITH_SAME_DEVICE", 3: "OK_REGISTERED_WITH_ANOTHER_DEVICE", } _NAMES_TO_VALUES = { "FAILED": 0, "OK_NOT_REGISTERED_YET": 1, "OK_REGISTERED_WITH_SAME_DEVICE": 2, "OK_REGISTERED_WITH_ANOTHER_DEVICE": 3, } class WapInvitationType(object): REGISTRATION = 1 CHAT = 2 _VALUES_TO_NAMES = { 1: "REGISTRATION", 2: "CHAT", } _NAMES_TO_VALUES = { "REGISTRATION": 1, "CHAT": 2, } class AgeCheckDocomoResult(object): """ Attributes: - authUrl - userAgeType """ def __init__(self, authUrl=None, userAgeType=None,): self.authUrl = authUrl self.userAgeType = userAgeType def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.authUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.userAgeType = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('AgeCheckDocomoResult') if self.authUrl is not None: oprot.writeFieldBegin('authUrl', TType.STRING, 1) oprot.writeString(self.authUrl.encode('utf-8') if sys.version_info[0] == 2 else self.authUrl) oprot.writeFieldEnd() if self.userAgeType is not None: oprot.writeFieldBegin('userAgeType', TType.I32, 2) oprot.writeI32(self.userAgeType) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class AgeCheckRequestResult(object): """ Attributes: - authUrl - sessionId """ def __init__(self, authUrl=None, sessionId=None,): self.authUrl = authUrl self.sessionId = sessionId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.authUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('AgeCheckRequestResult') if self.authUrl is not None: oprot.writeFieldBegin('authUrl', TType.STRING, 1) oprot.writeString(self.authUrl.encode('utf-8') if sys.version_info[0] == 2 else self.authUrl) oprot.writeFieldEnd() if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 2) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Announcement(object): """ Attributes: - index - forceUpdate - title - text - createdTime - pictureUrl - thumbnailUrl """ def __init__(self, index=None, forceUpdate=None, title=None, text=None, createdTime=None, pictureUrl=None, thumbnailUrl=None,): self.index = index self.forceUpdate = forceUpdate self.title = title self.text = text self.createdTime = createdTime self.pictureUrl = pictureUrl self.thumbnailUrl = thumbnailUrl def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.index = iprot.readI32() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.BOOL: self.forceUpdate = iprot.readBool() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.title = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.text = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 14: if ftype == TType.STRING: self.pictureUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 15: if ftype == TType.STRING: self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Announcement') if self.index is not None: oprot.writeFieldBegin('index', TType.I32, 1) oprot.writeI32(self.index) oprot.writeFieldEnd() if self.forceUpdate is not None: oprot.writeFieldBegin('forceUpdate', TType.BOOL, 10) oprot.writeBool(self.forceUpdate) oprot.writeFieldEnd() if self.title is not None: oprot.writeFieldBegin('title', TType.STRING, 11) oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) oprot.writeFieldEnd() if self.text is not None: oprot.writeFieldBegin('text', TType.STRING, 12) oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text) oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 13) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.pictureUrl is not None: oprot.writeFieldBegin('pictureUrl', TType.STRING, 14) oprot.writeString(self.pictureUrl.encode('utf-8') if sys.version_info[0] == 2 else self.pictureUrl) oprot.writeFieldEnd() if self.thumbnailUrl is not None: oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 15) oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ChannelProvider(object): """ Attributes: - name """ def __init__(self, name=None,): self.name = name def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChannelProvider') if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 1) oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ChannelInfo(object): """ Attributes: - channelId - name - entryPageUrl - descriptionText - provider - publicType - iconImage - permissions - iconThumbnailImage - channelConfigurations """ def __init__(self, channelId=None, name=None, entryPageUrl=None, descriptionText=None, provider=None, publicType=None, iconImage=None, permissions=None, iconThumbnailImage=None, channelConfigurations=None,): self.channelId = channelId self.name = name self.entryPageUrl = entryPageUrl self.descriptionText = descriptionText self.provider = provider self.publicType = publicType self.iconImage = iconImage self.permissions = permissions self.iconThumbnailImage = iconThumbnailImage self.channelConfigurations = channelConfigurations def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.entryPageUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.descriptionText = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRUCT: self.provider = ChannelProvider() self.provider.read(iprot) else: iprot.skip(ftype) elif fid == 7: if ftype == TType.I32: self.publicType = iprot.readI32() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.iconImage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: self.permissions = [] (_etype3, _size0) = iprot.readListBegin() for _i4 in range(_size0): _elem5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.permissions.append(_elem5) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.iconThumbnailImage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.LIST: self.channelConfigurations = [] (_etype9, _size6) = iprot.readListBegin() for _i10 in range(_size6): _elem11 = iprot.readI32() self.channelConfigurations.append(_elem11) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChannelInfo') if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 1) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 3) oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.entryPageUrl is not None: oprot.writeFieldBegin('entryPageUrl', TType.STRING, 4) oprot.writeString(self.entryPageUrl.encode('utf-8') if sys.version_info[0] == 2 else self.entryPageUrl) oprot.writeFieldEnd() if self.descriptionText is not None: oprot.writeFieldBegin('descriptionText', TType.STRING, 5) oprot.writeString(self.descriptionText.encode('utf-8') if sys.version_info[0] == 2 else self.descriptionText) oprot.writeFieldEnd() if self.provider is not None: oprot.writeFieldBegin('provider', TType.STRUCT, 6) self.provider.write(oprot) oprot.writeFieldEnd() if self.publicType is not None: oprot.writeFieldBegin('publicType', TType.I32, 7) oprot.writeI32(self.publicType) oprot.writeFieldEnd() if self.iconImage is not None: oprot.writeFieldBegin('iconImage', TType.STRING, 8) oprot.writeString(self.iconImage.encode('utf-8') if sys.version_info[0] == 2 else self.iconImage) oprot.writeFieldEnd() if self.permissions is not None: oprot.writeFieldBegin('permissions', TType.LIST, 9) oprot.writeListBegin(TType.STRING, len(self.permissions)) for iter12 in self.permissions: oprot.writeString(iter12.encode('utf-8') if sys.version_info[0] == 2 else iter12) oprot.writeListEnd() oprot.writeFieldEnd() if self.iconThumbnailImage is not None: oprot.writeFieldBegin('iconThumbnailImage', TType.STRING, 11) oprot.writeString(self.iconThumbnailImage.encode('utf-8') if sys.version_info[0] == 2 else self.iconThumbnailImage) oprot.writeFieldEnd() if self.channelConfigurations is not None: oprot.writeFieldBegin('channelConfigurations', TType.LIST, 12) oprot.writeListBegin(TType.I32, len(self.channelConfigurations)) for iter13 in self.channelConfigurations: oprot.writeI32(iter13) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ApprovedChannelInfo(object): """ Attributes: - channelInfo - approvedAt """ def __init__(self, channelInfo=None, approvedAt=None,): self.channelInfo = channelInfo self.approvedAt = approvedAt def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.channelInfo = ChannelInfo() self.channelInfo.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.approvedAt = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ApprovedChannelInfo') if self.channelInfo is not None: oprot.writeFieldBegin('channelInfo', TType.STRUCT, 1) self.channelInfo.write(oprot) oprot.writeFieldEnd() if self.approvedAt is not None: oprot.writeFieldBegin('approvedAt', TType.I64, 2) oprot.writeI64(self.approvedAt) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ApprovedChannelInfos(object): """ Attributes: - approvedChannelInfos - revision """ def __init__(self, approvedChannelInfos=None, revision=None,): self.approvedChannelInfos = approvedChannelInfos self.revision = revision def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.LIST: self.approvedChannelInfos = [] (_etype17, _size14) = iprot.readListBegin() for _i18 in range(_size14): _elem19 = ApprovedChannelInfo() _elem19.read(iprot) self.approvedChannelInfos.append(_elem19) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.revision = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ApprovedChannelInfos') if self.approvedChannelInfos is not None: oprot.writeFieldBegin('approvedChannelInfos', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.approvedChannelInfos)) for iter20 in self.approvedChannelInfos: iter20.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.revision is not None: oprot.writeFieldBegin('revision', TType.I64, 2) oprot.writeI64(self.revision) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class AuthQrcode(object): """ Attributes: - qrcode - verifier """ def __init__(self, qrcode=None, verifier=None,): self.qrcode = qrcode self.verifier = verifier def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.qrcode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('AuthQrcode') if self.qrcode is not None: oprot.writeFieldBegin('qrcode', TType.STRING, 1) oprot.writeString(self.qrcode.encode('utf-8') if sys.version_info[0] == 2 else self.qrcode) oprot.writeFieldEnd() if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 2) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class BuddyBanner(object): """ Attributes: - buddyBannerLinkType - buddyBannerLink - buddyBannerImageUrl """ def __init__(self, buddyBannerLinkType=None, buddyBannerLink=None, buddyBannerImageUrl=None,): self.buddyBannerLinkType = buddyBannerLinkType self.buddyBannerLink = buddyBannerLink self.buddyBannerImageUrl = buddyBannerImageUrl def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.buddyBannerLinkType = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.buddyBannerLink = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.buddyBannerImageUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('BuddyBanner') if self.buddyBannerLinkType is not None: oprot.writeFieldBegin('buddyBannerLinkType', TType.I32, 1) oprot.writeI32(self.buddyBannerLinkType) oprot.writeFieldEnd() if self.buddyBannerLink is not None: oprot.writeFieldBegin('buddyBannerLink', TType.STRING, 2) oprot.writeString(self.buddyBannerLink.encode('utf-8') if sys.version_info[0] == 2 else self.buddyBannerLink) oprot.writeFieldEnd() if self.buddyBannerImageUrl is not None: oprot.writeFieldBegin('buddyBannerImageUrl', TType.STRING, 3) oprot.writeString(self.buddyBannerImageUrl.encode('utf-8') if sys.version_info[0] == 2 else self.buddyBannerImageUrl) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class BuddyDetail(object): """ Attributes: - mid - memberCount - onAir - businessAccount - addable - acceptableContentTypes - capableMyhome """ def __init__(self, mid=None, memberCount=None, onAir=None, businessAccount=None, addable=None, acceptableContentTypes=None, capableMyhome=None,): self.mid = mid self.memberCount = memberCount self.onAir = onAir self.businessAccount = businessAccount self.addable = addable self.acceptableContentTypes = acceptableContentTypes self.capableMyhome = capableMyhome def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.memberCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.BOOL: self.onAir = iprot.readBool() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.BOOL: self.businessAccount = iprot.readBool() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.BOOL: self.addable = iprot.readBool() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.SET: self.acceptableContentTypes = set() (_etype24, _size21) = iprot.readSetBegin() for _i25 in range(_size21): _elem26 = iprot.readI32() self.acceptableContentTypes.add(_elem26) iprot.readSetEnd() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.BOOL: self.capableMyhome = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('BuddyDetail') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.memberCount is not None: oprot.writeFieldBegin('memberCount', TType.I64, 2) oprot.writeI64(self.memberCount) oprot.writeFieldEnd() if self.onAir is not None: oprot.writeFieldBegin('onAir', TType.BOOL, 3) oprot.writeBool(self.onAir) oprot.writeFieldEnd() if self.businessAccount is not None: oprot.writeFieldBegin('businessAccount', TType.BOOL, 4) oprot.writeBool(self.businessAccount) oprot.writeFieldEnd() if self.addable is not None: oprot.writeFieldBegin('addable', TType.BOOL, 5) oprot.writeBool(self.addable) oprot.writeFieldEnd() if self.acceptableContentTypes is not None: oprot.writeFieldBegin('acceptableContentTypes', TType.SET, 6) oprot.writeSetBegin(TType.I32, len(self.acceptableContentTypes)) for iter27 in self.acceptableContentTypes: oprot.writeI32(iter27) oprot.writeSetEnd() oprot.writeFieldEnd() if self.capableMyhome is not None: oprot.writeFieldBegin('capableMyhome', TType.BOOL, 7) oprot.writeBool(self.capableMyhome) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Contact(object): """ Attributes: - mid - createdTime - type - status - relation - displayName - phoneticName - pictureStatus - thumbnailUrl - statusMessage - displayNameOverridden - favoriteTime - capableVoiceCall - capableVideoCall - capableMyhome - capableBuddy - attributes - settings - picturePath """ 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,): self.mid = mid self.createdTime = createdTime self.type = type self.status = status self.relation = relation self.displayName = displayName self.phoneticName = phoneticName self.pictureStatus = pictureStatus self.thumbnailUrl = thumbnailUrl self.statusMessage = statusMessage self.displayNameOverridden = displayNameOverridden self.favoriteTime = favoriteTime self.capableVoiceCall = capableVoiceCall self.capableVideoCall = capableVideoCall self.capableMyhome = capableMyhome self.capableBuddy = capableBuddy self.attributes = attributes self.settings = settings self.picturePath = picturePath def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.I32: self.status = iprot.readI32() else: iprot.skip(ftype) elif fid == 21: if ftype == TType.I32: self.relation = iprot.readI32() else: iprot.skip(ftype) elif fid == 22: if ftype == TType.STRING: self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 23: if ftype == TType.STRING: self.phoneticName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 24: if ftype == TType.STRING: self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 25: if ftype == TType.STRING: self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 26: if ftype == TType.STRING: self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 27: if ftype == TType.STRING: self.displayNameOverridden = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 28: if ftype == TType.I64: self.favoriteTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 31: if ftype == TType.BOOL: self.capableVoiceCall = iprot.readBool() else: iprot.skip(ftype) elif fid == 32: if ftype == TType.BOOL: self.capableVideoCall = iprot.readBool() else: iprot.skip(ftype) elif fid == 33: if ftype == TType.BOOL: self.capableMyhome = iprot.readBool() else: iprot.skip(ftype) elif fid == 34: if ftype == TType.BOOL: self.capableBuddy = iprot.readBool() else: iprot.skip(ftype) elif fid == 35: if ftype == TType.I32: self.attributes = iprot.readI32() else: iprot.skip(ftype) elif fid == 36: if ftype == TType.I64: self.settings = iprot.readI64() else: iprot.skip(ftype) elif fid == 37: if ftype == TType.STRING: self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Contact') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 2) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 10) oprot.writeI32(self.type) oprot.writeFieldEnd() if self.status is not None: oprot.writeFieldBegin('status', TType.I32, 11) oprot.writeI32(self.status) oprot.writeFieldEnd() if self.relation is not None: oprot.writeFieldBegin('relation', TType.I32, 21) oprot.writeI32(self.relation) oprot.writeFieldEnd() if self.displayName is not None: oprot.writeFieldBegin('displayName', TType.STRING, 22) oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName) oprot.writeFieldEnd() if self.phoneticName is not None: oprot.writeFieldBegin('phoneticName', TType.STRING, 23) oprot.writeString(self.phoneticName.encode('utf-8') if sys.version_info[0] == 2 else self.phoneticName) oprot.writeFieldEnd() if self.pictureStatus is not None: oprot.writeFieldBegin('pictureStatus', TType.STRING, 24) oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus) oprot.writeFieldEnd() if self.thumbnailUrl is not None: oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 25) oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl) oprot.writeFieldEnd() if self.statusMessage is not None: oprot.writeFieldBegin('statusMessage', TType.STRING, 26) oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage) oprot.writeFieldEnd() if self.displayNameOverridden is not None: oprot.writeFieldBegin('displayNameOverridden', TType.STRING, 27) oprot.writeString(self.displayNameOverridden.encode('utf-8') if sys.version_info[0] == 2 else self.displayNameOverridden) oprot.writeFieldEnd() if self.favoriteTime is not None: oprot.writeFieldBegin('favoriteTime', TType.I64, 28) oprot.writeI64(self.favoriteTime) oprot.writeFieldEnd() if self.capableVoiceCall is not None: oprot.writeFieldBegin('capableVoiceCall', TType.BOOL, 31) oprot.writeBool(self.capableVoiceCall) oprot.writeFieldEnd() if self.capableVideoCall is not None: oprot.writeFieldBegin('capableVideoCall', TType.BOOL, 32) oprot.writeBool(self.capableVideoCall) oprot.writeFieldEnd() if self.capableMyhome is not None: oprot.writeFieldBegin('capableMyhome', TType.BOOL, 33) oprot.writeBool(self.capableMyhome) oprot.writeFieldEnd() if self.capableBuddy is not None: oprot.writeFieldBegin('capableBuddy', TType.BOOL, 34) oprot.writeBool(self.capableBuddy) oprot.writeFieldEnd() if self.attributes is not None: oprot.writeFieldBegin('attributes', TType.I32, 35) oprot.writeI32(self.attributes) oprot.writeFieldEnd() if self.settings is not None: oprot.writeFieldBegin('settings', TType.I64, 36) oprot.writeI64(self.settings) oprot.writeFieldEnd() if self.picturePath is not None: oprot.writeFieldBegin('picturePath', TType.STRING, 37) oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class BuddyList(object): """ Attributes: - classification - displayName - totalBuddyCount - popularContacts """ def __init__(self, classification=None, displayName=None, totalBuddyCount=None, popularContacts=None,): self.classification = classification self.displayName = displayName self.totalBuddyCount = totalBuddyCount self.popularContacts = popularContacts def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.classification = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.totalBuddyCount = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.popularContacts = [] (_etype31, _size28) = iprot.readListBegin() for _i32 in range(_size28): _elem33 = Contact() _elem33.read(iprot) self.popularContacts.append(_elem33) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('BuddyList') if self.classification is not None: oprot.writeFieldBegin('classification', TType.STRING, 1) oprot.writeString(self.classification.encode('utf-8') if sys.version_info[0] == 2 else self.classification) oprot.writeFieldEnd() if self.displayName is not None: oprot.writeFieldBegin('displayName', TType.STRING, 2) oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName) oprot.writeFieldEnd() if self.totalBuddyCount is not None: oprot.writeFieldBegin('totalBuddyCount', TType.I32, 3) oprot.writeI32(self.totalBuddyCount) oprot.writeFieldEnd() if self.popularContacts is not None: oprot.writeFieldBegin('popularContacts', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.popularContacts)) for iter34 in self.popularContacts: iter34.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Location(object): """ Attributes: - title - address - latitude - longitude - phone """ def __init__(self, title=None, address=None, latitude=None, longitude=None, phone=None,): self.title = title self.address = address self.latitude = latitude self.longitude = longitude self.phone = phone def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.title = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.address = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.DOUBLE: self.latitude = iprot.readDouble() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.DOUBLE: self.longitude = iprot.readDouble() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.phone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Location') if self.title is not None: oprot.writeFieldBegin('title', TType.STRING, 1) oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) oprot.writeFieldEnd() if self.address is not None: oprot.writeFieldBegin('address', TType.STRING, 2) oprot.writeString(self.address.encode('utf-8') if sys.version_info[0] == 2 else self.address) oprot.writeFieldEnd() if self.latitude is not None: oprot.writeFieldBegin('latitude', TType.DOUBLE, 3) oprot.writeDouble(self.latitude) oprot.writeFieldEnd() if self.longitude is not None: oprot.writeFieldBegin('longitude', TType.DOUBLE, 4) oprot.writeDouble(self.longitude) oprot.writeFieldEnd() if self.phone is not None: oprot.writeFieldBegin('phone', TType.STRING, 5) oprot.writeString(self.phone.encode('utf-8') if sys.version_info[0] == 2 else self.phone) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class BuddyMessageRequest(object): """ Attributes: - contentType - text - location - content - contentMetadata """ def __init__(self, contentType=None, text=None, location=None, content=None, contentMetadata=None,): self.contentType = contentType self.text = text self.location = location self.content = content self.contentMetadata = contentMetadata def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.contentType = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.text = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: self.location = Location() self.location.read(iprot) else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.content = iprot.readBinary() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.MAP: self.contentMetadata = {} (_ktype36, _vtype37, _size35) = iprot.readMapBegin() for _i39 in range(_size35): _key40 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val41 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.contentMetadata[_key40] = _val41 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('BuddyMessageRequest') if self.contentType is not None: oprot.writeFieldBegin('contentType', TType.I32, 1) oprot.writeI32(self.contentType) oprot.writeFieldEnd() if self.text is not None: oprot.writeFieldBegin('text', TType.STRING, 2) oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text) oprot.writeFieldEnd() if self.location is not None: oprot.writeFieldBegin('location', TType.STRUCT, 3) self.location.write(oprot) oprot.writeFieldEnd() if self.content is not None: oprot.writeFieldBegin('content', TType.STRING, 4) oprot.writeBinary(self.content) oprot.writeFieldEnd() if self.contentMetadata is not None: oprot.writeFieldBegin('contentMetadata', TType.MAP, 5) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.contentMetadata)) for kiter42, viter43 in self.contentMetadata.items(): oprot.writeString(kiter42.encode('utf-8') if sys.version_info[0] == 2 else kiter42) oprot.writeString(viter43.encode('utf-8') if sys.version_info[0] == 2 else viter43) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class BuddyOnAirUrls(object): """ Attributes: - hls - smoothStreaming """ def __init__(self, hls=None, smoothStreaming=None,): self.hls = hls self.smoothStreaming = smoothStreaming def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.MAP: self.hls = {} (_ktype45, _vtype46, _size44) = iprot.readMapBegin() for _i48 in range(_size44): _key49 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val50 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.hls[_key49] = _val50 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.MAP: self.smoothStreaming = {} (_ktype52, _vtype53, _size51) = iprot.readMapBegin() for _i55 in range(_size51): _key56 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val57 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.smoothStreaming[_key56] = _val57 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('BuddyOnAirUrls') if self.hls is not None: oprot.writeFieldBegin('hls', TType.MAP, 1) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.hls)) for kiter58, viter59 in self.hls.items(): oprot.writeString(kiter58.encode('utf-8') if sys.version_info[0] == 2 else kiter58) oprot.writeString(viter59.encode('utf-8') if sys.version_info[0] == 2 else viter59) oprot.writeMapEnd() oprot.writeFieldEnd() if self.smoothStreaming is not None: oprot.writeFieldBegin('smoothStreaming', TType.MAP, 2) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.smoothStreaming)) for kiter60, viter61 in self.smoothStreaming.items(): oprot.writeString(kiter60.encode('utf-8') if sys.version_info[0] == 2 else kiter60) oprot.writeString(viter61.encode('utf-8') if sys.version_info[0] == 2 else viter61) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class BuddyOnAir(object): """ Attributes: - mid - freshnessLifetime - onAirId - onAir - text - viewerCount - targetCount - onAirType - onAirUrls """ def __init__(self, mid=None, freshnessLifetime=None, onAirId=None, onAir=None, text=None, viewerCount=None, targetCount=None, onAirType=None, onAirUrls=None,): self.mid = mid self.freshnessLifetime = freshnessLifetime self.onAirId = onAirId self.onAir = onAir self.text = text self.viewerCount = viewerCount self.targetCount = targetCount self.onAirType = onAirType self.onAirUrls = onAirUrls def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I64: self.freshnessLifetime = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.onAirId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.BOOL: self.onAir = iprot.readBool() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.text = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.I64: self.viewerCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.I64: self.targetCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 31: if ftype == TType.I32: self.onAirType = iprot.readI32() else: iprot.skip(ftype) elif fid == 32: if ftype == TType.STRUCT: self.onAirUrls = BuddyOnAirUrls() self.onAirUrls.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('BuddyOnAir') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.freshnessLifetime is not None: oprot.writeFieldBegin('freshnessLifetime', TType.I64, 3) oprot.writeI64(self.freshnessLifetime) oprot.writeFieldEnd() if self.onAirId is not None: oprot.writeFieldBegin('onAirId', TType.STRING, 4) oprot.writeString(self.onAirId.encode('utf-8') if sys.version_info[0] == 2 else self.onAirId) oprot.writeFieldEnd() if self.onAir is not None: oprot.writeFieldBegin('onAir', TType.BOOL, 5) oprot.writeBool(self.onAir) oprot.writeFieldEnd() if self.text is not None: oprot.writeFieldBegin('text', TType.STRING, 11) oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text) oprot.writeFieldEnd() if self.viewerCount is not None: oprot.writeFieldBegin('viewerCount', TType.I64, 12) oprot.writeI64(self.viewerCount) oprot.writeFieldEnd() if self.targetCount is not None: oprot.writeFieldBegin('targetCount', TType.I64, 13) oprot.writeI64(self.targetCount) oprot.writeFieldEnd() if self.onAirType is not None: oprot.writeFieldBegin('onAirType', TType.I32, 31) oprot.writeI32(self.onAirType) oprot.writeFieldEnd() if self.onAirUrls is not None: oprot.writeFieldBegin('onAirUrls', TType.STRUCT, 32) self.onAirUrls.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class BuddyProfile(object): """ Attributes: - buddyId - mid - searchId - displayName - statusMessage - contactCount """ def __init__(self, buddyId=None, mid=None, searchId=None, displayName=None, statusMessage=None, contactCount=None,): self.buddyId = buddyId self.mid = mid self.searchId = searchId self.displayName = displayName self.statusMessage = statusMessage self.contactCount = contactCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.buddyId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.searchId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.I64: self.contactCount = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('BuddyProfile') if self.buddyId is not None: oprot.writeFieldBegin('buddyId', TType.STRING, 1) oprot.writeString(self.buddyId.encode('utf-8') if sys.version_info[0] == 2 else self.buddyId) oprot.writeFieldEnd() if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 2) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.searchId is not None: oprot.writeFieldBegin('searchId', TType.STRING, 3) oprot.writeString(self.searchId.encode('utf-8') if sys.version_info[0] == 2 else self.searchId) oprot.writeFieldEnd() if self.displayName is not None: oprot.writeFieldBegin('displayName', TType.STRING, 4) oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName) oprot.writeFieldEnd() if self.statusMessage is not None: oprot.writeFieldBegin('statusMessage', TType.STRING, 5) oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage) oprot.writeFieldEnd() if self.contactCount is not None: oprot.writeFieldBegin('contactCount', TType.I64, 11) oprot.writeI64(self.contactCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class BuddySearchResult(object): """ Attributes: - mid - displayName - pictureStatus - picturePath - statusMessage - businessAccount """ def __init__(self, mid=None, displayName=None, pictureStatus=None, picturePath=None, statusMessage=None, businessAccount=None,): self.mid = mid self.displayName = displayName self.pictureStatus = pictureStatus self.picturePath = picturePath self.statusMessage = statusMessage self.businessAccount = businessAccount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.BOOL: self.businessAccount = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('BuddySearchResult') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.displayName is not None: oprot.writeFieldBegin('displayName', TType.STRING, 2) oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName) oprot.writeFieldEnd() if self.pictureStatus is not None: oprot.writeFieldBegin('pictureStatus', TType.STRING, 3) oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus) oprot.writeFieldEnd() if self.picturePath is not None: oprot.writeFieldBegin('picturePath', TType.STRING, 4) oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath) oprot.writeFieldEnd() if self.statusMessage is not None: oprot.writeFieldBegin('statusMessage', TType.STRING, 5) oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage) oprot.writeFieldEnd() if self.businessAccount is not None: oprot.writeFieldBegin('businessAccount', TType.BOOL, 6) oprot.writeBool(self.businessAccount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ChannelDomain(object): """ Attributes: - host - removed """ def __init__(self, host=None, removed=None,): self.host = host self.removed = removed def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.host = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.BOOL: self.removed = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChannelDomain') if self.host is not None: oprot.writeFieldBegin('host', TType.STRING, 1) oprot.writeString(self.host.encode('utf-8') if sys.version_info[0] == 2 else self.host) oprot.writeFieldEnd() if self.removed is not None: oprot.writeFieldBegin('removed', TType.BOOL, 2) oprot.writeBool(self.removed) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ChannelDomains(object): """ Attributes: - channelDomains - revision """ def __init__(self, channelDomains=None, revision=None,): self.channelDomains = channelDomains self.revision = revision def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.LIST: self.channelDomains = [] (_etype65, _size62) = iprot.readListBegin() for _i66 in range(_size62): _elem67 = ChannelDomain() _elem67.read(iprot) self.channelDomains.append(_elem67) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.revision = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChannelDomains') if self.channelDomains is not None: oprot.writeFieldBegin('channelDomains', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.channelDomains)) for iter68 in self.channelDomains: iter68.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.revision is not None: oprot.writeFieldBegin('revision', TType.I64, 2) oprot.writeI64(self.revision) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ChannelException(TException): """ Attributes: - code - reason - parameterMap """ def __init__(self, code=None, reason=None, parameterMap=None,): self.code = code self.reason = reason self.parameterMap = parameterMap def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.code = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.MAP: self.parameterMap = {} (_ktype70, _vtype71, _size69) = iprot.readMapBegin() for _i73 in range(_size69): _key74 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val75 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.parameterMap[_key74] = _val75 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChannelException') if self.code is not None: oprot.writeFieldBegin('code', TType.I32, 1) oprot.writeI32(self.code) oprot.writeFieldEnd() if self.reason is not None: oprot.writeFieldBegin('reason', TType.STRING, 2) oprot.writeString(self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason) oprot.writeFieldEnd() if self.parameterMap is not None: oprot.writeFieldBegin('parameterMap', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap)) for kiter76, viter77 in self.parameterMap.items(): oprot.writeString(kiter76.encode('utf-8') if sys.version_info[0] == 2 else kiter76) oprot.writeString(viter77.encode('utf-8') if sys.version_info[0] == 2 else viter77) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __str__(self): return repr(self) def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ChannelInfos(object): """ Attributes: - channelInfos - revision """ def __init__(self, channelInfos=None, revision=None,): self.channelInfos = channelInfos self.revision = revision def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.LIST: self.channelInfos = [] (_etype81, _size78) = iprot.readListBegin() for _i82 in range(_size78): _elem83 = ChannelInfo() _elem83.read(iprot) self.channelInfos.append(_elem83) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.revision = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChannelInfos') if self.channelInfos is not None: oprot.writeFieldBegin('channelInfos', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.channelInfos)) for iter84 in self.channelInfos: iter84.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.revision is not None: oprot.writeFieldBegin('revision', TType.I64, 2) oprot.writeI64(self.revision) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ChannelNotificationSetting(object): """ Attributes: - channelId - name - notificationReceivable - messageReceivable - showDefault """ def __init__(self, channelId=None, name=None, notificationReceivable=None, messageReceivable=None, showDefault=None,): self.channelId = channelId self.name = name self.notificationReceivable = notificationReceivable self.messageReceivable = messageReceivable self.showDefault = showDefault def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.BOOL: self.notificationReceivable = iprot.readBool() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.BOOL: self.messageReceivable = iprot.readBool() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.BOOL: self.showDefault = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChannelNotificationSetting') if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 1) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 2) oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.notificationReceivable is not None: oprot.writeFieldBegin('notificationReceivable', TType.BOOL, 3) oprot.writeBool(self.notificationReceivable) oprot.writeFieldEnd() if self.messageReceivable is not None: oprot.writeFieldBegin('messageReceivable', TType.BOOL, 4) oprot.writeBool(self.messageReceivable) oprot.writeFieldEnd() if self.showDefault is not None: oprot.writeFieldBegin('showDefault', TType.BOOL, 5) oprot.writeBool(self.showDefault) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ChannelSyncDatas(object): """ Attributes: - channelInfos - channelDomains - revision - expires """ def __init__(self, channelInfos=None, channelDomains=None, revision=None, expires=None,): self.channelInfos = channelInfos self.channelDomains = channelDomains self.revision = revision self.expires = expires def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.LIST: self.channelInfos = [] (_etype88, _size85) = iprot.readListBegin() for _i89 in range(_size85): _elem90 = ChannelInfo() _elem90.read(iprot) self.channelInfos.append(_elem90) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.channelDomains = [] (_etype94, _size91) = iprot.readListBegin() for _i95 in range(_size91): _elem96 = ChannelDomain() _elem96.read(iprot) self.channelDomains.append(_elem96) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I64: self.revision = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I64: self.expires = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChannelSyncDatas') if self.channelInfos is not None: oprot.writeFieldBegin('channelInfos', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.channelInfos)) for iter97 in self.channelInfos: iter97.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.channelDomains is not None: oprot.writeFieldBegin('channelDomains', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.channelDomains)) for iter98 in self.channelDomains: iter98.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.revision is not None: oprot.writeFieldBegin('revision', TType.I64, 3) oprot.writeI64(self.revision) oprot.writeFieldEnd() if self.expires is not None: oprot.writeFieldBegin('expires', TType.I64, 4) oprot.writeI64(self.expires) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ChannelToken(object): """ Attributes: - token - obsToken - expiration - refreshToken - channelAccessToken """ def __init__(self, token=None, obsToken=None, expiration=None, refreshToken=None, channelAccessToken=None,): self.token = token self.obsToken = obsToken self.expiration = expiration self.refreshToken = refreshToken self.channelAccessToken = channelAccessToken def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.token = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.obsToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I64: self.expiration = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.refreshToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.channelAccessToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ChannelToken') if self.token is not None: oprot.writeFieldBegin('token', TType.STRING, 1) oprot.writeString(self.token.encode('utf-8') if sys.version_info[0] == 2 else self.token) oprot.writeFieldEnd() if self.obsToken is not None: oprot.writeFieldBegin('obsToken', TType.STRING, 2) oprot.writeString(self.obsToken.encode('utf-8') if sys.version_info[0] == 2 else self.obsToken) oprot.writeFieldEnd() if self.expiration is not None: oprot.writeFieldBegin('expiration', TType.I64, 3) oprot.writeI64(self.expiration) oprot.writeFieldEnd() if self.refreshToken is not None: oprot.writeFieldBegin('refreshToken', TType.STRING, 4) oprot.writeString(self.refreshToken.encode('utf-8') if sys.version_info[0] == 2 else self.refreshToken) oprot.writeFieldEnd() if self.channelAccessToken is not None: oprot.writeFieldBegin('channelAccessToken', TType.STRING, 5) oprot.writeString(self.channelAccessToken.encode('utf-8') if sys.version_info[0] == 2 else self.channelAccessToken) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Coin(object): """ Attributes: - freeCoinBalance - payedCoinBalance - totalCoinBalance - rewardCoinBalance """ def __init__(self, freeCoinBalance=None, payedCoinBalance=None, totalCoinBalance=None, rewardCoinBalance=None,): self.freeCoinBalance = freeCoinBalance self.payedCoinBalance = payedCoinBalance self.totalCoinBalance = totalCoinBalance self.rewardCoinBalance = rewardCoinBalance def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.freeCoinBalance = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.payedCoinBalance = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.totalCoinBalance = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.rewardCoinBalance = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Coin') if self.freeCoinBalance is not None: oprot.writeFieldBegin('freeCoinBalance', TType.I32, 1) oprot.writeI32(self.freeCoinBalance) oprot.writeFieldEnd() if self.payedCoinBalance is not None: oprot.writeFieldBegin('payedCoinBalance', TType.I32, 2) oprot.writeI32(self.payedCoinBalance) oprot.writeFieldEnd() if self.totalCoinBalance is not None: oprot.writeFieldBegin('totalCoinBalance', TType.I32, 3) oprot.writeI32(self.totalCoinBalance) oprot.writeFieldEnd() if self.rewardCoinBalance is not None: oprot.writeFieldBegin('rewardCoinBalance', TType.I32, 4) oprot.writeI32(self.rewardCoinBalance) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CoinPayLoad(object): """ Attributes: - payCoin - freeCoin - type - rewardCoin """ def __init__(self, payCoin=None, freeCoin=None, type=None, rewardCoin=None,): self.payCoin = payCoin self.freeCoin = freeCoin self.type = type self.rewardCoin = rewardCoin def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.payCoin = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.freeCoin = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.rewardCoin = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CoinPayLoad') if self.payCoin is not None: oprot.writeFieldBegin('payCoin', TType.I32, 1) oprot.writeI32(self.payCoin) oprot.writeFieldEnd() if self.freeCoin is not None: oprot.writeFieldBegin('freeCoin', TType.I32, 2) oprot.writeI32(self.freeCoin) oprot.writeFieldEnd() if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 3) oprot.writeI32(self.type) oprot.writeFieldEnd() if self.rewardCoin is not None: oprot.writeFieldBegin('rewardCoin', TType.I32, 4) oprot.writeI32(self.rewardCoin) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CoinHistory(object): """ Attributes: - payDate - coinBalance - coin - price - title - refund - paySeq - currency - currencySign - displayPrice - payload - channelId """ def __init__(self, payDate=None, coinBalance=None, coin=None, price=None, title=None, refund=None, paySeq=None, currency=None, currencySign=None, displayPrice=None, payload=None, channelId=None,): self.payDate = payDate self.coinBalance = coinBalance self.coin = coin self.price = price self.title = title self.refund = refund self.paySeq = paySeq self.currency = currency self.currencySign = currencySign self.displayPrice = displayPrice self.payload = payload self.channelId = channelId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I64: self.payDate = iprot.readI64() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.coinBalance = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.coin = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.price = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.title = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.BOOL: self.refund = iprot.readBool() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: self.paySeq = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.currency = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: self.currencySign = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: self.displayPrice = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRUCT: self.payload = CoinPayLoad() self.payload.read(iprot) else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CoinHistory') if self.payDate is not None: oprot.writeFieldBegin('payDate', TType.I64, 1) oprot.writeI64(self.payDate) oprot.writeFieldEnd() if self.coinBalance is not None: oprot.writeFieldBegin('coinBalance', TType.I32, 2) oprot.writeI32(self.coinBalance) oprot.writeFieldEnd() if self.coin is not None: oprot.writeFieldBegin('coin', TType.I32, 3) oprot.writeI32(self.coin) oprot.writeFieldEnd() if self.price is not None: oprot.writeFieldBegin('price', TType.STRING, 4) oprot.writeString(self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price) oprot.writeFieldEnd() if self.title is not None: oprot.writeFieldBegin('title', TType.STRING, 5) oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) oprot.writeFieldEnd() if self.refund is not None: oprot.writeFieldBegin('refund', TType.BOOL, 6) oprot.writeBool(self.refund) oprot.writeFieldEnd() if self.paySeq is not None: oprot.writeFieldBegin('paySeq', TType.STRING, 7) oprot.writeString(self.paySeq.encode('utf-8') if sys.version_info[0] == 2 else self.paySeq) oprot.writeFieldEnd() if self.currency is not None: oprot.writeFieldBegin('currency', TType.STRING, 8) oprot.writeString(self.currency.encode('utf-8') if sys.version_info[0] == 2 else self.currency) oprot.writeFieldEnd() if self.currencySign is not None: oprot.writeFieldBegin('currencySign', TType.STRING, 9) oprot.writeString(self.currencySign.encode('utf-8') if sys.version_info[0] == 2 else self.currencySign) oprot.writeFieldEnd() if self.displayPrice is not None: oprot.writeFieldBegin('displayPrice', TType.STRING, 10) oprot.writeString(self.displayPrice.encode('utf-8') if sys.version_info[0] == 2 else self.displayPrice) oprot.writeFieldEnd() if self.payload is not None: oprot.writeFieldBegin('payload', TType.STRUCT, 11) self.payload.write(oprot) oprot.writeFieldEnd() if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 12) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CoinHistoryCondition(object): """ Attributes: - start - size - language - eddt - appStoreCode """ def __init__(self, start=None, size=None, language=None, eddt=None, appStoreCode=None,): self.start = start self.size = size self.language = language self.eddt = eddt self.appStoreCode = appStoreCode def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I64: self.start = iprot.readI64() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.size = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.language = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.eddt = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.appStoreCode = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CoinHistoryCondition') if self.start is not None: oprot.writeFieldBegin('start', TType.I64, 1) oprot.writeI64(self.start) oprot.writeFieldEnd() if self.size is not None: oprot.writeFieldBegin('size', TType.I32, 2) oprot.writeI32(self.size) oprot.writeFieldEnd() if self.language is not None: oprot.writeFieldBegin('language', TType.STRING, 3) oprot.writeString(self.language.encode('utf-8') if sys.version_info[0] == 2 else self.language) oprot.writeFieldEnd() if self.eddt is not None: oprot.writeFieldBegin('eddt', TType.STRING, 4) oprot.writeString(self.eddt.encode('utf-8') if sys.version_info[0] == 2 else self.eddt) oprot.writeFieldEnd() if self.appStoreCode is not None: oprot.writeFieldBegin('appStoreCode', TType.I32, 5) oprot.writeI32(self.appStoreCode) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CoinHistoryResult(object): """ Attributes: - historys - balance - hasNext """ def __init__(self, historys=None, balance=None, hasNext=None,): self.historys = historys self.balance = balance self.hasNext = hasNext def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.LIST: self.historys = [] (_etype102, _size99) = iprot.readListBegin() for _i103 in range(_size99): _elem104 = CoinHistory() _elem104.read(iprot) self.historys.append(_elem104) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.balance = Coin() self.balance.read(iprot) else: iprot.skip(ftype) elif fid == 3: if ftype == TType.BOOL: self.hasNext = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CoinHistoryResult') if self.historys is not None: oprot.writeFieldBegin('historys', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.historys)) for iter105 in self.historys: iter105.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.balance is not None: oprot.writeFieldBegin('balance', TType.STRUCT, 2) self.balance.write(oprot) oprot.writeFieldEnd() if self.hasNext is not None: oprot.writeFieldBegin('hasNext', TType.BOOL, 3) oprot.writeBool(self.hasNext) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CoinProductItem(object): """ Attributes: - itemId - coin - freeCoin - currency - price - displayPrice - name - desc """ def __init__(self, itemId=None, coin=None, freeCoin=None, currency=None, price=None, displayPrice=None, name=None, desc=None,): self.itemId = itemId self.coin = coin self.freeCoin = freeCoin self.currency = currency self.price = price self.displayPrice = displayPrice self.name = name self.desc = desc def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.itemId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.coin = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.freeCoin = iprot.readI32() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.currency = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.price = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: self.displayPrice = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: self.desc = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CoinProductItem') if self.itemId is not None: oprot.writeFieldBegin('itemId', TType.STRING, 1) oprot.writeString(self.itemId.encode('utf-8') if sys.version_info[0] == 2 else self.itemId) oprot.writeFieldEnd() if self.coin is not None: oprot.writeFieldBegin('coin', TType.I32, 2) oprot.writeI32(self.coin) oprot.writeFieldEnd() if self.freeCoin is not None: oprot.writeFieldBegin('freeCoin', TType.I32, 3) oprot.writeI32(self.freeCoin) oprot.writeFieldEnd() if self.currency is not None: oprot.writeFieldBegin('currency', TType.STRING, 5) oprot.writeString(self.currency.encode('utf-8') if sys.version_info[0] == 2 else self.currency) oprot.writeFieldEnd() if self.price is not None: oprot.writeFieldBegin('price', TType.STRING, 6) oprot.writeString(self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price) oprot.writeFieldEnd() if self.displayPrice is not None: oprot.writeFieldBegin('displayPrice', TType.STRING, 7) oprot.writeString(self.displayPrice.encode('utf-8') if sys.version_info[0] == 2 else self.displayPrice) oprot.writeFieldEnd() if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 8) oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.desc is not None: oprot.writeFieldBegin('desc', TType.STRING, 9) oprot.writeString(self.desc.encode('utf-8') if sys.version_info[0] == 2 else self.desc) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CoinPurchaseConfirm(object): """ Attributes: - orderId - appStoreCode - receipt - signature - seller - requestType - ignoreReceipt """ def __init__(self, orderId=None, appStoreCode=None, receipt=None, signature=None, seller=None, requestType=None, ignoreReceipt=None,): self.orderId = orderId self.appStoreCode = appStoreCode self.receipt = receipt self.signature = signature self.seller = seller self.requestType = requestType self.ignoreReceipt = ignoreReceipt def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.orderId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.appStoreCode = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.receipt = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.signature = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.seller = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.requestType = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.BOOL: self.ignoreReceipt = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CoinPurchaseConfirm') if self.orderId is not None: oprot.writeFieldBegin('orderId', TType.STRING, 1) oprot.writeString(self.orderId.encode('utf-8') if sys.version_info[0] == 2 else self.orderId) oprot.writeFieldEnd() if self.appStoreCode is not None: oprot.writeFieldBegin('appStoreCode', TType.I32, 2) oprot.writeI32(self.appStoreCode) oprot.writeFieldEnd() if self.receipt is not None: oprot.writeFieldBegin('receipt', TType.STRING, 3) oprot.writeString(self.receipt.encode('utf-8') if sys.version_info[0] == 2 else self.receipt) oprot.writeFieldEnd() if self.signature is not None: oprot.writeFieldBegin('signature', TType.STRING, 4) oprot.writeString(self.signature.encode('utf-8') if sys.version_info[0] == 2 else self.signature) oprot.writeFieldEnd() if self.seller is not None: oprot.writeFieldBegin('seller', TType.STRING, 5) oprot.writeString(self.seller.encode('utf-8') if sys.version_info[0] == 2 else self.seller) oprot.writeFieldEnd() if self.requestType is not None: oprot.writeFieldBegin('requestType', TType.STRING, 6) oprot.writeString(self.requestType.encode('utf-8') if sys.version_info[0] == 2 else self.requestType) oprot.writeFieldEnd() if self.ignoreReceipt is not None: oprot.writeFieldBegin('ignoreReceipt', TType.BOOL, 7) oprot.writeBool(self.ignoreReceipt) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CoinPurchaseReservation(object): """ Attributes: - productId - country - currency - price - appStoreCode - language - pgCode - redirectUrl """ def __init__(self, productId=None, country=None, currency=None, price=None, appStoreCode=None, language=None, pgCode=None, redirectUrl=None,): self.productId = productId self.country = country self.currency = currency self.price = price self.appStoreCode = appStoreCode self.language = language self.pgCode = pgCode self.redirectUrl = redirectUrl def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.productId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.country = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.currency = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.price = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.appStoreCode = iprot.readI32() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.language = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.I32: self.pgCode = iprot.readI32() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.redirectUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CoinPurchaseReservation') if self.productId is not None: oprot.writeFieldBegin('productId', TType.STRING, 1) oprot.writeString(self.productId.encode('utf-8') if sys.version_info[0] == 2 else self.productId) oprot.writeFieldEnd() if self.country is not None: oprot.writeFieldBegin('country', TType.STRING, 2) oprot.writeString(self.country.encode('utf-8') if sys.version_info[0] == 2 else self.country) oprot.writeFieldEnd() if self.currency is not None: oprot.writeFieldBegin('currency', TType.STRING, 3) oprot.writeString(self.currency.encode('utf-8') if sys.version_info[0] == 2 else self.currency) oprot.writeFieldEnd() if self.price is not None: oprot.writeFieldBegin('price', TType.STRING, 4) oprot.writeString(self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price) oprot.writeFieldEnd() if self.appStoreCode is not None: oprot.writeFieldBegin('appStoreCode', TType.I32, 5) oprot.writeI32(self.appStoreCode) oprot.writeFieldEnd() if self.language is not None: oprot.writeFieldBegin('language', TType.STRING, 6) oprot.writeString(self.language.encode('utf-8') if sys.version_info[0] == 2 else self.language) oprot.writeFieldEnd() if self.pgCode is not None: oprot.writeFieldBegin('pgCode', TType.I32, 7) oprot.writeI32(self.pgCode) oprot.writeFieldEnd() if self.redirectUrl is not None: oprot.writeFieldBegin('redirectUrl', TType.STRING, 8) oprot.writeString(self.redirectUrl.encode('utf-8') if sys.version_info[0] == 2 else self.redirectUrl) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CoinUseReservationItem(object): """ Attributes: - itemId - itemName - amount """ def __init__(self, itemId=None, itemName=None, amount=None,): self.itemId = itemId self.itemName = itemName self.amount = amount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.itemId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.itemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.amount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CoinUseReservationItem') if self.itemId is not None: oprot.writeFieldBegin('itemId', TType.STRING, 1) oprot.writeString(self.itemId.encode('utf-8') if sys.version_info[0] == 2 else self.itemId) oprot.writeFieldEnd() if self.itemName is not None: oprot.writeFieldBegin('itemName', TType.STRING, 2) oprot.writeString(self.itemName.encode('utf-8') if sys.version_info[0] == 2 else self.itemName) oprot.writeFieldEnd() if self.amount is not None: oprot.writeFieldBegin('amount', TType.I32, 3) oprot.writeI32(self.amount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CoinUseReservation(object): """ Attributes: - channelId - shopOrderId - appStoreCode - items - country """ def __init__(self, channelId=None, shopOrderId=None, appStoreCode=None, items=None, country=None,): self.channelId = channelId self.shopOrderId = shopOrderId self.appStoreCode = appStoreCode self.items = items self.country = country def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.shopOrderId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.appStoreCode = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.items = [] (_etype109, _size106) = iprot.readListBegin() for _i110 in range(_size106): _elem111 = CoinUseReservationItem() _elem111.read(iprot) self.items.append(_elem111) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.country = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CoinUseReservation') if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 1) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.shopOrderId is not None: oprot.writeFieldBegin('shopOrderId', TType.STRING, 2) oprot.writeString(self.shopOrderId.encode('utf-8') if sys.version_info[0] == 2 else self.shopOrderId) oprot.writeFieldEnd() if self.appStoreCode is not None: oprot.writeFieldBegin('appStoreCode', TType.I32, 3) oprot.writeI32(self.appStoreCode) oprot.writeFieldEnd() if self.items is not None: oprot.writeFieldBegin('items', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.items)) for iter112 in self.items: iter112.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.country is not None: oprot.writeFieldBegin('country', TType.STRING, 5) oprot.writeString(self.country.encode('utf-8') if sys.version_info[0] == 2 else self.country) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class CompactContact(object): """ Attributes: - mid - createdTime - modifiedTime - status - settings - displayNameOverridden """ def __init__(self, mid=None, createdTime=None, modifiedTime=None, status=None, settings=None, displayNameOverridden=None,): self.mid = mid self.createdTime = createdTime self.modifiedTime = modifiedTime self.status = status self.settings = settings self.displayNameOverridden = displayNameOverridden def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I64: self.modifiedTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.status = iprot.readI32() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I64: self.settings = iprot.readI64() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.displayNameOverridden = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('CompactContact') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 2) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.modifiedTime is not None: oprot.writeFieldBegin('modifiedTime', TType.I64, 3) oprot.writeI64(self.modifiedTime) oprot.writeFieldEnd() if self.status is not None: oprot.writeFieldBegin('status', TType.I32, 4) oprot.writeI32(self.status) oprot.writeFieldEnd() if self.settings is not None: oprot.writeFieldBegin('settings', TType.I64, 5) oprot.writeI64(self.settings) oprot.writeFieldEnd() if self.displayNameOverridden is not None: oprot.writeFieldBegin('displayNameOverridden', TType.STRING, 6) oprot.writeString(self.displayNameOverridden.encode('utf-8') if sys.version_info[0] == 2 else self.displayNameOverridden) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ContactModification(object): """ Attributes: - type - luid - phones - emails - userids """ def __init__(self, type=None, luid=None, phones=None, emails=None, userids=None,): self.type = type self.luid = luid self.phones = phones self.emails = emails self.userids = userids def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.luid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.LIST: self.phones = [] (_etype116, _size113) = iprot.readListBegin() for _i117 in range(_size113): _elem118 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.phones.append(_elem118) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.LIST: self.emails = [] (_etype122, _size119) = iprot.readListBegin() for _i123 in range(_size119): _elem124 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.emails.append(_elem124) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.LIST: self.userids = [] (_etype128, _size125) = iprot.readListBegin() for _i129 in range(_size125): _elem130 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.userids.append(_elem130) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ContactModification') if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 1) oprot.writeI32(self.type) oprot.writeFieldEnd() if self.luid is not None: oprot.writeFieldBegin('luid', TType.STRING, 2) oprot.writeString(self.luid.encode('utf-8') if sys.version_info[0] == 2 else self.luid) oprot.writeFieldEnd() if self.phones is not None: oprot.writeFieldBegin('phones', TType.LIST, 11) oprot.writeListBegin(TType.STRING, len(self.phones)) for iter131 in self.phones: oprot.writeString(iter131.encode('utf-8') if sys.version_info[0] == 2 else iter131) oprot.writeListEnd() oprot.writeFieldEnd() if self.emails is not None: oprot.writeFieldBegin('emails', TType.LIST, 12) oprot.writeListBegin(TType.STRING, len(self.emails)) for iter132 in self.emails: oprot.writeString(iter132.encode('utf-8') if sys.version_info[0] == 2 else iter132) oprot.writeListEnd() oprot.writeFieldEnd() if self.userids is not None: oprot.writeFieldBegin('userids', TType.LIST, 13) oprot.writeListBegin(TType.STRING, len(self.userids)) for iter133 in self.userids: oprot.writeString(iter133.encode('utf-8') if sys.version_info[0] == 2 else iter133) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ContactRegistration(object): """ Attributes: - contact - luid - contactType - contactKey """ def __init__(self, contact=None, luid=None, contactType=None, contactKey=None,): self.contact = contact self.luid = luid self.contactType = contactType self.contactKey = contactKey def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.contact = Contact() self.contact.read(iprot) else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: self.luid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.I32: self.contactType = iprot.readI32() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.contactKey = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ContactRegistration') if self.contact is not None: oprot.writeFieldBegin('contact', TType.STRUCT, 1) self.contact.write(oprot) oprot.writeFieldEnd() if self.luid is not None: oprot.writeFieldBegin('luid', TType.STRING, 10) oprot.writeString(self.luid.encode('utf-8') if sys.version_info[0] == 2 else self.luid) oprot.writeFieldEnd() if self.contactType is not None: oprot.writeFieldBegin('contactType', TType.I32, 11) oprot.writeI32(self.contactType) oprot.writeFieldEnd() if self.contactKey is not None: oprot.writeFieldBegin('contactKey', TType.STRING, 12) oprot.writeString(self.contactKey.encode('utf-8') if sys.version_info[0] == 2 else self.contactKey) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ContactReport(object): """ Attributes: - mid - exists - contact """ def __init__(self, mid=None, exists=None, contact=None,): self.mid = mid self.exists = exists self.contact = contact def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.BOOL: self.exists = iprot.readBool() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRUCT: self.contact = Contact() self.contact.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ContactReport') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.exists is not None: oprot.writeFieldBegin('exists', TType.BOOL, 2) oprot.writeBool(self.exists) oprot.writeFieldEnd() if self.contact is not None: oprot.writeFieldBegin('contact', TType.STRUCT, 3) self.contact.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ContactReportResult(object): """ Attributes: - mid - exists """ def __init__(self, mid=None, exists=None,): self.mid = mid self.exists = exists def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.BOOL: self.exists = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ContactReportResult') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.exists is not None: oprot.writeFieldBegin('exists', TType.BOOL, 2) oprot.writeBool(self.exists) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class DeviceInfo(object): """ Attributes: - deviceName - systemName - systemVersion - model - carrierCode - carrierName - applicationType """ def __init__(self, deviceName=None, systemName=None, systemVersion=None, model=None, carrierCode=None, carrierName=None, applicationType=None,): self.deviceName = deviceName self.systemName = systemName self.systemVersion = systemVersion self.model = model self.carrierCode = carrierCode self.carrierName = carrierName self.applicationType = applicationType def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.deviceName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.systemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.systemVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.model = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.I32: self.carrierCode = iprot.readI32() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.carrierName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 20: if ftype == TType.I32: self.applicationType = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('DeviceInfo') if self.deviceName is not None: oprot.writeFieldBegin('deviceName', TType.STRING, 1) oprot.writeString(self.deviceName.encode('utf-8') if sys.version_info[0] == 2 else self.deviceName) oprot.writeFieldEnd() if self.systemName is not None: oprot.writeFieldBegin('systemName', TType.STRING, 2) oprot.writeString(self.systemName.encode('utf-8') if sys.version_info[0] == 2 else self.systemName) oprot.writeFieldEnd() if self.systemVersion is not None: oprot.writeFieldBegin('systemVersion', TType.STRING, 3) oprot.writeString(self.systemVersion.encode('utf-8') if sys.version_info[0] == 2 else self.systemVersion) oprot.writeFieldEnd() if self.model is not None: oprot.writeFieldBegin('model', TType.STRING, 4) oprot.writeString(self.model.encode('utf-8') if sys.version_info[0] == 2 else self.model) oprot.writeFieldEnd() if self.carrierCode is not None: oprot.writeFieldBegin('carrierCode', TType.I32, 10) oprot.writeI32(self.carrierCode) oprot.writeFieldEnd() if self.carrierName is not None: oprot.writeFieldBegin('carrierName', TType.STRING, 11) oprot.writeString(self.carrierName.encode('utf-8') if sys.version_info[0] == 2 else self.carrierName) oprot.writeFieldEnd() if self.applicationType is not None: oprot.writeFieldBegin('applicationType', TType.I32, 20) oprot.writeI32(self.applicationType) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class EmailConfirmation(object): """ Attributes: - usePasswordSet - email - password - ignoreDuplication """ def __init__(self, usePasswordSet=None, email=None, password=None, ignoreDuplication=None,): self.usePasswordSet = usePasswordSet self.email = email self.password = password self.ignoreDuplication = ignoreDuplication def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.BOOL: self.usePasswordSet = iprot.readBool() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.email = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.BOOL: self.ignoreDuplication = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('EmailConfirmation') if self.usePasswordSet is not None: oprot.writeFieldBegin('usePasswordSet', TType.BOOL, 1) oprot.writeBool(self.usePasswordSet) oprot.writeFieldEnd() if self.email is not None: oprot.writeFieldBegin('email', TType.STRING, 2) oprot.writeString(self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email) oprot.writeFieldEnd() if self.password is not None: oprot.writeFieldBegin('password', TType.STRING, 3) oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) oprot.writeFieldEnd() if self.ignoreDuplication is not None: oprot.writeFieldBegin('ignoreDuplication', TType.BOOL, 4) oprot.writeBool(self.ignoreDuplication) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class EmailConfirmationSession(object): """ Attributes: - emailConfirmationType - verifier - targetEmail """ def __init__(self, emailConfirmationType=None, verifier=None, targetEmail=None,): self.emailConfirmationType = emailConfirmationType self.verifier = verifier self.targetEmail = targetEmail def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.emailConfirmationType = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.targetEmail = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('EmailConfirmationSession') if self.emailConfirmationType is not None: oprot.writeFieldBegin('emailConfirmationType', TType.I32, 1) oprot.writeI32(self.emailConfirmationType) oprot.writeFieldEnd() if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 2) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() if self.targetEmail is not None: oprot.writeFieldBegin('targetEmail', TType.STRING, 3) oprot.writeString(self.targetEmail.encode('utf-8') if sys.version_info[0] == 2 else self.targetEmail) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class FriendChannelMatrix(object): """ Attributes: - channelId - representMid - count """ def __init__(self, channelId=None, representMid=None, count=None,): self.channelId = channelId self.representMid = representMid self.count = count def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.representMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.count = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('FriendChannelMatrix') if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 1) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.representMid is not None: oprot.writeFieldBegin('representMid', TType.STRING, 2) oprot.writeString(self.representMid.encode('utf-8') if sys.version_info[0] == 2 else self.representMid) oprot.writeFieldEnd() if self.count is not None: oprot.writeFieldBegin('count', TType.I32, 3) oprot.writeI32(self.count) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class FriendChannelMatricesResponse(object): """ Attributes: - expires - matrices """ def __init__(self, expires=None, matrices=None,): self.expires = expires self.matrices = matrices def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I64: self.expires = iprot.readI64() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.matrices = [] (_etype137, _size134) = iprot.readListBegin() for _i138 in range(_size134): _elem139 = FriendChannelMatrix() _elem139.read(iprot) self.matrices.append(_elem139) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('FriendChannelMatricesResponse') if self.expires is not None: oprot.writeFieldBegin('expires', TType.I64, 1) oprot.writeI64(self.expires) oprot.writeFieldEnd() if self.matrices is not None: oprot.writeFieldBegin('matrices', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.matrices)) for iter140 in self.matrices: iter140.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Geolocation(object): """ Attributes: - longitude - latitude """ def __init__(self, longitude=None, latitude=None,): self.longitude = longitude self.latitude = latitude def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.DOUBLE: self.longitude = iprot.readDouble() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.DOUBLE: self.latitude = iprot.readDouble() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Geolocation') if self.longitude is not None: oprot.writeFieldBegin('longitude', TType.DOUBLE, 1) oprot.writeDouble(self.longitude) oprot.writeFieldEnd() if self.latitude is not None: oprot.writeFieldBegin('latitude', TType.DOUBLE, 2) oprot.writeDouble(self.latitude) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class NotificationTarget(object): """ Attributes: - applicationType - applicationVersion - region """ def __init__(self, applicationType=None, applicationVersion=None, region=None,): self.applicationType = applicationType self.applicationVersion = applicationVersion self.region = region def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.applicationType = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.applicationVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.region = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('NotificationTarget') if self.applicationType is not None: oprot.writeFieldBegin('applicationType', TType.STRING, 1) oprot.writeString(self.applicationType.encode('utf-8') if sys.version_info[0] == 2 else self.applicationType) oprot.writeFieldEnd() if self.applicationVersion is not None: oprot.writeFieldBegin('applicationVersion', TType.STRING, 2) oprot.writeString(self.applicationVersion.encode('utf-8') if sys.version_info[0] == 2 else self.applicationVersion) oprot.writeFieldEnd() if self.region is not None: oprot.writeFieldBegin('region', TType.STRING, 3) oprot.writeString(self.region.encode('utf-8') if sys.version_info[0] == 2 else self.region) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class GlobalEvent(object): """ Attributes: - key - targets - createdTime - data - maxDelay """ def __init__(self, key=None, targets=None, createdTime=None, data=None, maxDelay=None,): self.key = key self.targets = targets self.createdTime = createdTime self.data = data self.maxDelay = maxDelay def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.key = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.targets = [] (_etype144, _size141) = iprot.readListBegin() for _i145 in range(_size141): _elem146 = NotificationTarget() _elem146.read(iprot) self.targets.append(_elem146) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I64: self.data = iprot.readI64() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.maxDelay = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('GlobalEvent') if self.key is not None: oprot.writeFieldBegin('key', TType.STRING, 1) oprot.writeString(self.key.encode('utf-8') if sys.version_info[0] == 2 else self.key) oprot.writeFieldEnd() if self.targets is not None: oprot.writeFieldBegin('targets', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.targets)) for iter147 in self.targets: iter147.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 3) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.data is not None: oprot.writeFieldBegin('data', TType.I64, 4) oprot.writeI64(self.data) oprot.writeFieldEnd() if self.maxDelay is not None: oprot.writeFieldBegin('maxDelay', TType.I32, 5) oprot.writeI32(self.maxDelay) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class GroupPreference(object): """ Attributes: - invitationTicket - favoriteTimestamp """ def __init__(self, invitationTicket=None, favoriteTimestamp=None,): self.invitationTicket = invitationTicket self.favoriteTimestamp = favoriteTimestamp def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.invitationTicket = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.favoriteTimestamp = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('GroupPreference') if self.invitationTicket is not None: oprot.writeFieldBegin('invitationTicket', TType.STRING, 1) oprot.writeString(self.invitationTicket.encode('utf-8') if sys.version_info[0] == 2 else self.invitationTicket) oprot.writeFieldEnd() if self.favoriteTimestamp is not None: oprot.writeFieldBegin('favoriteTimestamp', TType.I64, 2) oprot.writeI64(self.favoriteTimestamp) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Group(object): """ Attributes: - id - createdTime - name - pictureStatus - preventJoinByTicket - groupPreference - members - creator - invitee - notificationDisabled """ def __init__(self, id=None, createdTime=None, name=None, pictureStatus=None, preventJoinByTicket=None, groupPreference=None, members=None, creator=None, invitee=None, notificationDisabled=None,): self.id = id self.createdTime = createdTime self.name = name self.pictureStatus = pictureStatus self.preventJoinByTicket = preventJoinByTicket self.groupPreference = groupPreference self.members = members self.creator = creator self.invitee = invitee self.notificationDisabled = notificationDisabled def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.BOOL: self.preventJoinByTicket = iprot.readBool() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.STRUCT: self.groupPreference = GroupPreference() self.groupPreference.read(iprot) else: iprot.skip(ftype) elif fid == 20: if ftype == TType.LIST: self.members = [] (_etype151, _size148) = iprot.readListBegin() for _i152 in range(_size148): _elem153 = Contact() _elem153.read(iprot) self.members.append(_elem153) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 21: if ftype == TType.STRUCT: self.creator = Contact() self.creator.read(iprot) else: iprot.skip(ftype) elif fid == 22: if ftype == TType.LIST: self.invitee = [] (_etype157, _size154) = iprot.readListBegin() for _i158 in range(_size154): _elem159 = Contact() _elem159.read(iprot) self.invitee.append(_elem159) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 31: if ftype == TType.BOOL: self.notificationDisabled = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Group') if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 2) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 10) oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.pictureStatus is not None: oprot.writeFieldBegin('pictureStatus', TType.STRING, 11) oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus) oprot.writeFieldEnd() if self.preventJoinByTicket is not None: oprot.writeFieldBegin('preventJoinByTicket', TType.BOOL, 12) oprot.writeBool(self.preventJoinByTicket) oprot.writeFieldEnd() if self.groupPreference is not None: oprot.writeFieldBegin('groupPreference', TType.STRUCT, 13) self.groupPreference.write(oprot) oprot.writeFieldEnd() if self.members is not None: oprot.writeFieldBegin('members', TType.LIST, 20) oprot.writeListBegin(TType.STRUCT, len(self.members)) for iter160 in self.members: iter160.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.creator is not None: oprot.writeFieldBegin('creator', TType.STRUCT, 21) self.creator.write(oprot) oprot.writeFieldEnd() if self.invitee is not None: oprot.writeFieldBegin('invitee', TType.LIST, 22) oprot.writeListBegin(TType.STRUCT, len(self.invitee)) for iter161 in self.invitee: iter161.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.notificationDisabled is not None: oprot.writeFieldBegin('notificationDisabled', TType.BOOL, 31) oprot.writeBool(self.notificationDisabled) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class IdentityCredential(object): """ Attributes: - provider - identifier - password """ def __init__(self, provider=None, identifier=None, password=None,): self.provider = provider self.identifier = identifier self.password = password def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.provider = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.identifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.password = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('IdentityCredential') if self.provider is not None: oprot.writeFieldBegin('provider', TType.I32, 1) oprot.writeI32(self.provider) oprot.writeFieldEnd() if self.identifier is not None: oprot.writeFieldBegin('identifier', TType.STRING, 2) oprot.writeString(self.identifier.encode('utf-8') if sys.version_info[0] == 2 else self.identifier) oprot.writeFieldEnd() if self.password is not None: oprot.writeFieldBegin('password', TType.STRING, 3) oprot.writeString(self.password.encode('utf-8') if sys.version_info[0] == 2 else self.password) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class LastReadMessageId(object): """ Attributes: - mid - lastReadMessageId """ def __init__(self, mid=None, lastReadMessageId=None,): self.mid = mid self.lastReadMessageId = lastReadMessageId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.lastReadMessageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('LastReadMessageId') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.lastReadMessageId is not None: oprot.writeFieldBegin('lastReadMessageId', TType.STRING, 2) oprot.writeString(self.lastReadMessageId.encode('utf-8') if sys.version_info[0] == 2 else self.lastReadMessageId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class LastReadMessageIds(object): """ Attributes: - chatId - lastReadMessageIds """ def __init__(self, chatId=None, lastReadMessageIds=None,): self.chatId = chatId self.lastReadMessageIds = lastReadMessageIds def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.chatId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.lastReadMessageIds = [] (_etype165, _size162) = iprot.readListBegin() for _i166 in range(_size162): _elem167 = LastReadMessageId() _elem167.read(iprot) self.lastReadMessageIds.append(_elem167) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('LastReadMessageIds') if self.chatId is not None: oprot.writeFieldBegin('chatId', TType.STRING, 1) oprot.writeString(self.chatId.encode('utf-8') if sys.version_info[0] == 2 else self.chatId) oprot.writeFieldEnd() if self.lastReadMessageIds is not None: oprot.writeFieldBegin('lastReadMessageIds', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.lastReadMessageIds)) for iter168 in self.lastReadMessageIds: iter168.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class LoginResult(object): """ Attributes: - authToken - certificate - verifier - pinCode - type """ def __init__(self, authToken=None, certificate=None, verifier=None, pinCode=None, type=None,): self.authToken = authToken self.certificate = certificate self.verifier = verifier self.pinCode = pinCode self.type = type def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.authToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.certificate = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.verifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.pinCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('LoginResult') if self.authToken is not None: oprot.writeFieldBegin('authToken', TType.STRING, 1) oprot.writeString(self.authToken.encode('utf-8') if sys.version_info[0] == 2 else self.authToken) oprot.writeFieldEnd() if self.certificate is not None: oprot.writeFieldBegin('certificate', TType.STRING, 2) oprot.writeString(self.certificate.encode('utf-8') if sys.version_info[0] == 2 else self.certificate) oprot.writeFieldEnd() if self.verifier is not None: oprot.writeFieldBegin('verifier', TType.STRING, 3) oprot.writeString(self.verifier.encode('utf-8') if sys.version_info[0] == 2 else self.verifier) oprot.writeFieldEnd() if self.pinCode is not None: oprot.writeFieldBegin('pinCode', TType.STRING, 4) oprot.writeString(self.pinCode.encode('utf-8') if sys.version_info[0] == 2 else self.pinCode) oprot.writeFieldEnd() if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 5) oprot.writeI32(self.type) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class LoginSession(object): """ Attributes: - tokenKey - expirationTime - applicationType - systemName - accessLocation """ def __init__(self, tokenKey=None, expirationTime=None, applicationType=None, systemName=None, accessLocation=None,): self.tokenKey = tokenKey self.expirationTime = expirationTime self.applicationType = applicationType self.systemName = systemName self.accessLocation = accessLocation def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.tokenKey = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I64: self.expirationTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.I32: self.applicationType = iprot.readI32() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.systemName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 22: if ftype == TType.STRING: self.accessLocation = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('LoginSession') if self.tokenKey is not None: oprot.writeFieldBegin('tokenKey', TType.STRING, 1) oprot.writeString(self.tokenKey.encode('utf-8') if sys.version_info[0] == 2 else self.tokenKey) oprot.writeFieldEnd() if self.expirationTime is not None: oprot.writeFieldBegin('expirationTime', TType.I64, 3) oprot.writeI64(self.expirationTime) oprot.writeFieldEnd() if self.applicationType is not None: oprot.writeFieldBegin('applicationType', TType.I32, 11) oprot.writeI32(self.applicationType) oprot.writeFieldEnd() if self.systemName is not None: oprot.writeFieldBegin('systemName', TType.STRING, 12) oprot.writeString(self.systemName.encode('utf-8') if sys.version_info[0] == 2 else self.systemName) oprot.writeFieldEnd() if self.accessLocation is not None: oprot.writeFieldBegin('accessLocation', TType.STRING, 22) oprot.writeString(self.accessLocation.encode('utf-8') if sys.version_info[0] == 2 else self.accessLocation) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Message(object): """ Attributes: - from_ - to - toType - id - createdTime - deliveredTime - text - location - hasContent - contentType - contentPreview - contentMetadata """ 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,): self.from_ = from_ self.to = to self.toType = toType self.id = id self.createdTime = createdTime self.deliveredTime = deliveredTime self.text = text self.location = location self.hasContent = hasContent self.contentType = contentType self.contentPreview = contentPreview self.contentMetadata = contentMetadata def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.from_ = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.to = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.toType = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.I64: self.deliveredTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: self.text = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRUCT: self.location = Location() self.location.read(iprot) else: iprot.skip(ftype) elif fid == 14: if ftype == TType.BOOL: self.hasContent = iprot.readBool() else: iprot.skip(ftype) elif fid == 15: if ftype == TType.I32: self.contentType = iprot.readI32() else: iprot.skip(ftype) elif fid == 17: if ftype == TType.STRING: self.contentPreview = iprot.readBinary() else: iprot.skip(ftype) elif fid == 18: if ftype == TType.MAP: self.contentMetadata = {} (_ktype170, _vtype171, _size169) = iprot.readMapBegin() for _i173 in range(_size169): _key174 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val175 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.contentMetadata[_key174] = _val175 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Message') if self.from_ is not None: oprot.writeFieldBegin('from_', TType.STRING, 1) oprot.writeString(self.from_.encode('utf-8') if sys.version_info[0] == 2 else self.from_) oprot.writeFieldEnd() if self.to is not None: oprot.writeFieldBegin('to', TType.STRING, 2) oprot.writeString(self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to) oprot.writeFieldEnd() if self.toType is not None: oprot.writeFieldBegin('toType', TType.I32, 3) oprot.writeI32(self.toType) oprot.writeFieldEnd() if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 4) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 5) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.deliveredTime is not None: oprot.writeFieldBegin('deliveredTime', TType.I64, 6) oprot.writeI64(self.deliveredTime) oprot.writeFieldEnd() if self.text is not None: oprot.writeFieldBegin('text', TType.STRING, 10) oprot.writeString(self.text.encode('utf-8') if sys.version_info[0] == 2 else self.text) oprot.writeFieldEnd() if self.location is not None: oprot.writeFieldBegin('location', TType.STRUCT, 11) self.location.write(oprot) oprot.writeFieldEnd() if self.hasContent is not None: oprot.writeFieldBegin('hasContent', TType.BOOL, 14) oprot.writeBool(self.hasContent) oprot.writeFieldEnd() if self.contentType is not None: oprot.writeFieldBegin('contentType', TType.I32, 15) oprot.writeI32(self.contentType) oprot.writeFieldEnd() if self.contentPreview is not None: oprot.writeFieldBegin('contentPreview', TType.STRING, 17) oprot.writeBinary(self.contentPreview) oprot.writeFieldEnd() if self.contentMetadata is not None: oprot.writeFieldBegin('contentMetadata', TType.MAP, 18) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.contentMetadata)) for kiter176, viter177 in self.contentMetadata.items(): oprot.writeString(kiter176.encode('utf-8') if sys.version_info[0] == 2 else kiter176) oprot.writeString(viter177.encode('utf-8') if sys.version_info[0] == 2 else viter177) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class MessageOperation(object): """ Attributes: - revision - createdTime - type - reqSeq - status - param1 - param2 - param3 - message """ def __init__(self, revision=None, createdTime=None, type=None, reqSeq=None, status=None, param1=None, param2=None, param3=None, message=None,): self.revision = revision self.createdTime = createdTime self.type = type self.reqSeq = reqSeq self.status = status self.param1 = param1 self.param2 = param2 self.param3 = param3 self.message = message def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I64: self.revision = iprot.readI64() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.status = iprot.readI32() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: self.param1 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.param2 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.param3 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 20: if ftype == TType.STRUCT: self.message = Message() self.message.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('MessageOperation') if self.revision is not None: oprot.writeFieldBegin('revision', TType.I64, 1) oprot.writeI64(self.revision) oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 2) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 3) oprot.writeI32(self.type) oprot.writeFieldEnd() if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 4) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.status is not None: oprot.writeFieldBegin('status', TType.I32, 5) oprot.writeI32(self.status) oprot.writeFieldEnd() if self.param1 is not None: oprot.writeFieldBegin('param1', TType.STRING, 10) oprot.writeString(self.param1.encode('utf-8') if sys.version_info[0] == 2 else self.param1) oprot.writeFieldEnd() if self.param2 is not None: oprot.writeFieldBegin('param2', TType.STRING, 11) oprot.writeString(self.param2.encode('utf-8') if sys.version_info[0] == 2 else self.param2) oprot.writeFieldEnd() if self.param3 is not None: oprot.writeFieldBegin('param3', TType.STRING, 12) oprot.writeString(self.param3.encode('utf-8') if sys.version_info[0] == 2 else self.param3) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRUCT, 20) self.message.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class MessageOperations(object): """ Attributes: - operations - endFlag """ def __init__(self, operations=None, endFlag=None,): self.operations = operations self.endFlag = endFlag def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.LIST: self.operations = [] (_etype181, _size178) = iprot.readListBegin() for _i182 in range(_size178): _elem183 = MessageOperation() _elem183.read(iprot) self.operations.append(_elem183) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.BOOL: self.endFlag = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('MessageOperations') if self.operations is not None: oprot.writeFieldBegin('operations', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.operations)) for iter184 in self.operations: iter184.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.endFlag is not None: oprot.writeFieldBegin('endFlag', TType.BOOL, 2) oprot.writeBool(self.endFlag) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class MetaProfile(object): """ Attributes: - createTime - regionCode - identities """ def __init__(self, createTime=None, regionCode=None, identities=None,): self.createTime = createTime self.regionCode = regionCode self.identities = identities def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I64: self.createTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.regionCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.MAP: self.identities = {} (_ktype186, _vtype187, _size185) = iprot.readMapBegin() for _i189 in range(_size185): _key190 = iprot.readI32() _val191 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.identities[_key190] = _val191 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('MetaProfile') if self.createTime is not None: oprot.writeFieldBegin('createTime', TType.I64, 1) oprot.writeI64(self.createTime) oprot.writeFieldEnd() if self.regionCode is not None: oprot.writeFieldBegin('regionCode', TType.STRING, 2) oprot.writeString(self.regionCode.encode('utf-8') if sys.version_info[0] == 2 else self.regionCode) oprot.writeFieldEnd() if self.identities is not None: oprot.writeFieldBegin('identities', TType.MAP, 3) oprot.writeMapBegin(TType.I32, TType.STRING, len(self.identities)) for kiter192, viter193 in self.identities.items(): oprot.writeI32(kiter192) oprot.writeString(viter193.encode('utf-8') if sys.version_info[0] == 2 else viter193) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class NotificationItem(object): """ Attributes: - id - from_ - to - fromChannel - toChannel - revision - createdTime - content """ def __init__(self, id=None, from_=None, to=None, fromChannel=None, toChannel=None, revision=None, createdTime=None, content=None,): self.id = id self.from_ = from_ self.to = to self.fromChannel = fromChannel self.toChannel = toChannel self.revision = revision self.createdTime = createdTime self.content = content def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.from_ = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.to = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.fromChannel = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.toChannel = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.I64: self.revision = iprot.readI64() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.MAP: self.content = {} (_ktype195, _vtype196, _size194) = iprot.readMapBegin() for _i198 in range(_size194): _key199 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val200 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.content[_key199] = _val200 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('NotificationItem') if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() if self.from_ is not None: oprot.writeFieldBegin('from_', TType.STRING, 2) oprot.writeString(self.from_.encode('utf-8') if sys.version_info[0] == 2 else self.from_) oprot.writeFieldEnd() if self.to is not None: oprot.writeFieldBegin('to', TType.STRING, 3) oprot.writeString(self.to.encode('utf-8') if sys.version_info[0] == 2 else self.to) oprot.writeFieldEnd() if self.fromChannel is not None: oprot.writeFieldBegin('fromChannel', TType.STRING, 4) oprot.writeString(self.fromChannel.encode('utf-8') if sys.version_info[0] == 2 else self.fromChannel) oprot.writeFieldEnd() if self.toChannel is not None: oprot.writeFieldBegin('toChannel', TType.STRING, 5) oprot.writeString(self.toChannel.encode('utf-8') if sys.version_info[0] == 2 else self.toChannel) oprot.writeFieldEnd() if self.revision is not None: oprot.writeFieldBegin('revision', TType.I64, 7) oprot.writeI64(self.revision) oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 8) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.content is not None: oprot.writeFieldBegin('content', TType.MAP, 9) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.content)) for kiter201, viter202 in self.content.items(): oprot.writeString(kiter201.encode('utf-8') if sys.version_info[0] == 2 else kiter201) oprot.writeString(viter202.encode('utf-8') if sys.version_info[0] == 2 else viter202) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class NotificationFetchResult(object): """ Attributes: - fetchMode - itemList """ def __init__(self, fetchMode=None, itemList=None,): self.fetchMode = fetchMode self.itemList = itemList def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.fetchMode = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.itemList = [] (_etype206, _size203) = iprot.readListBegin() for _i207 in range(_size203): _elem208 = NotificationItem() _elem208.read(iprot) self.itemList.append(_elem208) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('NotificationFetchResult') if self.fetchMode is not None: oprot.writeFieldBegin('fetchMode', TType.I32, 1) oprot.writeI32(self.fetchMode) oprot.writeFieldEnd() if self.itemList is not None: oprot.writeFieldBegin('itemList', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.itemList)) for iter209 in self.itemList: iter209.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Operation(object): """ Attributes: - revision - createdTime - type - reqSeq - checksum - status - param1 - param2 - param3 - message """ def __init__(self, revision=None, createdTime=None, type=None, reqSeq=None, checksum=None, status=None, param1=None, param2=None, param3=None, message=None,): self.revision = revision self.createdTime = createdTime self.type = type self.reqSeq = reqSeq self.checksum = checksum self.status = status self.param1 = param1 self.param2 = param2 self.param3 = param3 self.message = message def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I64: self.revision = iprot.readI64() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.reqSeq = iprot.readI32() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.checksum = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.I32: self.status = iprot.readI32() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: self.param1 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.param2 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.param3 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 20: if ftype == TType.STRUCT: self.message = Message() self.message.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Operation') if self.revision is not None: oprot.writeFieldBegin('revision', TType.I64, 1) oprot.writeI64(self.revision) oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 2) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 3) oprot.writeI32(self.type) oprot.writeFieldEnd() if self.reqSeq is not None: oprot.writeFieldBegin('reqSeq', TType.I32, 4) oprot.writeI32(self.reqSeq) oprot.writeFieldEnd() if self.checksum is not None: oprot.writeFieldBegin('checksum', TType.STRING, 5) oprot.writeString(self.checksum.encode('utf-8') if sys.version_info[0] == 2 else self.checksum) oprot.writeFieldEnd() if self.status is not None: oprot.writeFieldBegin('status', TType.I32, 7) oprot.writeI32(self.status) oprot.writeFieldEnd() if self.param1 is not None: oprot.writeFieldBegin('param1', TType.STRING, 10) oprot.writeString(self.param1.encode('utf-8') if sys.version_info[0] == 2 else self.param1) oprot.writeFieldEnd() if self.param2 is not None: oprot.writeFieldBegin('param2', TType.STRING, 11) oprot.writeString(self.param2.encode('utf-8') if sys.version_info[0] == 2 else self.param2) oprot.writeFieldEnd() if self.param3 is not None: oprot.writeFieldBegin('param3', TType.STRING, 12) oprot.writeString(self.param3.encode('utf-8') if sys.version_info[0] == 2 else self.param3) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRUCT, 20) self.message.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class PaymentReservation(object): """ Attributes: - receiverMid - productId - language - location - currency - price - appStoreCode - messageText - messageTemplate - packageId """ def __init__(self, receiverMid=None, productId=None, language=None, location=None, currency=None, price=None, appStoreCode=None, messageText=None, messageTemplate=None, packageId=None,): self.receiverMid = receiverMid self.productId = productId self.language = language self.location = location self.currency = currency self.price = price self.appStoreCode = appStoreCode self.messageText = messageText self.messageTemplate = messageTemplate self.packageId = packageId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.receiverMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.productId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.language = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.location = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.currency = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.price = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.I32: self.appStoreCode = iprot.readI32() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.messageText = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.I32: self.messageTemplate = iprot.readI32() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.I64: self.packageId = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('PaymentReservation') if self.receiverMid is not None: oprot.writeFieldBegin('receiverMid', TType.STRING, 1) oprot.writeString(self.receiverMid.encode('utf-8') if sys.version_info[0] == 2 else self.receiverMid) oprot.writeFieldEnd() if self.productId is not None: oprot.writeFieldBegin('productId', TType.STRING, 2) oprot.writeString(self.productId.encode('utf-8') if sys.version_info[0] == 2 else self.productId) oprot.writeFieldEnd() if self.language is not None: oprot.writeFieldBegin('language', TType.STRING, 3) oprot.writeString(self.language.encode('utf-8') if sys.version_info[0] == 2 else self.language) oprot.writeFieldEnd() if self.location is not None: oprot.writeFieldBegin('location', TType.STRING, 4) oprot.writeString(self.location.encode('utf-8') if sys.version_info[0] == 2 else self.location) oprot.writeFieldEnd() if self.currency is not None: oprot.writeFieldBegin('currency', TType.STRING, 5) oprot.writeString(self.currency.encode('utf-8') if sys.version_info[0] == 2 else self.currency) oprot.writeFieldEnd() if self.price is not None: oprot.writeFieldBegin('price', TType.STRING, 6) oprot.writeString(self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price) oprot.writeFieldEnd() if self.appStoreCode is not None: oprot.writeFieldBegin('appStoreCode', TType.I32, 7) oprot.writeI32(self.appStoreCode) oprot.writeFieldEnd() if self.messageText is not None: oprot.writeFieldBegin('messageText', TType.STRING, 8) oprot.writeString(self.messageText.encode('utf-8') if sys.version_info[0] == 2 else self.messageText) oprot.writeFieldEnd() if self.messageTemplate is not None: oprot.writeFieldBegin('messageTemplate', TType.I32, 9) oprot.writeI32(self.messageTemplate) oprot.writeFieldEnd() if self.packageId is not None: oprot.writeFieldBegin('packageId', TType.I64, 10) oprot.writeI64(self.packageId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class PaymentReservationResult(object): """ Attributes: - orderId - confirmUrl - extras """ def __init__(self, orderId=None, confirmUrl=None, extras=None,): self.orderId = orderId self.confirmUrl = confirmUrl self.extras = extras def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.orderId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.confirmUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.MAP: self.extras = {} (_ktype211, _vtype212, _size210) = iprot.readMapBegin() for _i214 in range(_size210): _key215 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val216 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.extras[_key215] = _val216 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('PaymentReservationResult') if self.orderId is not None: oprot.writeFieldBegin('orderId', TType.STRING, 1) oprot.writeString(self.orderId.encode('utf-8') if sys.version_info[0] == 2 else self.orderId) oprot.writeFieldEnd() if self.confirmUrl is not None: oprot.writeFieldBegin('confirmUrl', TType.STRING, 2) oprot.writeString(self.confirmUrl.encode('utf-8') if sys.version_info[0] == 2 else self.confirmUrl) oprot.writeFieldEnd() if self.extras is not None: oprot.writeFieldBegin('extras', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extras)) for kiter217, viter218 in self.extras.items(): oprot.writeString(kiter217.encode('utf-8') if sys.version_info[0] == 2 else kiter217) oprot.writeString(viter218.encode('utf-8') if sys.version_info[0] == 2 else viter218) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Product(object): """ Attributes: - productId - packageId - version - authorName - onSale - validDays - saleType - copyright - title - descriptionText - shopOrderId - fromMid - toMid - validUntil - priceTier - price - currency - currencySymbol - paymentType - createDate - ownFlag - eventType - urlSchema - downloadUrl - buddyMid - publishSince - newFlag - missionFlag """ def __init__(self, productId=None, packageId=None, version=None, authorName=None, onSale=None, validDays=None, saleType=None, copyright=None, title=None, descriptionText=None, shopOrderId=None, fromMid=None, toMid=None, validUntil=None, priceTier=None, price=None, currency=None, currencySymbol=None, paymentType=None, createDate=None, ownFlag=None, eventType=None, urlSchema=None, downloadUrl=None, buddyMid=None, publishSince=None, newFlag=None, missionFlag=None,): self.productId = productId self.packageId = packageId self.version = version self.authorName = authorName self.onSale = onSale self.validDays = validDays self.saleType = saleType self.copyright = copyright self.title = title self.descriptionText = descriptionText self.shopOrderId = shopOrderId self.fromMid = fromMid self.toMid = toMid self.validUntil = validUntil self.priceTier = priceTier self.price = price self.currency = currency self.currencySymbol = currencySymbol self.paymentType = paymentType self.createDate = createDate self.ownFlag = ownFlag self.eventType = eventType self.urlSchema = urlSchema self.downloadUrl = downloadUrl self.buddyMid = buddyMid self.publishSince = publishSince self.newFlag = newFlag self.missionFlag = missionFlag def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.productId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.packageId = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.version = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.authorName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.BOOL: self.onSale = iprot.readBool() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.I32: self.validDays = iprot.readI32() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.I32: self.saleType = iprot.readI32() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.copyright = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.STRING: self.title = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: self.descriptionText = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.I64: self.shopOrderId = iprot.readI64() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.fromMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.STRING: self.toMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 14: if ftype == TType.I64: self.validUntil = iprot.readI64() else: iprot.skip(ftype) elif fid == 15: if ftype == TType.I32: self.priceTier = iprot.readI32() else: iprot.skip(ftype) elif fid == 16: if ftype == TType.STRING: self.price = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 17: if ftype == TType.STRING: self.currency = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 18: if ftype == TType.STRING: self.currencySymbol = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 19: if ftype == TType.I32: self.paymentType = iprot.readI32() else: iprot.skip(ftype) elif fid == 20: if ftype == TType.I64: self.createDate = iprot.readI64() else: iprot.skip(ftype) elif fid == 21: if ftype == TType.BOOL: self.ownFlag = iprot.readBool() else: iprot.skip(ftype) elif fid == 22: if ftype == TType.I32: self.eventType = iprot.readI32() else: iprot.skip(ftype) elif fid == 23: if ftype == TType.STRING: self.urlSchema = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 24: if ftype == TType.STRING: self.downloadUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 25: if ftype == TType.STRING: self.buddyMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 26: if ftype == TType.I64: self.publishSince = iprot.readI64() else: iprot.skip(ftype) elif fid == 27: if ftype == TType.BOOL: self.newFlag = iprot.readBool() else: iprot.skip(ftype) elif fid == 28: if ftype == TType.BOOL: self.missionFlag = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Product') if self.productId is not None: oprot.writeFieldBegin('productId', TType.STRING, 1) oprot.writeString(self.productId.encode('utf-8') if sys.version_info[0] == 2 else self.productId) oprot.writeFieldEnd() if self.packageId is not None: oprot.writeFieldBegin('packageId', TType.I64, 2) oprot.writeI64(self.packageId) oprot.writeFieldEnd() if self.version is not None: oprot.writeFieldBegin('version', TType.I32, 3) oprot.writeI32(self.version) oprot.writeFieldEnd() if self.authorName is not None: oprot.writeFieldBegin('authorName', TType.STRING, 4) oprot.writeString(self.authorName.encode('utf-8') if sys.version_info[0] == 2 else self.authorName) oprot.writeFieldEnd() if self.onSale is not None: oprot.writeFieldBegin('onSale', TType.BOOL, 5) oprot.writeBool(self.onSale) oprot.writeFieldEnd() if self.validDays is not None: oprot.writeFieldBegin('validDays', TType.I32, 6) oprot.writeI32(self.validDays) oprot.writeFieldEnd() if self.saleType is not None: oprot.writeFieldBegin('saleType', TType.I32, 7) oprot.writeI32(self.saleType) oprot.writeFieldEnd() if self.copyright is not None: oprot.writeFieldBegin('copyright', TType.STRING, 8) oprot.writeString(self.copyright.encode('utf-8') if sys.version_info[0] == 2 else self.copyright) oprot.writeFieldEnd() if self.title is not None: oprot.writeFieldBegin('title', TType.STRING, 9) oprot.writeString(self.title.encode('utf-8') if sys.version_info[0] == 2 else self.title) oprot.writeFieldEnd() if self.descriptionText is not None: oprot.writeFieldBegin('descriptionText', TType.STRING, 10) oprot.writeString(self.descriptionText.encode('utf-8') if sys.version_info[0] == 2 else self.descriptionText) oprot.writeFieldEnd() if self.shopOrderId is not None: oprot.writeFieldBegin('shopOrderId', TType.I64, 11) oprot.writeI64(self.shopOrderId) oprot.writeFieldEnd() if self.fromMid is not None: oprot.writeFieldBegin('fromMid', TType.STRING, 12) oprot.writeString(self.fromMid.encode('utf-8') if sys.version_info[0] == 2 else self.fromMid) oprot.writeFieldEnd() if self.toMid is not None: oprot.writeFieldBegin('toMid', TType.STRING, 13) oprot.writeString(self.toMid.encode('utf-8') if sys.version_info[0] == 2 else self.toMid) oprot.writeFieldEnd() if self.validUntil is not None: oprot.writeFieldBegin('validUntil', TType.I64, 14) oprot.writeI64(self.validUntil) oprot.writeFieldEnd() if self.priceTier is not None: oprot.writeFieldBegin('priceTier', TType.I32, 15) oprot.writeI32(self.priceTier) oprot.writeFieldEnd() if self.price is not None: oprot.writeFieldBegin('price', TType.STRING, 16) oprot.writeString(self.price.encode('utf-8') if sys.version_info[0] == 2 else self.price) oprot.writeFieldEnd() if self.currency is not None: oprot.writeFieldBegin('currency', TType.STRING, 17) oprot.writeString(self.currency.encode('utf-8') if sys.version_info[0] == 2 else self.currency) oprot.writeFieldEnd() if self.currencySymbol is not None: oprot.writeFieldBegin('currencySymbol', TType.STRING, 18) oprot.writeString(self.currencySymbol.encode('utf-8') if sys.version_info[0] == 2 else self.currencySymbol) oprot.writeFieldEnd() if self.paymentType is not None: oprot.writeFieldBegin('paymentType', TType.I32, 19) oprot.writeI32(self.paymentType) oprot.writeFieldEnd() if self.createDate is not None: oprot.writeFieldBegin('createDate', TType.I64, 20) oprot.writeI64(self.createDate) oprot.writeFieldEnd() if self.ownFlag is not None: oprot.writeFieldBegin('ownFlag', TType.BOOL, 21) oprot.writeBool(self.ownFlag) oprot.writeFieldEnd() if self.eventType is not None: oprot.writeFieldBegin('eventType', TType.I32, 22) oprot.writeI32(self.eventType) oprot.writeFieldEnd() if self.urlSchema is not None: oprot.writeFieldBegin('urlSchema', TType.STRING, 23) oprot.writeString(self.urlSchema.encode('utf-8') if sys.version_info[0] == 2 else self.urlSchema) oprot.writeFieldEnd() if self.downloadUrl is not None: oprot.writeFieldBegin('downloadUrl', TType.STRING, 24) oprot.writeString(self.downloadUrl.encode('utf-8') if sys.version_info[0] == 2 else self.downloadUrl) oprot.writeFieldEnd() if self.buddyMid is not None: oprot.writeFieldBegin('buddyMid', TType.STRING, 25) oprot.writeString(self.buddyMid.encode('utf-8') if sys.version_info[0] == 2 else self.buddyMid) oprot.writeFieldEnd() if self.publishSince is not None: oprot.writeFieldBegin('publishSince', TType.I64, 26) oprot.writeI64(self.publishSince) oprot.writeFieldEnd() if self.newFlag is not None: oprot.writeFieldBegin('newFlag', TType.BOOL, 27) oprot.writeBool(self.newFlag) oprot.writeFieldEnd() if self.missionFlag is not None: oprot.writeFieldBegin('missionFlag', TType.BOOL, 28) oprot.writeBool(self.missionFlag) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ProductList(object): """ Attributes: - hasNext - bannerSequence - bannerTargetType - bannerTargetPath - productList - bannerLang """ def __init__(self, hasNext=None, bannerSequence=None, bannerTargetType=None, bannerTargetPath=None, productList=None, bannerLang=None,): self.hasNext = hasNext self.bannerSequence = bannerSequence self.bannerTargetType = bannerTargetType self.bannerTargetPath = bannerTargetPath self.productList = productList self.bannerLang = bannerLang def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.BOOL: self.hasNext = iprot.readBool() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I64: self.bannerSequence = iprot.readI64() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I32: self.bannerTargetType = iprot.readI32() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.bannerTargetPath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.LIST: self.productList = [] (_etype222, _size219) = iprot.readListBegin() for _i223 in range(_size219): _elem224 = Product() _elem224.read(iprot) self.productList.append(_elem224) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.STRING: self.bannerLang = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ProductList') if self.hasNext is not None: oprot.writeFieldBegin('hasNext', TType.BOOL, 1) oprot.writeBool(self.hasNext) oprot.writeFieldEnd() if self.bannerSequence is not None: oprot.writeFieldBegin('bannerSequence', TType.I64, 4) oprot.writeI64(self.bannerSequence) oprot.writeFieldEnd() if self.bannerTargetType is not None: oprot.writeFieldBegin('bannerTargetType', TType.I32, 5) oprot.writeI32(self.bannerTargetType) oprot.writeFieldEnd() if self.bannerTargetPath is not None: oprot.writeFieldBegin('bannerTargetPath', TType.STRING, 6) oprot.writeString(self.bannerTargetPath.encode('utf-8') if sys.version_info[0] == 2 else self.bannerTargetPath) oprot.writeFieldEnd() if self.productList is not None: oprot.writeFieldBegin('productList', TType.LIST, 7) oprot.writeListBegin(TType.STRUCT, len(self.productList)) for iter225 in self.productList: iter225.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.bannerLang is not None: oprot.writeFieldBegin('bannerLang', TType.STRING, 8) oprot.writeString(self.bannerLang.encode('utf-8') if sys.version_info[0] == 2 else self.bannerLang) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ProductSimple(object): """ Attributes: - productId - packageId - version - onSale - validUntil """ def __init__(self, productId=None, packageId=None, version=None, onSale=None, validUntil=None,): self.productId = productId self.packageId = packageId self.version = version self.onSale = onSale self.validUntil = validUntil def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.productId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.packageId = iprot.readI64() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.version = iprot.readI32() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.BOOL: self.onSale = iprot.readBool() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I64: self.validUntil = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ProductSimple') if self.productId is not None: oprot.writeFieldBegin('productId', TType.STRING, 1) oprot.writeString(self.productId.encode('utf-8') if sys.version_info[0] == 2 else self.productId) oprot.writeFieldEnd() if self.packageId is not None: oprot.writeFieldBegin('packageId', TType.I64, 2) oprot.writeI64(self.packageId) oprot.writeFieldEnd() if self.version is not None: oprot.writeFieldBegin('version', TType.I32, 3) oprot.writeI32(self.version) oprot.writeFieldEnd() if self.onSale is not None: oprot.writeFieldBegin('onSale', TType.BOOL, 4) oprot.writeBool(self.onSale) oprot.writeFieldEnd() if self.validUntil is not None: oprot.writeFieldBegin('validUntil', TType.I64, 5) oprot.writeI64(self.validUntil) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ProductSimpleList(object): """ Attributes: - hasNext - reinvokeHour - lastVersionSeq - productList - recentNewReleaseDate - recentEventReleaseDate """ def __init__(self, hasNext=None, reinvokeHour=None, lastVersionSeq=None, productList=None, recentNewReleaseDate=None, recentEventReleaseDate=None,): self.hasNext = hasNext self.reinvokeHour = reinvokeHour self.lastVersionSeq = lastVersionSeq self.productList = productList self.recentNewReleaseDate = recentNewReleaseDate self.recentEventReleaseDate = recentEventReleaseDate def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.BOOL: self.hasNext = iprot.readBool() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.reinvokeHour = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I64: self.lastVersionSeq = iprot.readI64() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.LIST: self.productList = [] (_etype229, _size226) = iprot.readListBegin() for _i230 in range(_size226): _elem231 = ProductSimple() _elem231.read(iprot) self.productList.append(_elem231) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I64: self.recentNewReleaseDate = iprot.readI64() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.I64: self.recentEventReleaseDate = iprot.readI64() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ProductSimpleList') if self.hasNext is not None: oprot.writeFieldBegin('hasNext', TType.BOOL, 1) oprot.writeBool(self.hasNext) oprot.writeFieldEnd() if self.reinvokeHour is not None: oprot.writeFieldBegin('reinvokeHour', TType.I32, 2) oprot.writeI32(self.reinvokeHour) oprot.writeFieldEnd() if self.lastVersionSeq is not None: oprot.writeFieldBegin('lastVersionSeq', TType.I64, 3) oprot.writeI64(self.lastVersionSeq) oprot.writeFieldEnd() if self.productList is not None: oprot.writeFieldBegin('productList', TType.LIST, 4) oprot.writeListBegin(TType.STRUCT, len(self.productList)) for iter232 in self.productList: iter232.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.recentNewReleaseDate is not None: oprot.writeFieldBegin('recentNewReleaseDate', TType.I64, 5) oprot.writeI64(self.recentNewReleaseDate) oprot.writeFieldEnd() if self.recentEventReleaseDate is not None: oprot.writeFieldBegin('recentEventReleaseDate', TType.I64, 6) oprot.writeI64(self.recentEventReleaseDate) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Profile(object): """ Attributes: - mid - userid - phone - email - regionCode - displayName - phoneticName - pictureStatus - thumbnailUrl - statusMessage - allowSearchByUserid - allowSearchByEmail - picturePath """ def __init__(self, mid=None, userid=None, phone=None, email=None, regionCode=None, displayName=None, phoneticName=None, pictureStatus=None, thumbnailUrl=None, statusMessage=None, allowSearchByUserid=None, allowSearchByEmail=None, picturePath=None,): self.mid = mid self.userid = userid self.phone = phone self.email = email self.regionCode = regionCode self.displayName = displayName self.phoneticName = phoneticName self.pictureStatus = pictureStatus self.thumbnailUrl = thumbnailUrl self.statusMessage = statusMessage self.allowSearchByUserid = allowSearchByUserid self.allowSearchByEmail = allowSearchByEmail self.picturePath = picturePath def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.userid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: self.phone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.email = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.regionCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 20: if ftype == TType.STRING: self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 21: if ftype == TType.STRING: self.phoneticName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 22: if ftype == TType.STRING: self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 23: if ftype == TType.STRING: self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 24: if ftype == TType.STRING: self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 31: if ftype == TType.BOOL: self.allowSearchByUserid = iprot.readBool() else: iprot.skip(ftype) elif fid == 32: if ftype == TType.BOOL: self.allowSearchByEmail = iprot.readBool() else: iprot.skip(ftype) elif fid == 33: if ftype == TType.STRING: self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Profile') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.userid is not None: oprot.writeFieldBegin('userid', TType.STRING, 3) oprot.writeString(self.userid.encode('utf-8') if sys.version_info[0] == 2 else self.userid) oprot.writeFieldEnd() if self.phone is not None: oprot.writeFieldBegin('phone', TType.STRING, 10) oprot.writeString(self.phone.encode('utf-8') if sys.version_info[0] == 2 else self.phone) oprot.writeFieldEnd() if self.email is not None: oprot.writeFieldBegin('email', TType.STRING, 11) oprot.writeString(self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email) oprot.writeFieldEnd() if self.regionCode is not None: oprot.writeFieldBegin('regionCode', TType.STRING, 12) oprot.writeString(self.regionCode.encode('utf-8') if sys.version_info[0] == 2 else self.regionCode) oprot.writeFieldEnd() if self.displayName is not None: oprot.writeFieldBegin('displayName', TType.STRING, 20) oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName) oprot.writeFieldEnd() if self.phoneticName is not None: oprot.writeFieldBegin('phoneticName', TType.STRING, 21) oprot.writeString(self.phoneticName.encode('utf-8') if sys.version_info[0] == 2 else self.phoneticName) oprot.writeFieldEnd() if self.pictureStatus is not None: oprot.writeFieldBegin('pictureStatus', TType.STRING, 22) oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus) oprot.writeFieldEnd() if self.thumbnailUrl is not None: oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 23) oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl) oprot.writeFieldEnd() if self.statusMessage is not None: oprot.writeFieldBegin('statusMessage', TType.STRING, 24) oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage) oprot.writeFieldEnd() if self.allowSearchByUserid is not None: oprot.writeFieldBegin('allowSearchByUserid', TType.BOOL, 31) oprot.writeBool(self.allowSearchByUserid) oprot.writeFieldEnd() if self.allowSearchByEmail is not None: oprot.writeFieldBegin('allowSearchByEmail', TType.BOOL, 32) oprot.writeBool(self.allowSearchByEmail) oprot.writeFieldEnd() if self.picturePath is not None: oprot.writeFieldBegin('picturePath', TType.STRING, 33) oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class ProximityMatchCandidateResult(object): """ Attributes: - users - buddies """ def __init__(self, users=None, buddies=None,): self.users = users self.buddies = buddies def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.LIST: self.users = [] (_etype236, _size233) = iprot.readListBegin() for _i237 in range(_size233): _elem238 = Contact() _elem238.read(iprot) self.users.append(_elem238) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.buddies = [] (_etype242, _size239) = iprot.readListBegin() for _i243 in range(_size239): _elem244 = Contact() _elem244.read(iprot) self.buddies.append(_elem244) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('ProximityMatchCandidateResult') if self.users is not None: oprot.writeFieldBegin('users', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.users)) for iter245 in self.users: iter245.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.buddies is not None: oprot.writeFieldBegin('buddies', TType.LIST, 2) oprot.writeListBegin(TType.STRUCT, len(self.buddies)) for iter246 in self.buddies: iter246.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class RegisterWithSnsIdResult(object): """ Attributes: - authToken - userCreated """ def __init__(self, authToken=None, userCreated=None,): self.authToken = authToken self.userCreated = userCreated def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.authToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.BOOL: self.userCreated = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('RegisterWithSnsIdResult') if self.authToken is not None: oprot.writeFieldBegin('authToken', TType.STRING, 1) oprot.writeString(self.authToken.encode('utf-8') if sys.version_info[0] == 2 else self.authToken) oprot.writeFieldEnd() if self.userCreated is not None: oprot.writeFieldBegin('userCreated', TType.BOOL, 2) oprot.writeBool(self.userCreated) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class RequestTokenResponse(object): """ Attributes: - requestToken - returnUrl """ def __init__(self, requestToken=None, returnUrl=None,): self.requestToken = requestToken self.returnUrl = returnUrl def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.requestToken = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.returnUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('RequestTokenResponse') if self.requestToken is not None: oprot.writeFieldBegin('requestToken', TType.STRING, 1) oprot.writeString(self.requestToken.encode('utf-8') if sys.version_info[0] == 2 else self.requestToken) oprot.writeFieldEnd() if self.returnUrl is not None: oprot.writeFieldBegin('returnUrl', TType.STRING, 2) oprot.writeString(self.returnUrl.encode('utf-8') if sys.version_info[0] == 2 else self.returnUrl) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Room(object): """ Attributes: - mid - createdTime - contacts - notificationDisabled """ def __init__(self, mid=None, createdTime=None, contacts=None, notificationDisabled=None,): self.mid = mid self.createdTime = createdTime self.contacts = contacts self.notificationDisabled = notificationDisabled def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I64: self.createdTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.LIST: self.contacts = [] (_etype250, _size247) = iprot.readListBegin() for _i251 in range(_size247): _elem252 = Contact() _elem252.read(iprot) self.contacts.append(_elem252) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 31: if ftype == TType.BOOL: self.notificationDisabled = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Room') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.createdTime is not None: oprot.writeFieldBegin('createdTime', TType.I64, 2) oprot.writeI64(self.createdTime) oprot.writeFieldEnd() if self.contacts is not None: oprot.writeFieldBegin('contacts', TType.LIST, 10) oprot.writeListBegin(TType.STRUCT, len(self.contacts)) for iter253 in self.contacts: iter253.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.notificationDisabled is not None: oprot.writeFieldBegin('notificationDisabled', TType.BOOL, 31) oprot.writeBool(self.notificationDisabled) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class RSAKey(object): """ Attributes: - keynm - nvalue - evalue - sessionKey """ def __init__(self, keynm=None, nvalue=None, evalue=None, sessionKey=None,): self.keynm = keynm self.nvalue = nvalue self.evalue = evalue self.sessionKey = sessionKey def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.keynm = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.nvalue = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.evalue = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.sessionKey = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('RSAKey') if self.keynm is not None: oprot.writeFieldBegin('keynm', TType.STRING, 1) oprot.writeString(self.keynm.encode('utf-8') if sys.version_info[0] == 2 else self.keynm) oprot.writeFieldEnd() if self.nvalue is not None: oprot.writeFieldBegin('nvalue', TType.STRING, 2) oprot.writeString(self.nvalue.encode('utf-8') if sys.version_info[0] == 2 else self.nvalue) oprot.writeFieldEnd() if self.evalue is not None: oprot.writeFieldBegin('evalue', TType.STRING, 3) oprot.writeString(self.evalue.encode('utf-8') if sys.version_info[0] == 2 else self.evalue) oprot.writeFieldEnd() if self.sessionKey is not None: oprot.writeFieldBegin('sessionKey', TType.STRING, 4) oprot.writeString(self.sessionKey.encode('utf-8') if sys.version_info[0] == 2 else self.sessionKey) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SendBuddyMessageResult(object): """ Attributes: - requestId - state - messageId - eventNo - receiverCount - successCount - failCount - cancelCount - blockCount - unregisterCount - timestamp - message """ def __init__(self, requestId=None, state=None, messageId=None, eventNo=None, receiverCount=None, successCount=None, failCount=None, cancelCount=None, blockCount=None, unregisterCount=None, timestamp=None, message=None,): self.requestId = requestId self.state = state self.messageId = messageId self.eventNo = eventNo self.receiverCount = receiverCount self.successCount = successCount self.failCount = failCount self.cancelCount = cancelCount self.blockCount = blockCount self.unregisterCount = unregisterCount self.timestamp = timestamp self.message = message def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.requestId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.state = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.messageId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.I32: self.eventNo = iprot.readI32() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.I64: self.receiverCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.I64: self.successCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.I64: self.failCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 14: if ftype == TType.I64: self.cancelCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 15: if ftype == TType.I64: self.blockCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 16: if ftype == TType.I64: self.unregisterCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 21: if ftype == TType.I64: self.timestamp = iprot.readI64() else: iprot.skip(ftype) elif fid == 22: if ftype == TType.STRING: self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SendBuddyMessageResult') if self.requestId is not None: oprot.writeFieldBegin('requestId', TType.STRING, 1) oprot.writeString(self.requestId.encode('utf-8') if sys.version_info[0] == 2 else self.requestId) oprot.writeFieldEnd() if self.state is not None: oprot.writeFieldBegin('state', TType.I32, 2) oprot.writeI32(self.state) oprot.writeFieldEnd() if self.messageId is not None: oprot.writeFieldBegin('messageId', TType.STRING, 3) oprot.writeString(self.messageId.encode('utf-8') if sys.version_info[0] == 2 else self.messageId) oprot.writeFieldEnd() if self.eventNo is not None: oprot.writeFieldBegin('eventNo', TType.I32, 4) oprot.writeI32(self.eventNo) oprot.writeFieldEnd() if self.receiverCount is not None: oprot.writeFieldBegin('receiverCount', TType.I64, 11) oprot.writeI64(self.receiverCount) oprot.writeFieldEnd() if self.successCount is not None: oprot.writeFieldBegin('successCount', TType.I64, 12) oprot.writeI64(self.successCount) oprot.writeFieldEnd() if self.failCount is not None: oprot.writeFieldBegin('failCount', TType.I64, 13) oprot.writeI64(self.failCount) oprot.writeFieldEnd() if self.cancelCount is not None: oprot.writeFieldBegin('cancelCount', TType.I64, 14) oprot.writeI64(self.cancelCount) oprot.writeFieldEnd() if self.blockCount is not None: oprot.writeFieldBegin('blockCount', TType.I64, 15) oprot.writeI64(self.blockCount) oprot.writeFieldEnd() if self.unregisterCount is not None: oprot.writeFieldBegin('unregisterCount', TType.I64, 16) oprot.writeI64(self.unregisterCount) oprot.writeFieldEnd() if self.timestamp is not None: oprot.writeFieldBegin('timestamp', TType.I64, 21) oprot.writeI64(self.timestamp) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 22) oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SetBuddyOnAirResult(object): """ Attributes: - requestId - state - eventNo - receiverCount - successCount - failCount - cancelCount - unregisterCount - timestamp - message """ def __init__(self, requestId=None, state=None, eventNo=None, receiverCount=None, successCount=None, failCount=None, cancelCount=None, unregisterCount=None, timestamp=None, message=None,): self.requestId = requestId self.state = state self.eventNo = eventNo self.receiverCount = receiverCount self.successCount = successCount self.failCount = failCount self.cancelCount = cancelCount self.unregisterCount = unregisterCount self.timestamp = timestamp self.message = message def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.requestId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.state = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.eventNo = iprot.readI32() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.I64: self.receiverCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.I64: self.successCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.I64: self.failCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 14: if ftype == TType.I64: self.cancelCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 15: if ftype == TType.I64: self.unregisterCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 21: if ftype == TType.I64: self.timestamp = iprot.readI64() else: iprot.skip(ftype) elif fid == 22: if ftype == TType.STRING: self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SetBuddyOnAirResult') if self.requestId is not None: oprot.writeFieldBegin('requestId', TType.STRING, 1) oprot.writeString(self.requestId.encode('utf-8') if sys.version_info[0] == 2 else self.requestId) oprot.writeFieldEnd() if self.state is not None: oprot.writeFieldBegin('state', TType.I32, 2) oprot.writeI32(self.state) oprot.writeFieldEnd() if self.eventNo is not None: oprot.writeFieldBegin('eventNo', TType.I32, 3) oprot.writeI32(self.eventNo) oprot.writeFieldEnd() if self.receiverCount is not None: oprot.writeFieldBegin('receiverCount', TType.I64, 11) oprot.writeI64(self.receiverCount) oprot.writeFieldEnd() if self.successCount is not None: oprot.writeFieldBegin('successCount', TType.I64, 12) oprot.writeI64(self.successCount) oprot.writeFieldEnd() if self.failCount is not None: oprot.writeFieldBegin('failCount', TType.I64, 13) oprot.writeI64(self.failCount) oprot.writeFieldEnd() if self.cancelCount is not None: oprot.writeFieldBegin('cancelCount', TType.I64, 14) oprot.writeI64(self.cancelCount) oprot.writeFieldEnd() if self.unregisterCount is not None: oprot.writeFieldBegin('unregisterCount', TType.I64, 15) oprot.writeI64(self.unregisterCount) oprot.writeFieldEnd() if self.timestamp is not None: oprot.writeFieldBegin('timestamp', TType.I64, 21) oprot.writeI64(self.timestamp) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 22) oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Settings(object): """ Attributes: - notificationEnable - notificationMuteExpiration - notificationNewMessage - notificationGroupInvitation - notificationShowMessage - notificationIncomingCall - notificationSoundMessage - notificationSoundGroup - notificationDisabledWithSub - privacySyncContacts - privacySearchByPhoneNumber - privacySearchByUserid - privacySearchByEmail - privacyAllowSecondaryDeviceLogin - privacyProfileImagePostToMyhome - privacyReceiveMessagesFromNotFriend - contactMyTicket - identityProvider - identityIdentifier - snsAccounts - phoneRegistration - emailConfirmationStatus - preferenceLocale - customModes """ def __init__(self, notificationEnable=None, notificationMuteExpiration=None, notificationNewMessage=None, notificationGroupInvitation=None, notificationShowMessage=None, notificationIncomingCall=None, notificationSoundMessage=None, notificationSoundGroup=None, notificationDisabledWithSub=None, privacySyncContacts=None, privacySearchByPhoneNumber=None, privacySearchByUserid=None, privacySearchByEmail=None, privacyAllowSecondaryDeviceLogin=None, privacyProfileImagePostToMyhome=None, privacyReceiveMessagesFromNotFriend=None, contactMyTicket=None, identityProvider=None, identityIdentifier=None, snsAccounts=None, phoneRegistration=None, emailConfirmationStatus=None, preferenceLocale=None, customModes=None,): self.notificationEnable = notificationEnable self.notificationMuteExpiration = notificationMuteExpiration self.notificationNewMessage = notificationNewMessage self.notificationGroupInvitation = notificationGroupInvitation self.notificationShowMessage = notificationShowMessage self.notificationIncomingCall = notificationIncomingCall self.notificationSoundMessage = notificationSoundMessage self.notificationSoundGroup = notificationSoundGroup self.notificationDisabledWithSub = notificationDisabledWithSub self.privacySyncContacts = privacySyncContacts self.privacySearchByPhoneNumber = privacySearchByPhoneNumber self.privacySearchByUserid = privacySearchByUserid self.privacySearchByEmail = privacySearchByEmail self.privacyAllowSecondaryDeviceLogin = privacyAllowSecondaryDeviceLogin self.privacyProfileImagePostToMyhome = privacyProfileImagePostToMyhome self.privacyReceiveMessagesFromNotFriend = privacyReceiveMessagesFromNotFriend self.contactMyTicket = contactMyTicket self.identityProvider = identityProvider self.identityIdentifier = identityIdentifier self.snsAccounts = snsAccounts self.phoneRegistration = phoneRegistration self.emailConfirmationStatus = emailConfirmationStatus self.preferenceLocale = preferenceLocale self.customModes = customModes def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 10: if ftype == TType.BOOL: self.notificationEnable = iprot.readBool() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.I64: self.notificationMuteExpiration = iprot.readI64() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.BOOL: self.notificationNewMessage = iprot.readBool() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.BOOL: self.notificationGroupInvitation = iprot.readBool() else: iprot.skip(ftype) elif fid == 14: if ftype == TType.BOOL: self.notificationShowMessage = iprot.readBool() else: iprot.skip(ftype) elif fid == 15: if ftype == TType.BOOL: self.notificationIncomingCall = iprot.readBool() else: iprot.skip(ftype) elif fid == 16: if ftype == TType.STRING: self.notificationSoundMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 17: if ftype == TType.STRING: self.notificationSoundGroup = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 18: if ftype == TType.BOOL: self.notificationDisabledWithSub = iprot.readBool() else: iprot.skip(ftype) elif fid == 20: if ftype == TType.BOOL: self.privacySyncContacts = iprot.readBool() else: iprot.skip(ftype) elif fid == 21: if ftype == TType.BOOL: self.privacySearchByPhoneNumber = iprot.readBool() else: iprot.skip(ftype) elif fid == 22: if ftype == TType.BOOL: self.privacySearchByUserid = iprot.readBool() else: iprot.skip(ftype) elif fid == 23: if ftype == TType.BOOL: self.privacySearchByEmail = iprot.readBool() else: iprot.skip(ftype) elif fid == 24: if ftype == TType.BOOL: self.privacyAllowSecondaryDeviceLogin = iprot.readBool() else: iprot.skip(ftype) elif fid == 25: if ftype == TType.BOOL: self.privacyProfileImagePostToMyhome = iprot.readBool() else: iprot.skip(ftype) elif fid == 26: if ftype == TType.BOOL: self.privacyReceiveMessagesFromNotFriend = iprot.readBool() else: iprot.skip(ftype) elif fid == 30: if ftype == TType.STRING: self.contactMyTicket = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 40: if ftype == TType.I32: self.identityProvider = iprot.readI32() else: iprot.skip(ftype) elif fid == 41: if ftype == TType.STRING: self.identityIdentifier = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 42: if ftype == TType.MAP: self.snsAccounts = {} (_ktype255, _vtype256, _size254) = iprot.readMapBegin() for _i258 in range(_size254): _key259 = iprot.readI32() _val260 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.snsAccounts[_key259] = _val260 iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 43: if ftype == TType.BOOL: self.phoneRegistration = iprot.readBool() else: iprot.skip(ftype) elif fid == 44: if ftype == TType.I32: self.emailConfirmationStatus = iprot.readI32() else: iprot.skip(ftype) elif fid == 50: if ftype == TType.STRING: self.preferenceLocale = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 60: if ftype == TType.MAP: self.customModes = {} (_ktype262, _vtype263, _size261) = iprot.readMapBegin() for _i265 in range(_size261): _key266 = iprot.readI32() _val267 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.customModes[_key266] = _val267 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Settings') if self.notificationEnable is not None: oprot.writeFieldBegin('notificationEnable', TType.BOOL, 10) oprot.writeBool(self.notificationEnable) oprot.writeFieldEnd() if self.notificationMuteExpiration is not None: oprot.writeFieldBegin('notificationMuteExpiration', TType.I64, 11) oprot.writeI64(self.notificationMuteExpiration) oprot.writeFieldEnd() if self.notificationNewMessage is not None: oprot.writeFieldBegin('notificationNewMessage', TType.BOOL, 12) oprot.writeBool(self.notificationNewMessage) oprot.writeFieldEnd() if self.notificationGroupInvitation is not None: oprot.writeFieldBegin('notificationGroupInvitation', TType.BOOL, 13) oprot.writeBool(self.notificationGroupInvitation) oprot.writeFieldEnd() if self.notificationShowMessage is not None: oprot.writeFieldBegin('notificationShowMessage', TType.BOOL, 14) oprot.writeBool(self.notificationShowMessage) oprot.writeFieldEnd() if self.notificationIncomingCall is not None: oprot.writeFieldBegin('notificationIncomingCall', TType.BOOL, 15) oprot.writeBool(self.notificationIncomingCall) oprot.writeFieldEnd() if self.notificationSoundMessage is not None: oprot.writeFieldBegin('notificationSoundMessage', TType.STRING, 16) oprot.writeString(self.notificationSoundMessage.encode('utf-8') if sys.version_info[0] == 2 else self.notificationSoundMessage) oprot.writeFieldEnd() if self.notificationSoundGroup is not None: oprot.writeFieldBegin('notificationSoundGroup', TType.STRING, 17) oprot.writeString(self.notificationSoundGroup.encode('utf-8') if sys.version_info[0] == 2 else self.notificationSoundGroup) oprot.writeFieldEnd() if self.notificationDisabledWithSub is not None: oprot.writeFieldBegin('notificationDisabledWithSub', TType.BOOL, 18) oprot.writeBool(self.notificationDisabledWithSub) oprot.writeFieldEnd() if self.privacySyncContacts is not None: oprot.writeFieldBegin('privacySyncContacts', TType.BOOL, 20) oprot.writeBool(self.privacySyncContacts) oprot.writeFieldEnd() if self.privacySearchByPhoneNumber is not None: oprot.writeFieldBegin('privacySearchByPhoneNumber', TType.BOOL, 21) oprot.writeBool(self.privacySearchByPhoneNumber) oprot.writeFieldEnd() if self.privacySearchByUserid is not None: oprot.writeFieldBegin('privacySearchByUserid', TType.BOOL, 22) oprot.writeBool(self.privacySearchByUserid) oprot.writeFieldEnd() if self.privacySearchByEmail is not None: oprot.writeFieldBegin('privacySearchByEmail', TType.BOOL, 23) oprot.writeBool(self.privacySearchByEmail) oprot.writeFieldEnd() if self.privacyAllowSecondaryDeviceLogin is not None: oprot.writeFieldBegin('privacyAllowSecondaryDeviceLogin', TType.BOOL, 24) oprot.writeBool(self.privacyAllowSecondaryDeviceLogin) oprot.writeFieldEnd() if self.privacyProfileImagePostToMyhome is not None: oprot.writeFieldBegin('privacyProfileImagePostToMyhome', TType.BOOL, 25) oprot.writeBool(self.privacyProfileImagePostToMyhome) oprot.writeFieldEnd() if self.privacyReceiveMessagesFromNotFriend is not None: oprot.writeFieldBegin('privacyReceiveMessagesFromNotFriend', TType.BOOL, 26) oprot.writeBool(self.privacyReceiveMessagesFromNotFriend) oprot.writeFieldEnd() if self.contactMyTicket is not None: oprot.writeFieldBegin('contactMyTicket', TType.STRING, 30) oprot.writeString(self.contactMyTicket.encode('utf-8') if sys.version_info[0] == 2 else self.contactMyTicket) oprot.writeFieldEnd() if self.identityProvider is not None: oprot.writeFieldBegin('identityProvider', TType.I32, 40) oprot.writeI32(self.identityProvider) oprot.writeFieldEnd() if self.identityIdentifier is not None: oprot.writeFieldBegin('identityIdentifier', TType.STRING, 41) oprot.writeString(self.identityIdentifier.encode('utf-8') if sys.version_info[0] == 2 else self.identityIdentifier) oprot.writeFieldEnd() if self.snsAccounts is not None: oprot.writeFieldBegin('snsAccounts', TType.MAP, 42) oprot.writeMapBegin(TType.I32, TType.STRING, len(self.snsAccounts)) for kiter268, viter269 in self.snsAccounts.items(): oprot.writeI32(kiter268) oprot.writeString(viter269.encode('utf-8') if sys.version_info[0] == 2 else viter269) oprot.writeMapEnd() oprot.writeFieldEnd() if self.phoneRegistration is not None: oprot.writeFieldBegin('phoneRegistration', TType.BOOL, 43) oprot.writeBool(self.phoneRegistration) oprot.writeFieldEnd() if self.emailConfirmationStatus is not None: oprot.writeFieldBegin('emailConfirmationStatus', TType.I32, 44) oprot.writeI32(self.emailConfirmationStatus) oprot.writeFieldEnd() if self.preferenceLocale is not None: oprot.writeFieldBegin('preferenceLocale', TType.STRING, 50) oprot.writeString(self.preferenceLocale.encode('utf-8') if sys.version_info[0] == 2 else self.preferenceLocale) oprot.writeFieldEnd() if self.customModes is not None: oprot.writeFieldBegin('customModes', TType.MAP, 60) oprot.writeMapBegin(TType.I32, TType.STRING, len(self.customModes)) for kiter270, viter271 in self.customModes.items(): oprot.writeI32(kiter270) oprot.writeString(viter271.encode('utf-8') if sys.version_info[0] == 2 else viter271) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SimpleChannelClient(object): """ Attributes: - applicationType - applicationVersion - locale """ def __init__(self, applicationType=None, applicationVersion=None, locale=None,): self.applicationType = applicationType self.applicationVersion = applicationVersion self.locale = locale def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.applicationType = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.applicationVersion = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.locale = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SimpleChannelClient') if self.applicationType is not None: oprot.writeFieldBegin('applicationType', TType.STRING, 1) oprot.writeString(self.applicationType.encode('utf-8') if sys.version_info[0] == 2 else self.applicationType) oprot.writeFieldEnd() if self.applicationVersion is not None: oprot.writeFieldBegin('applicationVersion', TType.STRING, 2) oprot.writeString(self.applicationVersion.encode('utf-8') if sys.version_info[0] == 2 else self.applicationVersion) oprot.writeFieldEnd() if self.locale is not None: oprot.writeFieldBegin('locale', TType.STRING, 3) oprot.writeString(self.locale.encode('utf-8') if sys.version_info[0] == 2 else self.locale) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SimpleChannelContact(object): """ Attributes: - mid - displayName - pictureStatus - picturePath - statusMessage """ def __init__(self, mid=None, displayName=None, pictureStatus=None, picturePath=None, statusMessage=None,): self.mid = mid self.displayName = displayName self.pictureStatus = pictureStatus self.picturePath = picturePath self.statusMessage = statusMessage def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.mid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.displayName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.pictureStatus = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.picturePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.statusMessage = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SimpleChannelContact') if self.mid is not None: oprot.writeFieldBegin('mid', TType.STRING, 1) oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) oprot.writeFieldEnd() if self.displayName is not None: oprot.writeFieldBegin('displayName', TType.STRING, 2) oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName) oprot.writeFieldEnd() if self.pictureStatus is not None: oprot.writeFieldBegin('pictureStatus', TType.STRING, 3) oprot.writeString(self.pictureStatus.encode('utf-8') if sys.version_info[0] == 2 else self.pictureStatus) oprot.writeFieldEnd() if self.picturePath is not None: oprot.writeFieldBegin('picturePath', TType.STRING, 4) oprot.writeString(self.picturePath.encode('utf-8') if sys.version_info[0] == 2 else self.picturePath) oprot.writeFieldEnd() if self.statusMessage is not None: oprot.writeFieldBegin('statusMessage', TType.STRING, 5) oprot.writeString(self.statusMessage.encode('utf-8') if sys.version_info[0] == 2 else self.statusMessage) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SnsFriend(object): """ Attributes: - snsUserId - snsUserName - snsIdType """ def __init__(self, snsUserId=None, snsUserName=None, snsIdType=None,): self.snsUserId = snsUserId self.snsUserName = snsUserName self.snsIdType = snsIdType def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.snsUserId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.snsUserName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.snsIdType = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SnsFriend') if self.snsUserId is not None: oprot.writeFieldBegin('snsUserId', TType.STRING, 1) oprot.writeString(self.snsUserId.encode('utf-8') if sys.version_info[0] == 2 else self.snsUserId) oprot.writeFieldEnd() if self.snsUserName is not None: oprot.writeFieldBegin('snsUserName', TType.STRING, 2) oprot.writeString(self.snsUserName.encode('utf-8') if sys.version_info[0] == 2 else self.snsUserName) oprot.writeFieldEnd() if self.snsIdType is not None: oprot.writeFieldBegin('snsIdType', TType.I32, 3) oprot.writeI32(self.snsIdType) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SnsFriendContactRegistration(object): """ Attributes: - contact - snsIdType - snsUserId """ def __init__(self, contact=None, snsIdType=None, snsUserId=None,): self.contact = contact self.snsIdType = snsIdType self.snsUserId = snsUserId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.contact = Contact() self.contact.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.snsIdType = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.snsUserId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SnsFriendContactRegistration') if self.contact is not None: oprot.writeFieldBegin('contact', TType.STRUCT, 1) self.contact.write(oprot) oprot.writeFieldEnd() if self.snsIdType is not None: oprot.writeFieldBegin('snsIdType', TType.I32, 2) oprot.writeI32(self.snsIdType) oprot.writeFieldEnd() if self.snsUserId is not None: oprot.writeFieldBegin('snsUserId', TType.STRING, 3) oprot.writeString(self.snsUserId.encode('utf-8') if sys.version_info[0] == 2 else self.snsUserId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SnsFriendModification(object): """ Attributes: - type - snsFriend """ def __init__(self, type=None, snsFriend=None,): self.type = type self.snsFriend = snsFriend def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: self.snsFriend = SnsFriend() self.snsFriend.read(iprot) else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SnsFriendModification') if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 1) oprot.writeI32(self.type) oprot.writeFieldEnd() if self.snsFriend is not None: oprot.writeFieldBegin('snsFriend', TType.STRUCT, 2) self.snsFriend.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SnsFriends(object): """ Attributes: - snsFriends - hasMore """ def __init__(self, snsFriends=None, hasMore=None,): self.snsFriends = snsFriends self.hasMore = hasMore def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.LIST: self.snsFriends = [] (_etype275, _size272) = iprot.readListBegin() for _i276 in range(_size272): _elem277 = SnsFriend() _elem277.read(iprot) self.snsFriends.append(_elem277) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.BOOL: self.hasMore = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SnsFriends') if self.snsFriends is not None: oprot.writeFieldBegin('snsFriends', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.snsFriends)) for iter278 in self.snsFriends: iter278.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.hasMore is not None: oprot.writeFieldBegin('hasMore', TType.BOOL, 2) oprot.writeBool(self.hasMore) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SnsIdUserStatus(object): """ Attributes: - userExisting - phoneNumberRegistered - sameDevice """ def __init__(self, userExisting=None, phoneNumberRegistered=None, sameDevice=None,): self.userExisting = userExisting self.phoneNumberRegistered = phoneNumberRegistered self.sameDevice = sameDevice def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.BOOL: self.userExisting = iprot.readBool() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.BOOL: self.phoneNumberRegistered = iprot.readBool() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.BOOL: self.sameDevice = iprot.readBool() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SnsIdUserStatus') if self.userExisting is not None: oprot.writeFieldBegin('userExisting', TType.BOOL, 1) oprot.writeBool(self.userExisting) oprot.writeFieldEnd() if self.phoneNumberRegistered is not None: oprot.writeFieldBegin('phoneNumberRegistered', TType.BOOL, 2) oprot.writeBool(self.phoneNumberRegistered) oprot.writeFieldEnd() if self.sameDevice is not None: oprot.writeFieldBegin('sameDevice', TType.BOOL, 3) oprot.writeBool(self.sameDevice) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SnsProfile(object): """ Attributes: - snsUserId - snsUserName - email - thumbnailUrl """ def __init__(self, snsUserId=None, snsUserName=None, email=None, thumbnailUrl=None,): self.snsUserId = snsUserId self.snsUserName = snsUserName self.email = email self.thumbnailUrl = thumbnailUrl def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.snsUserId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.snsUserName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.email = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.thumbnailUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SnsProfile') if self.snsUserId is not None: oprot.writeFieldBegin('snsUserId', TType.STRING, 1) oprot.writeString(self.snsUserId.encode('utf-8') if sys.version_info[0] == 2 else self.snsUserId) oprot.writeFieldEnd() if self.snsUserName is not None: oprot.writeFieldBegin('snsUserName', TType.STRING, 2) oprot.writeString(self.snsUserName.encode('utf-8') if sys.version_info[0] == 2 else self.snsUserName) oprot.writeFieldEnd() if self.email is not None: oprot.writeFieldBegin('email', TType.STRING, 3) oprot.writeString(self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email) oprot.writeFieldEnd() if self.thumbnailUrl is not None: oprot.writeFieldBegin('thumbnailUrl', TType.STRING, 4) oprot.writeString(self.thumbnailUrl.encode('utf-8') if sys.version_info[0] == 2 else self.thumbnailUrl) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class SystemConfiguration(object): """ Attributes: - endpoint - endpointSsl - updateUrl - c2dmAccount - nniServer """ def __init__(self, endpoint=None, endpointSsl=None, updateUrl=None, c2dmAccount=None, nniServer=None,): self.endpoint = endpoint self.endpointSsl = endpointSsl self.updateUrl = updateUrl self.c2dmAccount = c2dmAccount self.nniServer = nniServer def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.endpoint = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.endpointSsl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.updateUrl = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.c2dmAccount = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.nniServer = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('SystemConfiguration') if self.endpoint is not None: oprot.writeFieldBegin('endpoint', TType.STRING, 1) oprot.writeString(self.endpoint.encode('utf-8') if sys.version_info[0] == 2 else self.endpoint) oprot.writeFieldEnd() if self.endpointSsl is not None: oprot.writeFieldBegin('endpointSsl', TType.STRING, 2) oprot.writeString(self.endpointSsl.encode('utf-8') if sys.version_info[0] == 2 else self.endpointSsl) oprot.writeFieldEnd() if self.updateUrl is not None: oprot.writeFieldBegin('updateUrl', TType.STRING, 3) oprot.writeString(self.updateUrl.encode('utf-8') if sys.version_info[0] == 2 else self.updateUrl) oprot.writeFieldEnd() if self.c2dmAccount is not None: oprot.writeFieldBegin('c2dmAccount', TType.STRING, 11) oprot.writeString(self.c2dmAccount.encode('utf-8') if sys.version_info[0] == 2 else self.c2dmAccount) oprot.writeFieldEnd() if self.nniServer is not None: oprot.writeFieldBegin('nniServer', TType.STRING, 12) oprot.writeString(self.nniServer.encode('utf-8') if sys.version_info[0] == 2 else self.nniServer) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class TalkException(TException): """ Attributes: - code - reason - parameterMap """ def __init__(self, code=None, reason=None, parameterMap=None,): self.code = code self.reason = reason self.parameterMap = parameterMap def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.code = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.MAP: self.parameterMap = {} (_ktype280, _vtype281, _size279) = iprot.readMapBegin() for _i283 in range(_size279): _key284 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val285 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.parameterMap[_key284] = _val285 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('TalkException') if self.code is not None: oprot.writeFieldBegin('code', TType.I32, 1) oprot.writeI32(self.code) oprot.writeFieldEnd() if self.reason is not None: oprot.writeFieldBegin('reason', TType.STRING, 2) oprot.writeString(self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason) oprot.writeFieldEnd() if self.parameterMap is not None: oprot.writeFieldBegin('parameterMap', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap)) for kiter286, viter287 in self.parameterMap.items(): oprot.writeString(kiter286.encode('utf-8') if sys.version_info[0] == 2 else kiter286) oprot.writeString(viter287.encode('utf-8') if sys.version_info[0] == 2 else viter287) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __str__(self): return repr(self) def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class Ticket(object): """ Attributes: - id - expirationTime - maxUseCount """ def __init__(self, id=None, expirationTime=None, maxUseCount=None,): self.id = id self.expirationTime = expirationTime self.maxUseCount = maxUseCount def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.I64: self.expirationTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 21: if ftype == TType.I32: self.maxUseCount = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('Ticket') if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() if self.expirationTime is not None: oprot.writeFieldBegin('expirationTime', TType.I64, 10) oprot.writeI64(self.expirationTime) oprot.writeFieldEnd() if self.maxUseCount is not None: oprot.writeFieldBegin('maxUseCount', TType.I32, 21) oprot.writeI32(self.maxUseCount) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class TMessageBox(object): """ Attributes: - id - channelId - lastSeq - unreadCount - lastModifiedTime - status - midType - lastMessages """ def __init__(self, id=None, channelId=None, lastSeq=None, unreadCount=None, lastModifiedTime=None, status=None, midType=None, lastMessages=None,): self.id = id self.channelId = channelId self.lastSeq = lastSeq self.unreadCount = unreadCount self.lastModifiedTime = lastModifiedTime self.status = status self.midType = midType self.lastMessages = lastMessages def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.channelId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.I64: self.lastSeq = iprot.readI64() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.I64: self.unreadCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.I64: self.lastModifiedTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.I32: self.status = iprot.readI32() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.I32: self.midType = iprot.readI32() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.LIST: self.lastMessages = [] (_etype291, _size288) = iprot.readListBegin() for _i292 in range(_size288): _elem293 = Message() _elem293.read(iprot) self.lastMessages.append(_elem293) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('TMessageBox') if self.id is not None: oprot.writeFieldBegin('id', TType.STRING, 1) oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) oprot.writeFieldEnd() if self.channelId is not None: oprot.writeFieldBegin('channelId', TType.STRING, 2) oprot.writeString(self.channelId.encode('utf-8') if sys.version_info[0] == 2 else self.channelId) oprot.writeFieldEnd() if self.lastSeq is not None: oprot.writeFieldBegin('lastSeq', TType.I64, 5) oprot.writeI64(self.lastSeq) oprot.writeFieldEnd() if self.unreadCount is not None: oprot.writeFieldBegin('unreadCount', TType.I64, 6) oprot.writeI64(self.unreadCount) oprot.writeFieldEnd() if self.lastModifiedTime is not None: oprot.writeFieldBegin('lastModifiedTime', TType.I64, 7) oprot.writeI64(self.lastModifiedTime) oprot.writeFieldEnd() if self.status is not None: oprot.writeFieldBegin('status', TType.I32, 8) oprot.writeI32(self.status) oprot.writeFieldEnd() if self.midType is not None: oprot.writeFieldBegin('midType', TType.I32, 9) oprot.writeI32(self.midType) oprot.writeFieldEnd() if self.lastMessages is not None: oprot.writeFieldBegin('lastMessages', TType.LIST, 10) oprot.writeListBegin(TType.STRUCT, len(self.lastMessages)) for iter294 in self.lastMessages: iter294.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class TMessageBoxWrapUp(object): """ Attributes: - messageBox - name - contacts - pictureRevision """ def __init__(self, messageBox=None, name=None, contacts=None, pictureRevision=None,): self.messageBox = messageBox self.name = name self.contacts = contacts self.pictureRevision = pictureRevision def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRUCT: self.messageBox = TMessageBox() self.messageBox.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.name = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: self.contacts = [] (_etype298, _size295) = iprot.readListBegin() for _i299 in range(_size295): _elem300 = Contact() _elem300.read(iprot) self.contacts.append(_elem300) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.pictureRevision = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('TMessageBoxWrapUp') if self.messageBox is not None: oprot.writeFieldBegin('messageBox', TType.STRUCT, 1) self.messageBox.write(oprot) oprot.writeFieldEnd() if self.name is not None: oprot.writeFieldBegin('name', TType.STRING, 2) oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) oprot.writeFieldEnd() if self.contacts is not None: oprot.writeFieldBegin('contacts', TType.LIST, 3) oprot.writeListBegin(TType.STRUCT, len(self.contacts)) for iter301 in self.contacts: iter301.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.pictureRevision is not None: oprot.writeFieldBegin('pictureRevision', TType.STRING, 4) oprot.writeString(self.pictureRevision.encode('utf-8') if sys.version_info[0] == 2 else self.pictureRevision) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class TMessageBoxWrapUpResponse(object): """ Attributes: - messageBoxWrapUpList - totalSize """ def __init__(self, messageBoxWrapUpList=None, totalSize=None,): self.messageBoxWrapUpList = messageBoxWrapUpList self.totalSize = totalSize def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.LIST: self.messageBoxWrapUpList = [] (_etype305, _size302) = iprot.readListBegin() for _i306 in range(_size302): _elem307 = TMessageBoxWrapUp() _elem307.read(iprot) self.messageBoxWrapUpList.append(_elem307) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.totalSize = iprot.readI32() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('TMessageBoxWrapUpResponse') if self.messageBoxWrapUpList is not None: oprot.writeFieldBegin('messageBoxWrapUpList', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.messageBoxWrapUpList)) for iter308 in self.messageBoxWrapUpList: iter308.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.totalSize is not None: oprot.writeFieldBegin('totalSize', TType.I32, 2) oprot.writeI32(self.totalSize) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class UniversalNotificationServiceException(TException): """ Attributes: - code - reason - parameterMap """ def __init__(self, code=None, reason=None, parameterMap=None,): self.code = code self.reason = reason self.parameterMap = parameterMap def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.code = iprot.readI32() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: self.reason = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.MAP: self.parameterMap = {} (_ktype310, _vtype311, _size309) = iprot.readMapBegin() for _i313 in range(_size309): _key314 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() _val315 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() self.parameterMap[_key314] = _val315 iprot.readMapEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('UniversalNotificationServiceException') if self.code is not None: oprot.writeFieldBegin('code', TType.I32, 1) oprot.writeI32(self.code) oprot.writeFieldEnd() if self.reason is not None: oprot.writeFieldBegin('reason', TType.STRING, 2) oprot.writeString(self.reason.encode('utf-8') if sys.version_info[0] == 2 else self.reason) oprot.writeFieldEnd() if self.parameterMap is not None: oprot.writeFieldBegin('parameterMap', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameterMap)) for kiter316, viter317 in self.parameterMap.items(): oprot.writeString(kiter316.encode('utf-8') if sys.version_info[0] == 2 else kiter316) oprot.writeString(viter317.encode('utf-8') if sys.version_info[0] == 2 else viter317) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __str__(self): return repr(self) def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class UpdateBuddyProfileResult(object): """ Attributes: - requestId - state - eventNo - receiverCount - successCount - failCount - cancelCount - unregisterCount - timestamp - message """ def __init__(self, requestId=None, state=None, eventNo=None, receiverCount=None, successCount=None, failCount=None, cancelCount=None, unregisterCount=None, timestamp=None, message=None,): self.requestId = requestId self.state = state self.eventNo = eventNo self.receiverCount = receiverCount self.successCount = successCount self.failCount = failCount self.cancelCount = cancelCount self.unregisterCount = unregisterCount self.timestamp = timestamp self.message = message def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.requestId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.state = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.I32: self.eventNo = iprot.readI32() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.I64: self.receiverCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.I64: self.successCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 13: if ftype == TType.I64: self.failCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 14: if ftype == TType.I64: self.cancelCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 15: if ftype == TType.I64: self.unregisterCount = iprot.readI64() else: iprot.skip(ftype) elif fid == 21: if ftype == TType.I64: self.timestamp = iprot.readI64() else: iprot.skip(ftype) elif fid == 22: if ftype == TType.STRING: self.message = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('UpdateBuddyProfileResult') if self.requestId is not None: oprot.writeFieldBegin('requestId', TType.STRING, 1) oprot.writeString(self.requestId.encode('utf-8') if sys.version_info[0] == 2 else self.requestId) oprot.writeFieldEnd() if self.state is not None: oprot.writeFieldBegin('state', TType.I32, 2) oprot.writeI32(self.state) oprot.writeFieldEnd() if self.eventNo is not None: oprot.writeFieldBegin('eventNo', TType.I32, 3) oprot.writeI32(self.eventNo) oprot.writeFieldEnd() if self.receiverCount is not None: oprot.writeFieldBegin('receiverCount', TType.I64, 11) oprot.writeI64(self.receiverCount) oprot.writeFieldEnd() if self.successCount is not None: oprot.writeFieldBegin('successCount', TType.I64, 12) oprot.writeI64(self.successCount) oprot.writeFieldEnd() if self.failCount is not None: oprot.writeFieldBegin('failCount', TType.I64, 13) oprot.writeI64(self.failCount) oprot.writeFieldEnd() if self.cancelCount is not None: oprot.writeFieldBegin('cancelCount', TType.I64, 14) oprot.writeI64(self.cancelCount) oprot.writeFieldEnd() if self.unregisterCount is not None: oprot.writeFieldBegin('unregisterCount', TType.I64, 15) oprot.writeI64(self.unregisterCount) oprot.writeFieldEnd() if self.timestamp is not None: oprot.writeFieldBegin('timestamp', TType.I64, 21) oprot.writeI64(self.timestamp) oprot.writeFieldEnd() if self.message is not None: oprot.writeFieldBegin('message', TType.STRING, 22) oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class UserAuthStatus(object): """ Attributes: - phoneNumberRegistered - registeredSnsIdTypes """ def __init__(self, phoneNumberRegistered=None, registeredSnsIdTypes=None,): self.phoneNumberRegistered = phoneNumberRegistered self.registeredSnsIdTypes = registeredSnsIdTypes def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.BOOL: self.phoneNumberRegistered = iprot.readBool() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.LIST: self.registeredSnsIdTypes = [] (_etype321, _size318) = iprot.readListBegin() for _i322 in range(_size318): _elem323 = iprot.readI32() self.registeredSnsIdTypes.append(_elem323) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('UserAuthStatus') if self.phoneNumberRegistered is not None: oprot.writeFieldBegin('phoneNumberRegistered', TType.BOOL, 1) oprot.writeBool(self.phoneNumberRegistered) oprot.writeFieldEnd() if self.registeredSnsIdTypes is not None: oprot.writeFieldBegin('registeredSnsIdTypes', TType.LIST, 2) oprot.writeListBegin(TType.I32, len(self.registeredSnsIdTypes)) for iter324 in self.registeredSnsIdTypes: oprot.writeI32(iter324) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class VerificationSessionData(object): """ Attributes: - sessionId - method - callback - normalizedPhone - countryCode - nationalSignificantNumber - availableVerificationMethods """ def __init__(self, sessionId=None, method=None, callback=None, normalizedPhone=None, countryCode=None, nationalSignificantNumber=None, availableVerificationMethods=None,): self.sessionId = sessionId self.method = method self.callback = callback self.normalizedPhone = normalizedPhone self.countryCode = countryCode self.nationalSignificantNumber = nationalSignificantNumber self.availableVerificationMethods = availableVerificationMethods def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.STRING: self.sessionId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.I32: self.method = iprot.readI32() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: self.callback = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: self.normalizedPhone = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 5: if ftype == TType.STRING: self.countryCode = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: self.nationalSignificantNumber = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.LIST: self.availableVerificationMethods = [] (_etype328, _size325) = iprot.readListBegin() for _i329 in range(_size325): _elem330 = iprot.readI32() self.availableVerificationMethods.append(_elem330) iprot.readListEnd() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('VerificationSessionData') if self.sessionId is not None: oprot.writeFieldBegin('sessionId', TType.STRING, 1) oprot.writeString(self.sessionId.encode('utf-8') if sys.version_info[0] == 2 else self.sessionId) oprot.writeFieldEnd() if self.method is not None: oprot.writeFieldBegin('method', TType.I32, 2) oprot.writeI32(self.method) oprot.writeFieldEnd() if self.callback is not None: oprot.writeFieldBegin('callback', TType.STRING, 3) oprot.writeString(self.callback.encode('utf-8') if sys.version_info[0] == 2 else self.callback) oprot.writeFieldEnd() if self.normalizedPhone is not None: oprot.writeFieldBegin('normalizedPhone', TType.STRING, 4) oprot.writeString(self.normalizedPhone.encode('utf-8') if sys.version_info[0] == 2 else self.normalizedPhone) oprot.writeFieldEnd() if self.countryCode is not None: oprot.writeFieldBegin('countryCode', TType.STRING, 5) oprot.writeString(self.countryCode.encode('utf-8') if sys.version_info[0] == 2 else self.countryCode) oprot.writeFieldEnd() if self.nationalSignificantNumber is not None: oprot.writeFieldBegin('nationalSignificantNumber', TType.STRING, 6) oprot.writeString(self.nationalSignificantNumber.encode('utf-8') if sys.version_info[0] == 2 else self.nationalSignificantNumber) oprot.writeFieldEnd() if self.availableVerificationMethods is not None: oprot.writeFieldBegin('availableVerificationMethods', TType.LIST, 7) oprot.writeListBegin(TType.I32, len(self.availableVerificationMethods)) for iter331 in self.availableVerificationMethods: oprot.writeI32(iter331) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) class WapInvitation(object): """ Attributes: - type - inviteeEmail - inviterMid - roomId """ def __init__(self, type=None, inviteeEmail=None, inviterMid=None, roomId=None,): self.type = type self.inviteeEmail = inviteeEmail self.inviterMid = inviterMid self.roomId = roomId def read(self, iprot): if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) return iprot.readStructBegin() while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break if fid == 1: if ftype == TType.I32: self.type = iprot.readI32() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.STRING: self.inviteeEmail = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 11: if ftype == TType.STRING: self.inviterMid = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) elif fid == 12: if ftype == TType.STRING: self.roomId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() else: iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() iprot.readStructEnd() def write(self, oprot): if oprot._fast_encode is not None and self.thrift_spec is not None: oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) return oprot.writeStructBegin('WapInvitation') if self.type is not None: oprot.writeFieldBegin('type', TType.I32, 1) oprot.writeI32(self.type) oprot.writeFieldEnd() if self.inviteeEmail is not None: oprot.writeFieldBegin('inviteeEmail', TType.STRING, 10) oprot.writeString(self.inviteeEmail.encode('utf-8') if sys.version_info[0] == 2 else self.inviteeEmail) oprot.writeFieldEnd() if self.inviterMid is not None: oprot.writeFieldBegin('inviterMid', TType.STRING, 11) oprot.writeString(self.inviterMid.encode('utf-8') if sys.version_info[0] == 2 else self.inviterMid) oprot.writeFieldEnd() if self.roomId is not None: oprot.writeFieldBegin('roomId', TType.STRING, 12) oprot.writeString(self.roomId.encode('utf-8') if sys.version_info[0] == 2 else self.roomId) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() def validate(self): return def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.items()] return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) def __eq__(self, other): return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ def __ne__(self, other): return not (self == other) all_structs.append(AgeCheckDocomoResult) AgeCheckDocomoResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'authUrl', 'UTF8', None, ), # 1 (2, TType.I32, 'userAgeType', None, None, ), # 2 ) all_structs.append(AgeCheckRequestResult) AgeCheckRequestResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'authUrl', 'UTF8', None, ), # 1 (2, TType.STRING, 'sessionId', 'UTF8', None, ), # 2 ) all_structs.append(Announcement) Announcement.thrift_spec = ( None, # 0 (1, TType.I32, 'index', None, None, ), # 1 None, # 2 None, # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.BOOL, 'forceUpdate', None, None, ), # 10 (11, TType.STRING, 'title', 'UTF8', None, ), # 11 (12, TType.STRING, 'text', 'UTF8', None, ), # 12 (13, TType.I64, 'createdTime', None, None, ), # 13 (14, TType.STRING, 'pictureUrl', 'UTF8', None, ), # 14 (15, TType.STRING, 'thumbnailUrl', 'UTF8', None, ), # 15 ) all_structs.append(ChannelProvider) ChannelProvider.thrift_spec = ( None, # 0 (1, TType.STRING, 'name', 'UTF8', None, ), # 1 ) all_structs.append(ChannelInfo) ChannelInfo.thrift_spec = ( None, # 0 (1, TType.STRING, 'channelId', 'UTF8', None, ), # 1 None, # 2 (3, TType.STRING, 'name', 'UTF8', None, ), # 3 (4, TType.STRING, 'entryPageUrl', 'UTF8', None, ), # 4 (5, TType.STRING, 'descriptionText', 'UTF8', None, ), # 5 (6, TType.STRUCT, 'provider', [ChannelProvider, None], None, ), # 6 (7, TType.I32, 'publicType', None, None, ), # 7 (8, TType.STRING, 'iconImage', 'UTF8', None, ), # 8 (9, TType.LIST, 'permissions', (TType.STRING, 'UTF8', False), None, ), # 9 None, # 10 (11, TType.STRING, 'iconThumbnailImage', 'UTF8', None, ), # 11 (12, TType.LIST, 'channelConfigurations', (TType.I32, None, False), None, ), # 12 ) all_structs.append(ApprovedChannelInfo) ApprovedChannelInfo.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'channelInfo', [ChannelInfo, None], None, ), # 1 (2, TType.I64, 'approvedAt', None, None, ), # 2 ) all_structs.append(ApprovedChannelInfos) ApprovedChannelInfos.thrift_spec = ( None, # 0 (1, TType.LIST, 'approvedChannelInfos', (TType.STRUCT, [ApprovedChannelInfo, None], False), None, ), # 1 (2, TType.I64, 'revision', None, None, ), # 2 ) all_structs.append(AuthQrcode) AuthQrcode.thrift_spec = ( None, # 0 (1, TType.STRING, 'qrcode', 'UTF8', None, ), # 1 (2, TType.STRING, 'verifier', 'UTF8', None, ), # 2 ) all_structs.append(BuddyBanner) BuddyBanner.thrift_spec = ( None, # 0 (1, TType.I32, 'buddyBannerLinkType', None, None, ), # 1 (2, TType.STRING, 'buddyBannerLink', 'UTF8', None, ), # 2 (3, TType.STRING, 'buddyBannerImageUrl', 'UTF8', None, ), # 3 ) all_structs.append(BuddyDetail) BuddyDetail.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 (2, TType.I64, 'memberCount', None, None, ), # 2 (3, TType.BOOL, 'onAir', None, None, ), # 3 (4, TType.BOOL, 'businessAccount', None, None, ), # 4 (5, TType.BOOL, 'addable', None, None, ), # 5 (6, TType.SET, 'acceptableContentTypes', (TType.I32, None, False), None, ), # 6 (7, TType.BOOL, 'capableMyhome', None, None, ), # 7 ) all_structs.append(Contact) Contact.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 (2, TType.I64, 'createdTime', None, None, ), # 2 None, # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.I32, 'type', None, None, ), # 10 (11, TType.I32, 'status', None, None, ), # 11 None, # 12 None, # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 None, # 20 (21, TType.I32, 'relation', None, None, ), # 21 (22, TType.STRING, 'displayName', 'UTF8', None, ), # 22 (23, TType.STRING, 'phoneticName', 'UTF8', None, ), # 23 (24, TType.STRING, 'pictureStatus', 'UTF8', None, ), # 24 (25, TType.STRING, 'thumbnailUrl', 'UTF8', None, ), # 25 (26, TType.STRING, 'statusMessage', 'UTF8', None, ), # 26 (27, TType.STRING, 'displayNameOverridden', 'UTF8', None, ), # 27 (28, TType.I64, 'favoriteTime', None, None, ), # 28 None, # 29 None, # 30 (31, TType.BOOL, 'capableVoiceCall', None, None, ), # 31 (32, TType.BOOL, 'capableVideoCall', None, None, ), # 32 (33, TType.BOOL, 'capableMyhome', None, None, ), # 33 (34, TType.BOOL, 'capableBuddy', None, None, ), # 34 (35, TType.I32, 'attributes', None, None, ), # 35 (36, TType.I64, 'settings', None, None, ), # 36 (37, TType.STRING, 'picturePath', 'UTF8', None, ), # 37 ) all_structs.append(BuddyList) BuddyList.thrift_spec = ( None, # 0 (1, TType.STRING, 'classification', 'UTF8', None, ), # 1 (2, TType.STRING, 'displayName', 'UTF8', None, ), # 2 (3, TType.I32, 'totalBuddyCount', None, None, ), # 3 (4, TType.LIST, 'popularContacts', (TType.STRUCT, [Contact, None], False), None, ), # 4 ) all_structs.append(Location) Location.thrift_spec = ( None, # 0 (1, TType.STRING, 'title', 'UTF8', None, ), # 1 (2, TType.STRING, 'address', 'UTF8', None, ), # 2 (3, TType.DOUBLE, 'latitude', None, None, ), # 3 (4, TType.DOUBLE, 'longitude', None, None, ), # 4 (5, TType.STRING, 'phone', 'UTF8', None, ), # 5 ) all_structs.append(BuddyMessageRequest) BuddyMessageRequest.thrift_spec = ( None, # 0 (1, TType.I32, 'contentType', None, None, ), # 1 (2, TType.STRING, 'text', 'UTF8', None, ), # 2 (3, TType.STRUCT, 'location', [Location, None], None, ), # 3 (4, TType.STRING, 'content', 'BINARY', None, ), # 4 (5, TType.MAP, 'contentMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 5 ) all_structs.append(BuddyOnAirUrls) BuddyOnAirUrls.thrift_spec = ( None, # 0 (1, TType.MAP, 'hls', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 1 (2, TType.MAP, 'smoothStreaming', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 ) all_structs.append(BuddyOnAir) BuddyOnAir.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 None, # 2 (3, TType.I64, 'freshnessLifetime', None, None, ), # 3 (4, TType.STRING, 'onAirId', 'UTF8', None, ), # 4 (5, TType.BOOL, 'onAir', None, None, ), # 5 None, # 6 None, # 7 None, # 8 None, # 9 None, # 10 (11, TType.STRING, 'text', 'UTF8', None, ), # 11 (12, TType.I64, 'viewerCount', None, None, ), # 12 (13, TType.I64, 'targetCount', None, None, ), # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 None, # 20 None, # 21 None, # 22 None, # 23 None, # 24 None, # 25 None, # 26 None, # 27 None, # 28 None, # 29 None, # 30 (31, TType.I32, 'onAirType', None, None, ), # 31 (32, TType.STRUCT, 'onAirUrls', [BuddyOnAirUrls, None], None, ), # 32 ) all_structs.append(BuddyProfile) BuddyProfile.thrift_spec = ( None, # 0 (1, TType.STRING, 'buddyId', 'UTF8', None, ), # 1 (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 (3, TType.STRING, 'searchId', 'UTF8', None, ), # 3 (4, TType.STRING, 'displayName', 'UTF8', None, ), # 4 (5, TType.STRING, 'statusMessage', 'UTF8', None, ), # 5 None, # 6 None, # 7 None, # 8 None, # 9 None, # 10 (11, TType.I64, 'contactCount', None, None, ), # 11 ) all_structs.append(BuddySearchResult) BuddySearchResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 (2, TType.STRING, 'displayName', 'UTF8', None, ), # 2 (3, TType.STRING, 'pictureStatus', 'UTF8', None, ), # 3 (4, TType.STRING, 'picturePath', 'UTF8', None, ), # 4 (5, TType.STRING, 'statusMessage', 'UTF8', None, ), # 5 (6, TType.BOOL, 'businessAccount', None, None, ), # 6 ) all_structs.append(ChannelDomain) ChannelDomain.thrift_spec = ( None, # 0 (1, TType.STRING, 'host', 'UTF8', None, ), # 1 (2, TType.BOOL, 'removed', None, None, ), # 2 ) all_structs.append(ChannelDomains) ChannelDomains.thrift_spec = ( None, # 0 (1, TType.LIST, 'channelDomains', (TType.STRUCT, [ChannelDomain, None], False), None, ), # 1 (2, TType.I64, 'revision', None, None, ), # 2 ) all_structs.append(ChannelException) ChannelException.thrift_spec = ( None, # 0 (1, TType.I32, 'code', None, None, ), # 1 (2, TType.STRING, 'reason', 'UTF8', None, ), # 2 (3, TType.MAP, 'parameterMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 ) all_structs.append(ChannelInfos) ChannelInfos.thrift_spec = ( None, # 0 (1, TType.LIST, 'channelInfos', (TType.STRUCT, [ChannelInfo, None], False), None, ), # 1 (2, TType.I64, 'revision', None, None, ), # 2 ) all_structs.append(ChannelNotificationSetting) ChannelNotificationSetting.thrift_spec = ( None, # 0 (1, TType.STRING, 'channelId', 'UTF8', None, ), # 1 (2, TType.STRING, 'name', 'UTF8', None, ), # 2 (3, TType.BOOL, 'notificationReceivable', None, None, ), # 3 (4, TType.BOOL, 'messageReceivable', None, None, ), # 4 (5, TType.BOOL, 'showDefault', None, None, ), # 5 ) all_structs.append(ChannelSyncDatas) ChannelSyncDatas.thrift_spec = ( None, # 0 (1, TType.LIST, 'channelInfos', (TType.STRUCT, [ChannelInfo, None], False), None, ), # 1 (2, TType.LIST, 'channelDomains', (TType.STRUCT, [ChannelDomain, None], False), None, ), # 2 (3, TType.I64, 'revision', None, None, ), # 3 (4, TType.I64, 'expires', None, None, ), # 4 ) all_structs.append(ChannelToken) ChannelToken.thrift_spec = ( None, # 0 (1, TType.STRING, 'token', 'UTF8', None, ), # 1 (2, TType.STRING, 'obsToken', 'UTF8', None, ), # 2 (3, TType.I64, 'expiration', None, None, ), # 3 (4, TType.STRING, 'refreshToken', 'UTF8', None, ), # 4 (5, TType.STRING, 'channelAccessToken', 'UTF8', None, ), # 5 ) all_structs.append(Coin) Coin.thrift_spec = ( None, # 0 (1, TType.I32, 'freeCoinBalance', None, None, ), # 1 (2, TType.I32, 'payedCoinBalance', None, None, ), # 2 (3, TType.I32, 'totalCoinBalance', None, None, ), # 3 (4, TType.I32, 'rewardCoinBalance', None, None, ), # 4 ) all_structs.append(CoinPayLoad) CoinPayLoad.thrift_spec = ( None, # 0 (1, TType.I32, 'payCoin', None, None, ), # 1 (2, TType.I32, 'freeCoin', None, None, ), # 2 (3, TType.I32, 'type', None, None, ), # 3 (4, TType.I32, 'rewardCoin', None, None, ), # 4 ) all_structs.append(CoinHistory) CoinHistory.thrift_spec = ( None, # 0 (1, TType.I64, 'payDate', None, None, ), # 1 (2, TType.I32, 'coinBalance', None, None, ), # 2 (3, TType.I32, 'coin', None, None, ), # 3 (4, TType.STRING, 'price', 'UTF8', None, ), # 4 (5, TType.STRING, 'title', 'UTF8', None, ), # 5 (6, TType.BOOL, 'refund', None, None, ), # 6 (7, TType.STRING, 'paySeq', 'UTF8', None, ), # 7 (8, TType.STRING, 'currency', 'UTF8', None, ), # 8 (9, TType.STRING, 'currencySign', 'UTF8', None, ), # 9 (10, TType.STRING, 'displayPrice', 'UTF8', None, ), # 10 (11, TType.STRUCT, 'payload', [CoinPayLoad, None], None, ), # 11 (12, TType.STRING, 'channelId', 'UTF8', None, ), # 12 ) all_structs.append(CoinHistoryCondition) CoinHistoryCondition.thrift_spec = ( None, # 0 (1, TType.I64, 'start', None, None, ), # 1 (2, TType.I32, 'size', None, None, ), # 2 (3, TType.STRING, 'language', 'UTF8', None, ), # 3 (4, TType.STRING, 'eddt', 'UTF8', None, ), # 4 (5, TType.I32, 'appStoreCode', None, None, ), # 5 ) all_structs.append(CoinHistoryResult) CoinHistoryResult.thrift_spec = ( None, # 0 (1, TType.LIST, 'historys', (TType.STRUCT, [CoinHistory, None], False), None, ), # 1 (2, TType.STRUCT, 'balance', [Coin, None], None, ), # 2 (3, TType.BOOL, 'hasNext', None, None, ), # 3 ) all_structs.append(CoinProductItem) CoinProductItem.thrift_spec = ( None, # 0 (1, TType.STRING, 'itemId', 'UTF8', None, ), # 1 (2, TType.I32, 'coin', None, None, ), # 2 (3, TType.I32, 'freeCoin', None, None, ), # 3 None, # 4 (5, TType.STRING, 'currency', 'UTF8', None, ), # 5 (6, TType.STRING, 'price', 'UTF8', None, ), # 6 (7, TType.STRING, 'displayPrice', 'UTF8', None, ), # 7 (8, TType.STRING, 'name', 'UTF8', None, ), # 8 (9, TType.STRING, 'desc', 'UTF8', None, ), # 9 ) all_structs.append(CoinPurchaseConfirm) CoinPurchaseConfirm.thrift_spec = ( None, # 0 (1, TType.STRING, 'orderId', 'UTF8', None, ), # 1 (2, TType.I32, 'appStoreCode', None, None, ), # 2 (3, TType.STRING, 'receipt', 'UTF8', None, ), # 3 (4, TType.STRING, 'signature', 'UTF8', None, ), # 4 (5, TType.STRING, 'seller', 'UTF8', None, ), # 5 (6, TType.STRING, 'requestType', 'UTF8', None, ), # 6 (7, TType.BOOL, 'ignoreReceipt', None, None, ), # 7 ) all_structs.append(CoinPurchaseReservation) CoinPurchaseReservation.thrift_spec = ( None, # 0 (1, TType.STRING, 'productId', 'UTF8', None, ), # 1 (2, TType.STRING, 'country', 'UTF8', None, ), # 2 (3, TType.STRING, 'currency', 'UTF8', None, ), # 3 (4, TType.STRING, 'price', 'UTF8', None, ), # 4 (5, TType.I32, 'appStoreCode', None, None, ), # 5 (6, TType.STRING, 'language', 'UTF8', None, ), # 6 (7, TType.I32, 'pgCode', None, None, ), # 7 (8, TType.STRING, 'redirectUrl', 'UTF8', None, ), # 8 ) all_structs.append(CoinUseReservationItem) CoinUseReservationItem.thrift_spec = ( None, # 0 (1, TType.STRING, 'itemId', 'UTF8', None, ), # 1 (2, TType.STRING, 'itemName', 'UTF8', None, ), # 2 (3, TType.I32, 'amount', None, None, ), # 3 ) all_structs.append(CoinUseReservation) CoinUseReservation.thrift_spec = ( None, # 0 (1, TType.STRING, 'channelId', 'UTF8', None, ), # 1 (2, TType.STRING, 'shopOrderId', 'UTF8', None, ), # 2 (3, TType.I32, 'appStoreCode', None, None, ), # 3 (4, TType.LIST, 'items', (TType.STRUCT, [CoinUseReservationItem, None], False), None, ), # 4 (5, TType.STRING, 'country', 'UTF8', None, ), # 5 ) all_structs.append(CompactContact) CompactContact.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 (2, TType.I64, 'createdTime', None, None, ), # 2 (3, TType.I64, 'modifiedTime', None, None, ), # 3 (4, TType.I32, 'status', None, None, ), # 4 (5, TType.I64, 'settings', None, None, ), # 5 (6, TType.STRING, 'displayNameOverridden', 'UTF8', None, ), # 6 ) all_structs.append(ContactModification) ContactModification.thrift_spec = ( None, # 0 (1, TType.I32, 'type', None, None, ), # 1 (2, TType.STRING, 'luid', 'UTF8', None, ), # 2 None, # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 None, # 10 (11, TType.LIST, 'phones', (TType.STRING, 'UTF8', False), None, ), # 11 (12, TType.LIST, 'emails', (TType.STRING, 'UTF8', False), None, ), # 12 (13, TType.LIST, 'userids', (TType.STRING, 'UTF8', False), None, ), # 13 ) all_structs.append(ContactRegistration) ContactRegistration.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'contact', [Contact, None], None, ), # 1 None, # 2 None, # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.STRING, 'luid', 'UTF8', None, ), # 10 (11, TType.I32, 'contactType', None, None, ), # 11 (12, TType.STRING, 'contactKey', 'UTF8', None, ), # 12 ) all_structs.append(ContactReport) ContactReport.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 (2, TType.BOOL, 'exists', None, None, ), # 2 (3, TType.STRUCT, 'contact', [Contact, None], None, ), # 3 ) all_structs.append(ContactReportResult) ContactReportResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 (2, TType.BOOL, 'exists', None, None, ), # 2 ) all_structs.append(DeviceInfo) DeviceInfo.thrift_spec = ( None, # 0 (1, TType.STRING, 'deviceName', 'UTF8', None, ), # 1 (2, TType.STRING, 'systemName', 'UTF8', None, ), # 2 (3, TType.STRING, 'systemVersion', 'UTF8', None, ), # 3 (4, TType.STRING, 'model', 'UTF8', None, ), # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.I32, 'carrierCode', None, None, ), # 10 (11, TType.STRING, 'carrierName', 'UTF8', None, ), # 11 None, # 12 None, # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 (20, TType.I32, 'applicationType', None, None, ), # 20 ) all_structs.append(EmailConfirmation) EmailConfirmation.thrift_spec = ( None, # 0 (1, TType.BOOL, 'usePasswordSet', None, None, ), # 1 (2, TType.STRING, 'email', 'UTF8', None, ), # 2 (3, TType.STRING, 'password', 'UTF8', None, ), # 3 (4, TType.BOOL, 'ignoreDuplication', None, None, ), # 4 ) all_structs.append(EmailConfirmationSession) EmailConfirmationSession.thrift_spec = ( None, # 0 (1, TType.I32, 'emailConfirmationType', None, None, ), # 1 (2, TType.STRING, 'verifier', 'UTF8', None, ), # 2 (3, TType.STRING, 'targetEmail', 'UTF8', None, ), # 3 ) all_structs.append(FriendChannelMatrix) FriendChannelMatrix.thrift_spec = ( None, # 0 (1, TType.STRING, 'channelId', 'UTF8', None, ), # 1 (2, TType.STRING, 'representMid', 'UTF8', None, ), # 2 (3, TType.I32, 'count', None, None, ), # 3 ) all_structs.append(FriendChannelMatricesResponse) FriendChannelMatricesResponse.thrift_spec = ( None, # 0 (1, TType.I64, 'expires', None, None, ), # 1 (2, TType.LIST, 'matrices', (TType.STRUCT, [FriendChannelMatrix, None], False), None, ), # 2 ) all_structs.append(Geolocation) Geolocation.thrift_spec = ( None, # 0 (1, TType.DOUBLE, 'longitude', None, None, ), # 1 (2, TType.DOUBLE, 'latitude', None, None, ), # 2 ) all_structs.append(NotificationTarget) NotificationTarget.thrift_spec = ( None, # 0 (1, TType.STRING, 'applicationType', 'UTF8', None, ), # 1 (2, TType.STRING, 'applicationVersion', 'UTF8', None, ), # 2 (3, TType.STRING, 'region', 'UTF8', None, ), # 3 ) all_structs.append(GlobalEvent) GlobalEvent.thrift_spec = ( None, # 0 (1, TType.STRING, 'key', 'UTF8', None, ), # 1 (2, TType.LIST, 'targets', (TType.STRUCT, [NotificationTarget, None], False), None, ), # 2 (3, TType.I64, 'createdTime', None, None, ), # 3 (4, TType.I64, 'data', None, None, ), # 4 (5, TType.I32, 'maxDelay', None, None, ), # 5 ) all_structs.append(GroupPreference) GroupPreference.thrift_spec = ( None, # 0 (1, TType.STRING, 'invitationTicket', 'UTF8', None, ), # 1 (2, TType.I64, 'favoriteTimestamp', None, None, ), # 2 ) all_structs.append(Group) Group.thrift_spec = ( None, # 0 (1, TType.STRING, 'id', 'UTF8', None, ), # 1 (2, TType.I64, 'createdTime', None, None, ), # 2 None, # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.STRING, 'name', 'UTF8', None, ), # 10 (11, TType.STRING, 'pictureStatus', 'UTF8', None, ), # 11 (12, TType.BOOL, 'preventJoinByTicket', None, None, ), # 12 (13, TType.STRUCT, 'groupPreference', [GroupPreference, None], None, ), # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 (20, TType.LIST, 'members', (TType.STRUCT, [Contact, None], False), None, ), # 20 (21, TType.STRUCT, 'creator', [Contact, None], None, ), # 21 (22, TType.LIST, 'invitee', (TType.STRUCT, [Contact, None], False), None, ), # 22 None, # 23 None, # 24 None, # 25 None, # 26 None, # 27 None, # 28 None, # 29 None, # 30 (31, TType.BOOL, 'notificationDisabled', None, None, ), # 31 ) all_structs.append(IdentityCredential) IdentityCredential.thrift_spec = ( None, # 0 (1, TType.I32, 'provider', None, None, ), # 1 (2, TType.STRING, 'identifier', 'UTF8', None, ), # 2 (3, TType.STRING, 'password', 'UTF8', None, ), # 3 ) all_structs.append(LastReadMessageId) LastReadMessageId.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 (2, TType.STRING, 'lastReadMessageId', 'UTF8', None, ), # 2 ) all_structs.append(LastReadMessageIds) LastReadMessageIds.thrift_spec = ( None, # 0 (1, TType.STRING, 'chatId', 'UTF8', None, ), # 1 (2, TType.LIST, 'lastReadMessageIds', (TType.STRUCT, [LastReadMessageId, None], False), None, ), # 2 ) all_structs.append(LoginResult) LoginResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'authToken', 'UTF8', None, ), # 1 (2, TType.STRING, 'certificate', 'UTF8', None, ), # 2 (3, TType.STRING, 'verifier', 'UTF8', None, ), # 3 (4, TType.STRING, 'pinCode', 'UTF8', None, ), # 4 (5, TType.I32, 'type', None, None, ), # 5 ) all_structs.append(LoginSession) LoginSession.thrift_spec = ( None, # 0 (1, TType.STRING, 'tokenKey', 'UTF8', None, ), # 1 None, # 2 (3, TType.I64, 'expirationTime', None, None, ), # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 None, # 10 (11, TType.I32, 'applicationType', None, None, ), # 11 (12, TType.STRING, 'systemName', 'UTF8', None, ), # 12 None, # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 None, # 20 None, # 21 (22, TType.STRING, 'accessLocation', 'UTF8', None, ), # 22 ) all_structs.append(Message) Message.thrift_spec = ( None, # 0 (1, TType.STRING, 'from_', 'UTF8', None, ), # 1 (2, TType.STRING, 'to', 'UTF8', None, ), # 2 (3, TType.I32, 'toType', None, None, ), # 3 (4, TType.STRING, 'id', 'UTF8', None, ), # 4 (5, TType.I64, 'createdTime', None, None, ), # 5 (6, TType.I64, 'deliveredTime', None, None, ), # 6 None, # 7 None, # 8 None, # 9 (10, TType.STRING, 'text', 'UTF8', None, ), # 10 (11, TType.STRUCT, 'location', [Location, None], None, ), # 11 None, # 12 None, # 13 (14, TType.BOOL, 'hasContent', None, None, ), # 14 (15, TType.I32, 'contentType', None, None, ), # 15 None, # 16 (17, TType.STRING, 'contentPreview', 'BINARY', None, ), # 17 (18, TType.MAP, 'contentMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 18 ) all_structs.append(MessageOperation) MessageOperation.thrift_spec = ( None, # 0 (1, TType.I64, 'revision', None, None, ), # 1 (2, TType.I64, 'createdTime', None, None, ), # 2 (3, TType.I32, 'type', None, None, ), # 3 (4, TType.I32, 'reqSeq', None, None, ), # 4 (5, TType.I32, 'status', None, None, ), # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.STRING, 'param1', 'UTF8', None, ), # 10 (11, TType.STRING, 'param2', 'UTF8', None, ), # 11 (12, TType.STRING, 'param3', 'UTF8', None, ), # 12 None, # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 (20, TType.STRUCT, 'message', [Message, None], None, ), # 20 ) all_structs.append(MessageOperations) MessageOperations.thrift_spec = ( None, # 0 (1, TType.LIST, 'operations', (TType.STRUCT, [MessageOperation, None], False), None, ), # 1 (2, TType.BOOL, 'endFlag', None, None, ), # 2 ) all_structs.append(MetaProfile) MetaProfile.thrift_spec = ( None, # 0 (1, TType.I64, 'createTime', None, None, ), # 1 (2, TType.STRING, 'regionCode', 'UTF8', None, ), # 2 (3, TType.MAP, 'identities', (TType.I32, None, TType.STRING, 'UTF8', False), None, ), # 3 ) all_structs.append(NotificationItem) NotificationItem.thrift_spec = ( None, # 0 (1, TType.STRING, 'id', 'UTF8', None, ), # 1 (2, TType.STRING, 'from_', 'UTF8', None, ), # 2 (3, TType.STRING, 'to', 'UTF8', None, ), # 3 (4, TType.STRING, 'fromChannel', 'UTF8', None, ), # 4 (5, TType.STRING, 'toChannel', 'UTF8', None, ), # 5 None, # 6 (7, TType.I64, 'revision', None, None, ), # 7 (8, TType.I64, 'createdTime', None, None, ), # 8 (9, TType.MAP, 'content', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 9 ) all_structs.append(NotificationFetchResult) NotificationFetchResult.thrift_spec = ( None, # 0 (1, TType.I32, 'fetchMode', None, None, ), # 1 (2, TType.LIST, 'itemList', (TType.STRUCT, [NotificationItem, None], False), None, ), # 2 ) all_structs.append(Operation) Operation.thrift_spec = ( None, # 0 (1, TType.I64, 'revision', None, None, ), # 1 (2, TType.I64, 'createdTime', None, None, ), # 2 (3, TType.I32, 'type', None, None, ), # 3 (4, TType.I32, 'reqSeq', None, None, ), # 4 (5, TType.STRING, 'checksum', 'UTF8', None, ), # 5 None, # 6 (7, TType.I32, 'status', None, None, ), # 7 None, # 8 None, # 9 (10, TType.STRING, 'param1', 'UTF8', None, ), # 10 (11, TType.STRING, 'param2', 'UTF8', None, ), # 11 (12, TType.STRING, 'param3', 'UTF8', None, ), # 12 None, # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 (20, TType.STRUCT, 'message', [Message, None], None, ), # 20 ) all_structs.append(PaymentReservation) PaymentReservation.thrift_spec = ( None, # 0 (1, TType.STRING, 'receiverMid', 'UTF8', None, ), # 1 (2, TType.STRING, 'productId', 'UTF8', None, ), # 2 (3, TType.STRING, 'language', 'UTF8', None, ), # 3 (4, TType.STRING, 'location', 'UTF8', None, ), # 4 (5, TType.STRING, 'currency', 'UTF8', None, ), # 5 (6, TType.STRING, 'price', 'UTF8', None, ), # 6 (7, TType.I32, 'appStoreCode', None, None, ), # 7 (8, TType.STRING, 'messageText', 'UTF8', None, ), # 8 (9, TType.I32, 'messageTemplate', None, None, ), # 9 (10, TType.I64, 'packageId', None, None, ), # 10 ) all_structs.append(PaymentReservationResult) PaymentReservationResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'orderId', 'UTF8', None, ), # 1 (2, TType.STRING, 'confirmUrl', 'UTF8', None, ), # 2 (3, TType.MAP, 'extras', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 ) all_structs.append(Product) Product.thrift_spec = ( None, # 0 (1, TType.STRING, 'productId', 'UTF8', None, ), # 1 (2, TType.I64, 'packageId', None, None, ), # 2 (3, TType.I32, 'version', None, None, ), # 3 (4, TType.STRING, 'authorName', 'UTF8', None, ), # 4 (5, TType.BOOL, 'onSale', None, None, ), # 5 (6, TType.I32, 'validDays', None, None, ), # 6 (7, TType.I32, 'saleType', None, None, ), # 7 (8, TType.STRING, 'copyright', 'UTF8', None, ), # 8 (9, TType.STRING, 'title', 'UTF8', None, ), # 9 (10, TType.STRING, 'descriptionText', 'UTF8', None, ), # 10 (11, TType.I64, 'shopOrderId', None, None, ), # 11 (12, TType.STRING, 'fromMid', 'UTF8', None, ), # 12 (13, TType.STRING, 'toMid', 'UTF8', None, ), # 13 (14, TType.I64, 'validUntil', None, None, ), # 14 (15, TType.I32, 'priceTier', None, None, ), # 15 (16, TType.STRING, 'price', 'UTF8', None, ), # 16 (17, TType.STRING, 'currency', 'UTF8', None, ), # 17 (18, TType.STRING, 'currencySymbol', 'UTF8', None, ), # 18 (19, TType.I32, 'paymentType', None, None, ), # 19 (20, TType.I64, 'createDate', None, None, ), # 20 (21, TType.BOOL, 'ownFlag', None, None, ), # 21 (22, TType.I32, 'eventType', None, None, ), # 22 (23, TType.STRING, 'urlSchema', 'UTF8', None, ), # 23 (24, TType.STRING, 'downloadUrl', 'UTF8', None, ), # 24 (25, TType.STRING, 'buddyMid', 'UTF8', None, ), # 25 (26, TType.I64, 'publishSince', None, None, ), # 26 (27, TType.BOOL, 'newFlag', None, None, ), # 27 (28, TType.BOOL, 'missionFlag', None, None, ), # 28 ) all_structs.append(ProductList) ProductList.thrift_spec = ( None, # 0 (1, TType.BOOL, 'hasNext', None, None, ), # 1 None, # 2 None, # 3 (4, TType.I64, 'bannerSequence', None, None, ), # 4 (5, TType.I32, 'bannerTargetType', None, None, ), # 5 (6, TType.STRING, 'bannerTargetPath', 'UTF8', None, ), # 6 (7, TType.LIST, 'productList', (TType.STRUCT, [Product, None], False), None, ), # 7 (8, TType.STRING, 'bannerLang', 'UTF8', None, ), # 8 ) all_structs.append(ProductSimple) ProductSimple.thrift_spec = ( None, # 0 (1, TType.STRING, 'productId', 'UTF8', None, ), # 1 (2, TType.I64, 'packageId', None, None, ), # 2 (3, TType.I32, 'version', None, None, ), # 3 (4, TType.BOOL, 'onSale', None, None, ), # 4 (5, TType.I64, 'validUntil', None, None, ), # 5 ) all_structs.append(ProductSimpleList) ProductSimpleList.thrift_spec = ( None, # 0 (1, TType.BOOL, 'hasNext', None, None, ), # 1 (2, TType.I32, 'reinvokeHour', None, None, ), # 2 (3, TType.I64, 'lastVersionSeq', None, None, ), # 3 (4, TType.LIST, 'productList', (TType.STRUCT, [ProductSimple, None], False), None, ), # 4 (5, TType.I64, 'recentNewReleaseDate', None, None, ), # 5 (6, TType.I64, 'recentEventReleaseDate', None, None, ), # 6 ) all_structs.append(Profile) Profile.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 None, # 2 (3, TType.STRING, 'userid', 'UTF8', None, ), # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.STRING, 'phone', 'UTF8', None, ), # 10 (11, TType.STRING, 'email', 'UTF8', None, ), # 11 (12, TType.STRING, 'regionCode', 'UTF8', None, ), # 12 None, # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 (20, TType.STRING, 'displayName', 'UTF8', None, ), # 20 (21, TType.STRING, 'phoneticName', 'UTF8', None, ), # 21 (22, TType.STRING, 'pictureStatus', 'UTF8', None, ), # 22 (23, TType.STRING, 'thumbnailUrl', 'UTF8', None, ), # 23 (24, TType.STRING, 'statusMessage', 'UTF8', None, ), # 24 None, # 25 None, # 26 None, # 27 None, # 28 None, # 29 None, # 30 (31, TType.BOOL, 'allowSearchByUserid', None, None, ), # 31 (32, TType.BOOL, 'allowSearchByEmail', None, None, ), # 32 (33, TType.STRING, 'picturePath', 'UTF8', None, ), # 33 ) all_structs.append(ProximityMatchCandidateResult) ProximityMatchCandidateResult.thrift_spec = ( None, # 0 (1, TType.LIST, 'users', (TType.STRUCT, [Contact, None], False), None, ), # 1 (2, TType.LIST, 'buddies', (TType.STRUCT, [Contact, None], False), None, ), # 2 ) all_structs.append(RegisterWithSnsIdResult) RegisterWithSnsIdResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'authToken', 'UTF8', None, ), # 1 (2, TType.BOOL, 'userCreated', None, None, ), # 2 ) all_structs.append(RequestTokenResponse) RequestTokenResponse.thrift_spec = ( None, # 0 (1, TType.STRING, 'requestToken', 'UTF8', None, ), # 1 (2, TType.STRING, 'returnUrl', 'UTF8', None, ), # 2 ) all_structs.append(Room) Room.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 (2, TType.I64, 'createdTime', None, None, ), # 2 None, # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.LIST, 'contacts', (TType.STRUCT, [Contact, None], False), None, ), # 10 None, # 11 None, # 12 None, # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 None, # 20 None, # 21 None, # 22 None, # 23 None, # 24 None, # 25 None, # 26 None, # 27 None, # 28 None, # 29 None, # 30 (31, TType.BOOL, 'notificationDisabled', None, None, ), # 31 ) all_structs.append(RSAKey) RSAKey.thrift_spec = ( None, # 0 (1, TType.STRING, 'keynm', 'UTF8', None, ), # 1 (2, TType.STRING, 'nvalue', 'UTF8', None, ), # 2 (3, TType.STRING, 'evalue', 'UTF8', None, ), # 3 (4, TType.STRING, 'sessionKey', 'UTF8', None, ), # 4 ) all_structs.append(SendBuddyMessageResult) SendBuddyMessageResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'requestId', 'UTF8', None, ), # 1 (2, TType.I32, 'state', None, None, ), # 2 (3, TType.STRING, 'messageId', 'UTF8', None, ), # 3 (4, TType.I32, 'eventNo', None, None, ), # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 None, # 10 (11, TType.I64, 'receiverCount', None, None, ), # 11 (12, TType.I64, 'successCount', None, None, ), # 12 (13, TType.I64, 'failCount', None, None, ), # 13 (14, TType.I64, 'cancelCount', None, None, ), # 14 (15, TType.I64, 'blockCount', None, None, ), # 15 (16, TType.I64, 'unregisterCount', None, None, ), # 16 None, # 17 None, # 18 None, # 19 None, # 20 (21, TType.I64, 'timestamp', None, None, ), # 21 (22, TType.STRING, 'message', 'UTF8', None, ), # 22 ) all_structs.append(SetBuddyOnAirResult) SetBuddyOnAirResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'requestId', 'UTF8', None, ), # 1 (2, TType.I32, 'state', None, None, ), # 2 (3, TType.I32, 'eventNo', None, None, ), # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 None, # 10 (11, TType.I64, 'receiverCount', None, None, ), # 11 (12, TType.I64, 'successCount', None, None, ), # 12 (13, TType.I64, 'failCount', None, None, ), # 13 (14, TType.I64, 'cancelCount', None, None, ), # 14 (15, TType.I64, 'unregisterCount', None, None, ), # 15 None, # 16 None, # 17 None, # 18 None, # 19 None, # 20 (21, TType.I64, 'timestamp', None, None, ), # 21 (22, TType.STRING, 'message', 'UTF8', None, ), # 22 ) all_structs.append(Settings) Settings.thrift_spec = ( None, # 0 None, # 1 None, # 2 None, # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.BOOL, 'notificationEnable', None, None, ), # 10 (11, TType.I64, 'notificationMuteExpiration', None, None, ), # 11 (12, TType.BOOL, 'notificationNewMessage', None, None, ), # 12 (13, TType.BOOL, 'notificationGroupInvitation', None, None, ), # 13 (14, TType.BOOL, 'notificationShowMessage', None, None, ), # 14 (15, TType.BOOL, 'notificationIncomingCall', None, None, ), # 15 (16, TType.STRING, 'notificationSoundMessage', 'UTF8', None, ), # 16 (17, TType.STRING, 'notificationSoundGroup', 'UTF8', None, ), # 17 (18, TType.BOOL, 'notificationDisabledWithSub', None, None, ), # 18 None, # 19 (20, TType.BOOL, 'privacySyncContacts', None, None, ), # 20 (21, TType.BOOL, 'privacySearchByPhoneNumber', None, None, ), # 21 (22, TType.BOOL, 'privacySearchByUserid', None, None, ), # 22 (23, TType.BOOL, 'privacySearchByEmail', None, None, ), # 23 (24, TType.BOOL, 'privacyAllowSecondaryDeviceLogin', None, None, ), # 24 (25, TType.BOOL, 'privacyProfileImagePostToMyhome', None, None, ), # 25 (26, TType.BOOL, 'privacyReceiveMessagesFromNotFriend', None, None, ), # 26 None, # 27 None, # 28 None, # 29 (30, TType.STRING, 'contactMyTicket', 'UTF8', None, ), # 30 None, # 31 None, # 32 None, # 33 None, # 34 None, # 35 None, # 36 None, # 37 None, # 38 None, # 39 (40, TType.I32, 'identityProvider', None, None, ), # 40 (41, TType.STRING, 'identityIdentifier', 'UTF8', None, ), # 41 (42, TType.MAP, 'snsAccounts', (TType.I32, None, TType.STRING, 'UTF8', False), None, ), # 42 (43, TType.BOOL, 'phoneRegistration', None, None, ), # 43 (44, TType.I32, 'emailConfirmationStatus', None, None, ), # 44 None, # 45 None, # 46 None, # 47 None, # 48 None, # 49 (50, TType.STRING, 'preferenceLocale', 'UTF8', None, ), # 50 None, # 51 None, # 52 None, # 53 None, # 54 None, # 55 None, # 56 None, # 57 None, # 58 None, # 59 (60, TType.MAP, 'customModes', (TType.I32, None, TType.STRING, 'UTF8', False), None, ), # 60 ) all_structs.append(SimpleChannelClient) SimpleChannelClient.thrift_spec = ( None, # 0 (1, TType.STRING, 'applicationType', 'UTF8', None, ), # 1 (2, TType.STRING, 'applicationVersion', 'UTF8', None, ), # 2 (3, TType.STRING, 'locale', 'UTF8', None, ), # 3 ) all_structs.append(SimpleChannelContact) SimpleChannelContact.thrift_spec = ( None, # 0 (1, TType.STRING, 'mid', 'UTF8', None, ), # 1 (2, TType.STRING, 'displayName', 'UTF8', None, ), # 2 (3, TType.STRING, 'pictureStatus', 'UTF8', None, ), # 3 (4, TType.STRING, 'picturePath', 'UTF8', None, ), # 4 (5, TType.STRING, 'statusMessage', 'UTF8', None, ), # 5 ) all_structs.append(SnsFriend) SnsFriend.thrift_spec = ( None, # 0 (1, TType.STRING, 'snsUserId', 'UTF8', None, ), # 1 (2, TType.STRING, 'snsUserName', 'UTF8', None, ), # 2 (3, TType.I32, 'snsIdType', None, None, ), # 3 ) all_structs.append(SnsFriendContactRegistration) SnsFriendContactRegistration.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'contact', [Contact, None], None, ), # 1 (2, TType.I32, 'snsIdType', None, None, ), # 2 (3, TType.STRING, 'snsUserId', 'UTF8', None, ), # 3 ) all_structs.append(SnsFriendModification) SnsFriendModification.thrift_spec = ( None, # 0 (1, TType.I32, 'type', None, None, ), # 1 (2, TType.STRUCT, 'snsFriend', [SnsFriend, None], None, ), # 2 ) all_structs.append(SnsFriends) SnsFriends.thrift_spec = ( None, # 0 (1, TType.LIST, 'snsFriends', (TType.STRUCT, [SnsFriend, None], False), None, ), # 1 (2, TType.BOOL, 'hasMore', None, None, ), # 2 ) all_structs.append(SnsIdUserStatus) SnsIdUserStatus.thrift_spec = ( None, # 0 (1, TType.BOOL, 'userExisting', None, None, ), # 1 (2, TType.BOOL, 'phoneNumberRegistered', None, None, ), # 2 (3, TType.BOOL, 'sameDevice', None, None, ), # 3 ) all_structs.append(SnsProfile) SnsProfile.thrift_spec = ( None, # 0 (1, TType.STRING, 'snsUserId', 'UTF8', None, ), # 1 (2, TType.STRING, 'snsUserName', 'UTF8', None, ), # 2 (3, TType.STRING, 'email', 'UTF8', None, ), # 3 (4, TType.STRING, 'thumbnailUrl', 'UTF8', None, ), # 4 ) all_structs.append(SystemConfiguration) SystemConfiguration.thrift_spec = ( None, # 0 (1, TType.STRING, 'endpoint', 'UTF8', None, ), # 1 (2, TType.STRING, 'endpointSsl', 'UTF8', None, ), # 2 (3, TType.STRING, 'updateUrl', 'UTF8', None, ), # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 None, # 10 (11, TType.STRING, 'c2dmAccount', 'UTF8', None, ), # 11 (12, TType.STRING, 'nniServer', 'UTF8', None, ), # 12 ) all_structs.append(TalkException) TalkException.thrift_spec = ( None, # 0 (1, TType.I32, 'code', None, None, ), # 1 (2, TType.STRING, 'reason', 'UTF8', None, ), # 2 (3, TType.MAP, 'parameterMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 ) all_structs.append(Ticket) Ticket.thrift_spec = ( None, # 0 (1, TType.STRING, 'id', 'UTF8', None, ), # 1 None, # 2 None, # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.I64, 'expirationTime', None, None, ), # 10 None, # 11 None, # 12 None, # 13 None, # 14 None, # 15 None, # 16 None, # 17 None, # 18 None, # 19 None, # 20 (21, TType.I32, 'maxUseCount', None, None, ), # 21 ) all_structs.append(TMessageBox) TMessageBox.thrift_spec = ( None, # 0 (1, TType.STRING, 'id', 'UTF8', None, ), # 1 (2, TType.STRING, 'channelId', 'UTF8', None, ), # 2 None, # 3 None, # 4 (5, TType.I64, 'lastSeq', None, None, ), # 5 (6, TType.I64, 'unreadCount', None, None, ), # 6 (7, TType.I64, 'lastModifiedTime', None, None, ), # 7 (8, TType.I32, 'status', None, None, ), # 8 (9, TType.I32, 'midType', None, None, ), # 9 (10, TType.LIST, 'lastMessages', (TType.STRUCT, [Message, None], False), None, ), # 10 ) all_structs.append(TMessageBoxWrapUp) TMessageBoxWrapUp.thrift_spec = ( None, # 0 (1, TType.STRUCT, 'messageBox', [TMessageBox, None], None, ), # 1 (2, TType.STRING, 'name', 'UTF8', None, ), # 2 (3, TType.LIST, 'contacts', (TType.STRUCT, [Contact, None], False), None, ), # 3 (4, TType.STRING, 'pictureRevision', 'UTF8', None, ), # 4 ) all_structs.append(TMessageBoxWrapUpResponse) TMessageBoxWrapUpResponse.thrift_spec = ( None, # 0 (1, TType.LIST, 'messageBoxWrapUpList', (TType.STRUCT, [TMessageBoxWrapUp, None], False), None, ), # 1 (2, TType.I32, 'totalSize', None, None, ), # 2 ) all_structs.append(UniversalNotificationServiceException) UniversalNotificationServiceException.thrift_spec = ( None, # 0 (1, TType.I32, 'code', None, None, ), # 1 (2, TType.STRING, 'reason', 'UTF8', None, ), # 2 (3, TType.MAP, 'parameterMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 ) all_structs.append(UpdateBuddyProfileResult) UpdateBuddyProfileResult.thrift_spec = ( None, # 0 (1, TType.STRING, 'requestId', 'UTF8', None, ), # 1 (2, TType.I32, 'state', None, None, ), # 2 (3, TType.I32, 'eventNo', None, None, ), # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 None, # 10 (11, TType.I64, 'receiverCount', None, None, ), # 11 (12, TType.I64, 'successCount', None, None, ), # 12 (13, TType.I64, 'failCount', None, None, ), # 13 (14, TType.I64, 'cancelCount', None, None, ), # 14 (15, TType.I64, 'unregisterCount', None, None, ), # 15 None, # 16 None, # 17 None, # 18 None, # 19 None, # 20 (21, TType.I64, 'timestamp', None, None, ), # 21 (22, TType.STRING, 'message', 'UTF8', None, ), # 22 ) all_structs.append(UserAuthStatus) UserAuthStatus.thrift_spec = ( None, # 0 (1, TType.BOOL, 'phoneNumberRegistered', None, None, ), # 1 (2, TType.LIST, 'registeredSnsIdTypes', (TType.I32, None, False), None, ), # 2 ) all_structs.append(VerificationSessionData) VerificationSessionData.thrift_spec = ( None, # 0 (1, TType.STRING, 'sessionId', 'UTF8', None, ), # 1 (2, TType.I32, 'method', None, None, ), # 2 (3, TType.STRING, 'callback', 'UTF8', None, ), # 3 (4, TType.STRING, 'normalizedPhone', 'UTF8', None, ), # 4 (5, TType.STRING, 'countryCode', 'UTF8', None, ), # 5 (6, TType.STRING, 'nationalSignificantNumber', 'UTF8', None, ), # 6 (7, TType.LIST, 'availableVerificationMethods', (TType.I32, None, False), None, ), # 7 ) all_structs.append(WapInvitation) WapInvitation.thrift_spec = ( None, # 0 (1, TType.I32, 'type', None, None, ), # 1 None, # 2 None, # 3 None, # 4 None, # 5 None, # 6 None, # 7 None, # 8 None, # 9 (10, TType.STRING, 'inviteeEmail', 'UTF8', None, ), # 10 (11, TType.STRING, 'inviterMid', 'UTF8', None, ), # 11 (12, TType.STRING, 'roomId', 'UTF8', None, ), # 12 ) fix_spec(all_structs) del all_structs
yuuki-core
/yuuki_core-6.5.2.tar.gz/yuuki_core-6.5.2/yuuki_core/ttypes.py
ttypes.py
======= History ======= 1.3.0 (Parian) -------------- * Support for changes brought in by R51 1.2.0 (Chubster) ---------------- * Internal Stuff required for Yuuno4IPython. 1.1.0 (Skidmark) ---------------- * `yuuno` - A command for running and setting up stuff. 1.0.2 (Khepri) -------------- * Made compatible with VapourSynth R45 1.0.1 (Khepri) -------------- * Fixed incompatibility with Python 3.7 1.0.0 (Khepri) -------------- * Split up Yuuno into Yuuno for IPython and Yuuno-core * Allow autodiscover of additional Yuuno-extensions. * Allow autodiscover of additional Yuuno-environments. * Fix incorrect endianness of COMPAT-Formats in MAC OS X. * Implement "Script"-Environments. This allows to use VSScript or subprocess. This allows to use Yuuno for editors. * Hook the VapourSynth log-system. 0.8.0 (Glastig Uaine) --------------------- * Now I name my releases because I feel like it. * Fixed color profile not included in PNGs by default. Do so by emitting an sRGB-chunk. * Completed first version of Comm-Protocol for Yuuno-Kernels. * Added progressbar to %encode-magic. * Added support for R41+ alpha clips. (Also with R43+ AlphaOutputTuple support: vapoursynth/#362) * Use %show for IPython. It will convert the clip to a PIL image. (Can also work for Alpha-Tuples pre R41). 0.7.0 ----- * Added support for clips with variable video formats * Added support for zlib compression and ICCP-chunk on PNG outputter 0.6.0 (2017-07-24) ------------------ * `%runvpy` can now return the outputs of a vapoursynth-script (.vpy) as a dict. * Settings of VapourSynth cores are now exposed as configuration variables * [Misc] Extracted `%encode` and stuck it inside its own sub-package. 0.5.0 (2017-06-18) ------------------ Rewrite of the yuuno codebase to prepare for Yuuno 1.0.0-release. * You don't have to do `%yuuno install` anymore. * To configure settings while in your IPython-shell, use the %config-magic, which is available in any IPython installation. * The minimum Python-version of Yuuno is Python 3.6. Make sure you are running this version when upgrading. * Using `%unload_ext yuuno` you can now completely deactivate Yuuno on your notebook. * The `%encode`-magic has become more robust now. * There is a `%render`-magic now, which does everything %encode does but stores the output into a io.BytesIO. * All interactive applications are now IPython-magics. * %preview returns a Preview-object. By changing the clip-Attribute of these objects, you can change the clip without losing the frame number. 0.4.0 (2017-05-18) ------------------ * Allow `vapoursynth.VideoFrames` to be inline-rendered. * Fixed incorrect aspect-ratio on all `ipywidget` based features. * Add f-string parsing inside `%encode`. (Will fallback to regular string.format for Python < 3.6) [thanks for the idea @🎌eXmendiC] * Switched to Jinja2 Templates for Raw-HTML output * Omit iCCP-chunk since apparently the csp has to be set manually by the user on media players. Of course it can be changed back at any time. 0.3.0 (2017-03-20) ------------------ * An ICCP-chunk is now sent along with the PNG. Currently the default is the 709-CSP ICC. Color-Managed browsers will honor this chunk. * The variables `core` (referencing the current VS-Core) and `vs` (as a referece to the vapoursynth) will now be pushed to the user-namespace on Yuuno activation. * `%yuuno install` is now the installation command * `%yuuno version` shows the current version of yuuno * `%yuuno help` shows the help for Yuuno. * `%yuuno get` and `%yuuno set` can be used for configuring Yuuno. * You have to use `%load_ext yuuno` for initiating yuuno now.
yuuno-core
/yuuno-core-1.3.1.zip/yuuno-core-1.3.1/HISTORY.rst
HISTORY.rst
===== Yuuno ===== .. code:: __ __ \ \ / / \ V / _ _ _ _ __ ___ \ / | | | | | | '_ \ / _ \ | | |_| | |_| | | | | (_) | \_/\__,_|\__,_|_| |_|\___/ .. image:: https://img.shields.io/pypi/v/yuuno.svg :target: https://pypi.python.org/pypi/yuuno .. image:: https://circleci.com/gh/Irrational-Encoding-Wizardry/yuuno-core.svg?style=svg :target: https://circleci.com/gh/Irrational-Encoding-Wizardry/yuuno-core Yuuno = Jupyter + VapourSynth * Free software: MIT license * Documentation: https://yuuno.encode.moe/ Start your journey here: ------------------------ * `Installation <https://yuuno.encode.moe/installation.html>`_ * `Usage <https://yuuno.encode.moe/usage.html>`_ Features -------- * Automatic importing of a VapourSynth-core as well as the VapourSynth-module itself. * Inline-rendering of the first frame of a clip. * Encoding of VapourSynth-Clips from the Notebook/IPython-shell * Interactive Clip Introspection using IPython-magics (%preview, %diff, %compare and %inspect) Credits ------- This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template. .. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
yuuno-core
/yuuno-core-1.3.1.zip/yuuno-core-1.3.1/README.rst
README.rst
.. highlight:: shell ============ Contributing ============ Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. You can contribute in many ways: Types of Contributions ---------------------- Report Bugs ~~~~~~~~~~~ Report bugs at https://github.com/stuxcrystal/yuuno/issues. If you are reporting a bug, please include: * Your operating system name and version. * Any details about your local setup that might be helpful in troubleshooting. * Detailed steps to reproduce the bug. Fix Bugs ~~~~~~~~ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it. Implement Features ~~~~~~~~~~~~~~~~~~ Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it. Write Documentation ~~~~~~~~~~~~~~~~~~~ yuuno could always use more documentation, whether as part of the official yuuno docs, in docstrings, or even on the web in blog posts, articles, and such. Submit Feedback ~~~~~~~~~~~~~~~ The best way to send feedback is to file an issue at https://github.com/stuxcrystal/yuuno/issues. If you are proposing a feature: * Explain in detail how it would work. * Keep the scope as narrow as possible, to make it easier to implement. * Remember that this is a volunteer-driven project, and that contributions are welcome :) Get Started! ------------ Ready to contribute? Here's how to set up `yuuno` for local development. 1. Fork the `yuuno` repo on GitHub. 2. Clone your fork locally:: $ git clone [email protected]:your_name_here/yuuno.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: $ mkvirtualenv yuuno $ cd yuuno/ $ python setup.py develop 4. Create a branch for local development:: $ git checkout -b name-of-your-bugfix-or-feature Now you can make your changes locally. 5. When you're done making changes, check that your changes pass the tests, including testing other Python versions with tox:: $ python -m unittest discover tests $ tox To get tox, just pip install them into your virtualenv. 6. Commit your changes and push your branch to GitHub:: $ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature 7. Submit a pull request through the GitHub website. Pull Request Guidelines ----------------------- Before you submit a pull request, check that it meets these guidelines: 1. The pull request should include tests. 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. 3. The pull request should work for Python 3.6 and VapourSynth R36 and up as well as the current developmental build. Check https://travis-ci.org/stuxcrystal/yuuno/pull_requests and make sure that the tests pass for all supported Python and VapourSynth versions. Tips ---- To run a subset of tests:: $ python -m unittest tests.test_yuuno
yuuno-core
/yuuno-core-1.3.1.zip/yuuno-core-1.3.1/CONTRIBUTING.rst
CONTRIBUTING.rst
# -*- coding: utf-8 -*- # Yuuno - IPython + VapourSynth # Copyright (C) 2017 StuxCrystal (Roland Netzsch <[email protected]>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from typing import Union, Sequence, Type, TypeVar, Optional from traitlets.utils.importstring import import_item from traitlets import Instance, List from traitlets import default from yuuno.core.environment import Environment from yuuno.core.extension import Extension from yuuno.core.namespace import Namespace from yuuno.core.settings import Settings from yuuno.output import YuunoImageOutput T = TypeVar("T") class Yuuno(Settings): """ Main-instance of Yuuno. """ environment: Environment = Instance(Environment) extensions: Sequence[Extension] = List(Instance(Extension)) output: YuunoImageOutput = Instance(YuunoImageOutput) namespace: Namespace = Instance(Namespace) @default("output") def _default_output(self): return YuunoImageOutput(yuuno=self) @default("namespace") def _default_namespace(self): return Namespace() def _actual_extensions(self): return self.extension_types + self.environment.additional_extensions() def _load_extensions(self) -> Sequence[Extension]: exts = [] for extension in self._actual_extensions(): if callable(extension): ext_cls = extension else: ext_cls = import_item(extension) if not ext_cls.is_supported(): self.log.info(f"Yuuno-Extension {ext_cls.get_name()} reported that it is not supported on this system.") continue else: self.log.debug(f"Yuuno-Extension {ext_cls.get_name()} loaded.") exts.append(ext_cls(parent=self)) return exts def _initialize_extensions(self) -> None: self.extensions = self._load_extensions() self.environment.post_extension_load() failed_extensions = [] for extension in self.extensions: try: extension.initialize() except Exception as e: failed_extensions.append(extension) import traceback traceback.print_exception(type(e), e, e.__traceback__) else: self.log.debug(f"Yuuno-Extension {extension.get_name()} initialized.") for extension in failed_extensions: self.extensions.remove(extension) def _deinitialize_extensions(self) -> None: for extension in reversed(self.extensions): extension.deinitialize() def get_extension(self, cls: Union[Type[T], str]) -> Optional[T]: """ Returns the loaded extension given by type. :param cls: The class of the object. :return: The given extension or None """ for extension in self.extensions: if isinstance(cls, str): if extension.get_name() == cls: return extension continue if isinstance(extension, cls): return extension return None def start(self) -> None: """ Initializes essential stuff about Yuuno. """ self._initialize_extensions() self.environment.initialize() def stop(self) -> None: """ Clears up stuff about yuuno. """ self.environment.deinitialize() self._deinitialize_extensions() self.clear_instance() def wrap(self, obj: object) -> object: """ Create the clip-wrapper for a specific object. """ return self.registry.wrap(obj)
yuuno-core
/yuuno-core-1.3.1.zip/yuuno-core-1.3.1/yuuno/yuuno.py
yuuno.py
# Yuuno - IPython + VapourSynth # Copyright (C) 2018 StuxCrystal (Roland Netzsch <[email protected]>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import functools from threading import Lock from types import TracebackType from typing import Optional, Type, NamedTuple, List, Any, TYPE_CHECKING from typing import Callable, TypeVar, Generator, Tuple, Generic, Sequence from concurrent.futures import Future as ConcFuture T = TypeVar("T") R = TypeVar("R") class WaitResult(NamedTuple): completed: List[Any] failed: List[Any] class AccumulatedException(Exception): def __init__(self, msg, exceptions): self.exceptions = exceptions super(AccumulatedException, self).__init__(msg) class Future(Generic[T]): def result(self) -> T: pass def exception(self) -> Optional[BaseException]: pass def set_result(self, result: T): pass def set_exception(self, etype: Type[BaseException], eval: BaseException, tb: TracebackType): pass def add_done_callback(self, cb: 'Future[T]') -> None: pass if hasattr(Future, "register"): if TYPE_CHECKING: from asyncio import Future as AIOFut Future.register(AIOFut) Future.register(ConcFuture) def inline_resolved(func: Callable[..., T]) -> Callable[..., Future[T]]: @functools.wraps(func) def _wrapped(*args, **kwargs) -> Future: fut = ConcFuture() fut.set_running_or_notify_cancel() try: result_value = func(*args, **kwargs) except Exception as e: fut.set_exception(e) else: fut.set_result(result_value) return fut return _wrapped def auto_join(func: Callable[..., Future[T]]) -> Callable[..., T]: @functools.wraps(func) def _wrapped(*args, **kwargs) -> T: fut = func(*args, **kwargs) return fut.result() return _wrapped def future_yield_coro(func: Callable[..., Generator[Future[T], T, R]]) -> Callable[..., Future[R]]: @functools.wraps(func) def _wrapper(*args, **kwargs) -> Future: def _run(advance: Callable[..., Future[T]], args: Tuple) -> None: try: next_fut: ConcFuture = advance(*args) except StopIteration as e: error = None result = e.value except Exception as e: error = e result = None else: next_fut.add_done_callback(_advance) return if error: fut.set_exception(error) else: fut.set_result(result) def _advance(current: Future[T]) -> None: if current.exception(): exc: BaseException = current.exception() args = (type(exc), exc, exc.__traceback__) advance = gen.throw else: args = (current.result(),) advance = gen.send _run(advance, args) # Create the future. fut: ConcFuture = ConcFuture() fut.set_running_or_notify_cancel() # Load the generator gen: Generator[Future[T], T, R] = func(*args, **kwargs) # Run the first iteration. _run(gen.send, (None,)) return fut return _wrapper @future_yield_coro def gather(futures: [Sequence[Future[T]]]) -> Sequence[T]: def wait(wait_for: [Sequence[Future]]) -> Future: def remove(future): nonlocal running with running_lock: running -= 1 if running > 0: return failed = [f for f in wait_for if f.exception() is not None] completed = [f for f in wait_for if f.exception() is None] res.set_result(WaitResult(completed, failed)) res = ConcFuture() res.set_running_or_notify_cancel() running = len(futures) running_lock: Lock = Lock() for fut in wait_for: fut.add_done_callback(remove) return res res: WaitResult = (yield wait(futures)) if res.failed: if len(res.failed) == 1: raise res.failed[0].exception() raise AccumulatedException("Multiple errors occured.", res.failed) return [f.result() for f in res.completed]
yuuno-core
/yuuno-core-1.3.1.zip/yuuno-core-1.3.1/yuuno/utils.py
utils.py
# Yuuno - IPython + VapourSynth # Copyright (C) 2017,2018 StuxCrystal (Roland Netzsch <[email protected]>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import math from enum import IntEnum from typing import TypeVar, NamedTuple, Tuple from PIL.Image import Image from yuuno.utils import inline_resolved, Future T = TypeVar("T") class Size(NamedTuple): width: int height: int class SampleType(IntEnum): INTEGER = 0 FLOAT = 1 class ColorFamily(IntEnum): GREY = 0 RGB = 1 YUV = 2 class RawFormat(NamedTuple): bits_per_sample: int num_planes: int family: ColorFamily sample_type: SampleType subsampling_h: int = 0 subsampling_w: int = 0 @property def bytes_per_sample(self) -> int: return int(math.ceil(self.bits_per_sample/8)) RawFormat.SampleType = SampleType RawFormat.ColorFamily = ColorFamily GRAY8 = RawFormat(8, 1, RawFormat.ColorFamily.GREY, RawFormat.SampleType.INTEGER) RGB24 = RawFormat(8, 3, RawFormat.ColorFamily.RGB, RawFormat.SampleType.INTEGER) RGBA32 = RawFormat(8, 4, RawFormat.ColorFamily.RGB, RawFormat.SampleType.INTEGER) class Frame(object): """ This class represents a single frame out of a clip. """ def to_pil(self) -> Image: """ Generates an RGB (or RGBA) 8bit PIL-Image from the frame. :return: A PIL-Image with the frame data. """ def format(self) -> RawFormat: """ Returns the raw-format of the image. :return: The raw-format of the image. """ bands = self.to_pil().getbands() if len(bands) == 1: return GRAY8 if len(bands) == 4: return RGBA32 return RGB24 def size(self) -> Size: p = self.to_pil() return Size(p.width, p.height) def plane_size(self, plane) -> int: """ Automatically calculated from size and format., :param plane: The plane number. :return: The size of a plane. """ w, h = self.size() format = self.format() if 0 < plane < 4: w >>= format.subsampling_w h >>= format.subsampling_h return w*h*format.bytes_per_sample def to_raw(self) -> bytes: """ Generates an image that corresponds to the given frame data. :return: A bytes-object with the frame data """ p = self.to_pil() return b"".join( bytes(im.getdata()) for im in p.split() ) @inline_resolved def get_raw_data_async(self) -> Tuple[Size, RawFormat, bytes]: return self.size(), self.format(), self.to_raw() class Clip(object): """ Encapsulates a clip for the applications. Some special functions might require an extended interface that is defined in its respective places. .. automethod:: __len__ .. automethod:: __getitem__ """ def __init__(self, clip: T) -> None: self.clip: T = clip def __len__(self) -> int: """ Calculates the length of the clip in frames. :return: The amount of frames in the clip """ raise NotImplementedError def __getitem__(self, item: int) -> Future: """ Extracts the frame from the clip. :param item: The frame number :return: A frame-instance with the given data. """ raise NotImplementedError
yuuno-core
/yuuno-core-1.3.1.zip/yuuno-core-1.3.1/yuuno/clip.py
clip.py
# Yuuno - IPython + VapourSynth # Copyright (C) 2017 StuxCrystal (Roland Netzsch <[email protected]>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from io import BytesIO from traitlets import Unicode, CInt, Any from traitlets.config import Configurable from PIL.Image import Image from yuuno.clip import Frame from yuuno.output.srgb_png import srgb class YuunoImageOutput(Configurable): """ Defines an output for PNG-files """ ################ # Settings yuuno = Any(help="Reference to the current Yuuno instance.") zlib_compression: int = CInt(6, help="0=No compression\n1=Fastest\n9=Slowest", config=True) icc_profile: str = Unicode("sRGB", help="Specify the path to an ICC-Profile (Defaults to sRGB).", allow_none=True, config=True) def bytes_of(self, im: Frame) -> bytes: """ Converts the frame into a bytes-object containing the frame as a PNG-file. :param im: the frame to convert. :return: A bytes-object containing the image. """ if not isinstance(im, Image): im = im.to_pil() if im.mode not in ("RGBA", "RGB", "1", "L", "P"): im = im.convert("RGB") settings = { "compress_level": self.zlib_compression, "format": "png" } if self.icc_profile is not None: if self.icc_profile != "sRGB": with open(self.icc_profile, "rb") as f: settings["icc_profile"] = f.read() else: settings.update(srgb()) f = BytesIO() im.save(f, **settings) return f.getvalue()
yuuno-core
/yuuno-core-1.3.1.zip/yuuno-core-1.3.1/yuuno/output/pil2png.py
pil2png.py
# Yuuno - IPython + VapourSynth # Copyright (C) 2018 StuxCrystal (Roland Netzsch <[email protected]>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import sys from pathlib import Path from types import ModuleType from contextlib import contextmanager from typing import Dict, Union from yuuno.clip import Clip from yuuno.utils import inline_resolved from yuuno.core.environment import Environment from yuuno.multi_scripts.script import Script from yuuno.multi_scripts.subprocess.provider import ScriptProvider from yuuno.multi_scripts.subprocess.process import LocalSubprocessEnvironment @contextmanager def shadow_module(name: str, module: ModuleType): before = sys.modules.get(name, None) sys.modules[name] = module try: yield finally: if before is None: del sys.modules[name] else: sys.modules[name] = before class DummyModule(object): pass class VSStandaloneScript(Script): def __init__(self, env: Environment): import vapoursynth self.vapoursynth = vapoursynth self.env = env self._current_code_exec = 0 self.init_ns() def init_ns(self): self.main_module = ModuleType("__vapoursynth__") self.namespace = self.main_module.__dict__ @property def alive(self) -> bool: """ Checks if the environment is still alive. """ return True def initialize(self) -> None: """ Called when the script is going to be initialized. We need this to find out if script-creation is actually costly. """ pass def dispose(self) -> None: """ Disposes the script. """ self.vapoursynth.clear_outputs() @inline_resolved def get_results(self) -> Dict[str, Clip]: """ Returns a dictionary with clips that represent the results of the script. """ return { str(k): self.env.parent.wrap(v) for k, v in self.vapoursynth.get_outputs().items() } @property def next_code_no(self) -> int: self._current_code_exec += 1 return self._current_code_exec @inline_resolved def execute(self, code: Union[str, Path]) -> None: """ Executes the code inside the environment """ if isinstance(code, Path): file = code with open(code, "rb") as f: code = f.read() else: file = "<yuuno:%d>" % self.next_code_no f = compile(code, filename=file, dont_inherit=True, mode="exec") with shadow_module('__vapoursynth__', self.main_module): with shadow_module('__main__', self.main_module): exec(f, self.namespace, {})
yuuno-core
/yuuno-core-1.3.1.zip/yuuno-core-1.3.1/yuuno/vs/provider.py
provider.py
# Yuuno - IPython + VapourSynth # Copyright (C) 2017,2018 StuxCrystal (Roland Netzsch <[email protected]>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import enum import types from contextlib import contextmanager from typing import AnyStr, Callable from traitlets.utils.importstring import import_item from yuuno.vs.flags import Features def get_proxy_or_core(*, resolve_proxy=False): """ Returns the current core-proxy or a core instance for pre Vapoursynth R37 installations :param resolve_proxy: If you have R37 or later, force resolving the proxy object :return: A proxy or the actual core. """ if Features.SUPPORT_CORE_PROXY: from vapoursynth import core if resolve_proxy: core = core.core return core else: from vapoursynth import get_core core = get_core() def filter_or_import(name: AnyStr) -> Callable: """ Loads the filter from the current core or tries to import the name. :param name: The name to load. :return: A callable. """ core = get_proxy_or_core() try: ns, func = name.split(".", 1) return getattr(getattr(core, ns), func) except (ValueError, AttributeError): return import_item(name) def get_environment(): import vapoursynth if Features.ENVIRONMENT_POLICIES: return vapoursynth.get_current_environment().use else: env = vapoursynth.vpy_current_environment() return lambda: env def is_single(): import vapoursynth if Features.EXPORT_VSSCRIPT_ENV: return vapoursynth.Environment.is_single() else: return vapoursynth._using_vsscript class MessageLevel(enum.IntEnum): mtDebug = 0 mtWarning = 1 mtCritical = 2 mtFatal = 3 class VapourSynthEnvironment(object): def __init__(self): self.previous_outputs = {} self.old_outputs = None single = staticmethod(is_single) @staticmethod def get_global_outputs(): import vapoursynth if Features.EXPORT_OUTPUT_DICT: return vapoursynth.get_outputs() return types.MappingProxyType(vapoursynth._get_output_dict("OutputManager.get_outputs")) def _set_outputs(self, output_dict): import vapoursynth vapoursynth.clear_outputs() for k, v in output_dict.items(): v.set_output(k) @property def outputs(self): if self.old_outputs is None: return self.previous_outputs return self.get_global_outputs() def __enter__(self): self.old_outputs = self.get_global_outputs().copy() self._set_outputs(self.previous_outputs) def __exit__(self, exc, val, tb): self.previous_outputs = self.get_global_outputs().copy() self._set_outputs(self.old_outputs) self.old_outputs = None
yuuno-core
/yuuno-core-1.3.1.zip/yuuno-core-1.3.1/yuuno/vs/utils.py
utils.py