diff --git a/curve-thrift/TalkService.js b/curve-thrift/TalkService.js index f04b157..3454bf6 100644 --- a/curve-thrift/TalkService.js +++ b/curve-thrift/TalkService.js @@ -1,5 +1,5 @@ // -// Autogenerated by Thrift Compiler (0.9.2) +// Autogenerated by Thrift Compiler (0.9.3) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // @@ -15,10 +15,10 @@ TalkService_acceptGroupInvitation_args = function(args) { this.reqSeq = null; this.groupId = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.groupId !== undefined) { + if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } @@ -84,7 +84,7 @@ TalkService_acceptGroupInvitation_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -135,15 +135,155 @@ TalkService_acceptGroupInvitation_result.prototype.write = function(output) { return; }; +TalkService_acceptGroupInvitationByTicket_args = function(args) { + this.reqSeq = null; + this.groupId = null; + this.ticketId = null; + if (args) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { + this.reqSeq = args.reqSeq; + } + if (args.groupId !== undefined && args.groupId !== null) { + this.groupId = args.groupId; + } + if (args.ticketId !== undefined && args.ticketId !== null) { + this.ticketId = args.ticketId; + } + } +}; +TalkService_acceptGroupInvitationByTicket_args.prototype = {}; +TalkService_acceptGroupInvitationByTicket_args.prototype.read = function(input) { + input.readStructBegin(); + while (true) + { + var ret = input.readFieldBegin(); + var fname = ret.fname; + var ftype = ret.ftype; + var fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == Thrift.Type.I32) { + this.reqSeq = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.groupId = input.readString(); + } else { + input.skip(ftype); + } + break; + case 3: + if (ftype == Thrift.Type.STRING) { + this.ticketId = input.readString(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; +}; + +TalkService_acceptGroupInvitationByTicket_args.prototype.write = function(output) { + output.writeStructBegin('TalkService_acceptGroupInvitationByTicket_args'); + if (this.reqSeq !== null && this.reqSeq !== undefined) { + output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); + output.writeI32(this.reqSeq); + output.writeFieldEnd(); + } + if (this.groupId !== null && this.groupId !== undefined) { + output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); + output.writeString(this.groupId); + output.writeFieldEnd(); + } + if (this.ticketId !== null && this.ticketId !== undefined) { + output.writeFieldBegin('ticketId', Thrift.Type.STRING, 3); + output.writeString(this.ticketId); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; +}; + +TalkService_acceptGroupInvitationByTicket_result = function(args) { + this.e = null; + if (args instanceof ttypes.TalkException) { + this.e = args; + return; + } + if (args) { + if (args.e !== undefined && args.e !== null) { + this.e = args.e; + } + } +}; +TalkService_acceptGroupInvitationByTicket_result.prototype = {}; +TalkService_acceptGroupInvitationByTicket_result.prototype.read = function(input) { + input.readStructBegin(); + while (true) + { + var ret = input.readFieldBegin(); + var fname = ret.fname; + var ftype = ret.ftype; + var fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == Thrift.Type.STRUCT) { + this.e = new ttypes.TalkException(); + this.e.read(input); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; +}; + +TalkService_acceptGroupInvitationByTicket_result.prototype.write = function(output) { + output.writeStructBegin('TalkService_acceptGroupInvitationByTicket_result'); + if (this.e !== null && this.e !== undefined) { + output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); + this.e.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; +}; + TalkService_acceptProximityMatches_args = function(args) { this.sessionId = null; this.ids = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } - if (args.ids !== undefined) { - this.ids = args.ids; + if (args.ids !== undefined && args.ids !== null) { + this.ids = Thrift.copyList(args.ids, [null]); } } }; @@ -230,7 +370,7 @@ TalkService_acceptProximityMatches_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -284,7 +424,7 @@ TalkService_acceptProximityMatches_result.prototype.write = function(output) { TalkService_acquireCallRoute_args = function(args) { this.to = null; if (args) { - if (args.to !== undefined) { + if (args.to !== undefined && args.to !== null) { this.to = args.to; } } @@ -342,10 +482,10 @@ TalkService_acquireCallRoute_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -430,7 +570,7 @@ TalkService_acquireCallRoute_result.prototype.write = function(output) { TalkService_acquireCallTicket_args = function(args) { this.to = null; if (args) { - if (args.to !== undefined) { + if (args.to !== undefined && args.to !== null) { this.to = args.to; } } @@ -488,10 +628,10 @@ TalkService_acquireCallTicket_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -554,7 +694,7 @@ TalkService_acquireCallTicket_result.prototype.write = function(output) { TalkService_acquireEncryptedAccessToken_args = function(args) { this.featureType = null; if (args) { - if (args.featureType !== undefined) { + if (args.featureType !== undefined && args.featureType !== null) { this.featureType = args.featureType; } } @@ -612,10 +752,10 @@ TalkService_acquireEncryptedAccessToken_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -679,10 +819,10 @@ TalkService_addSnsId_args = function(args) { this.snsIdType = null; this.snsAccessToken = null; if (args) { - if (args.snsIdType !== undefined) { + if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } - if (args.snsAccessToken !== undefined) { + if (args.snsAccessToken !== undefined && args.snsAccessToken !== null) { this.snsAccessToken = args.snsAccessToken; } } @@ -749,10 +889,10 @@ TalkService_addSnsId_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -816,10 +956,10 @@ TalkService_blockContact_args = function(args) { this.reqSeq = null; this.id = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } } @@ -885,7 +1025,7 @@ TalkService_blockContact_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -940,10 +1080,10 @@ TalkService_blockRecommendation_args = function(args) { this.reqSeq = null; this.id = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } } @@ -1009,7 +1149,7 @@ TalkService_blockRecommendation_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -1065,14 +1205,14 @@ TalkService_cancelGroupInvitation_args = function(args) { this.groupId = null; this.contactIds = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.groupId !== undefined) { + if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } - if (args.contactIds !== undefined) { - this.contactIds = args.contactIds; + if (args.contactIds !== undefined && args.contactIds !== null) { + this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; @@ -1171,7 +1311,7 @@ TalkService_cancelGroupInvitation_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -1226,10 +1366,10 @@ TalkService_changeVerificationMethod_args = function(args) { this.sessionId = null; this.method = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } - if (args.method !== undefined) { + if (args.method !== undefined && args.method !== null) { this.method = args.method; } } @@ -1296,10 +1436,10 @@ TalkService_changeVerificationMethod_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.VerificationSessionData(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -1395,7 +1535,7 @@ TalkService_clearIdentityCredential_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -1450,10 +1590,10 @@ TalkService_clearMessageBox_args = function(args) { this.channelId = null; this.messageBoxId = null; if (args) { - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.messageBoxId !== undefined) { + if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } } @@ -1519,7 +1659,7 @@ TalkService_clearMessageBox_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -1573,7 +1713,7 @@ TalkService_clearMessageBox_result.prototype.write = function(output) { TalkService_closeProximityMatch_args = function(args) { this.sessionId = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } @@ -1630,7 +1770,7 @@ TalkService_closeProximityMatch_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -1686,14 +1826,14 @@ TalkService_commitSendMessage_args = function(args) { this.messageId = null; this.receiverMids = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.messageId !== undefined) { + if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } - if (args.receiverMids !== undefined) { - this.receiverMids = args.receiverMids; + if (args.receiverMids !== undefined && args.receiverMids !== null) { + this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; @@ -1793,10 +1933,10 @@ TalkService_commitSendMessage_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -1888,14 +2028,14 @@ TalkService_commitSendMessages_args = function(args) { this.messageIds = null; this.receiverMids = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.messageIds !== undefined) { - this.messageIds = args.messageIds; + if (args.messageIds !== undefined && args.messageIds !== null) { + this.messageIds = Thrift.copyList(args.messageIds, [null]); } - if (args.receiverMids !== undefined) { - this.receiverMids = args.receiverMids; + if (args.receiverMids !== undefined && args.receiverMids !== null) { + this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; @@ -2017,10 +2157,10 @@ TalkService_commitSendMessages_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -2112,14 +2252,14 @@ TalkService_commitUpdateProfile_args = function(args) { this.attrs = null; this.receiverMids = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.attrs !== undefined) { - this.attrs = args.attrs; + if (args.attrs !== undefined && args.attrs !== null) { + this.attrs = Thrift.copyList(args.attrs, [null]); } - if (args.receiverMids !== undefined) { - this.receiverMids = args.receiverMids; + if (args.receiverMids !== undefined && args.receiverMids !== null) { + this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; @@ -2241,10 +2381,10 @@ TalkService_commitUpdateProfile_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -2335,10 +2475,10 @@ TalkService_confirmEmail_args = function(args) { this.verifier = null; this.pinCode = null; if (args) { - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } - if (args.pinCode !== undefined) { + if (args.pinCode !== undefined && args.pinCode !== null) { this.pinCode = args.pinCode; } } @@ -2404,7 +2544,7 @@ TalkService_confirmEmail_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -2460,14 +2600,14 @@ TalkService_createGroup_args = function(args) { this.name = null; this.contactIds = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.name !== undefined) { + if (args.name !== undefined && args.name !== null) { this.name = args.name; } - if (args.contactIds !== undefined) { - this.contactIds = args.contactIds; + if (args.contactIds !== undefined && args.contactIds !== null) { + this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; @@ -2567,10 +2707,10 @@ TalkService_createGroup_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Group(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -2640,25 +2780,25 @@ TalkService_createQrcodeBase64Image_args = function(args) { this.width = null; this.height = null; if (args) { - if (args.url !== undefined) { + if (args.url !== undefined && args.url !== null) { this.url = args.url; } - if (args.characterSet !== undefined) { + if (args.characterSet !== undefined && args.characterSet !== null) { this.characterSet = args.characterSet; } - if (args.imageSize !== undefined) { + if (args.imageSize !== undefined && args.imageSize !== null) { this.imageSize = args.imageSize; } - if (args.x !== undefined) { + if (args.x !== undefined && args.x !== null) { this.x = args.x; } - if (args.y !== undefined) { + if (args.y !== undefined && args.y !== null) { this.y = args.y; } - if (args.width !== undefined) { + if (args.width !== undefined && args.width !== null) { this.width = args.width; } - if (args.height !== undefined) { + if (args.height !== undefined && args.height !== null) { this.height = args.height; } } @@ -2785,10 +2925,10 @@ TalkService_createQrcodeBase64Image_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -2852,11 +2992,11 @@ TalkService_createRoom_args = function(args) { this.reqSeq = null; this.contactIds = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.contactIds !== undefined) { - this.contactIds = args.contactIds; + if (args.contactIds !== undefined && args.contactIds !== null) { + this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; @@ -2944,10 +3084,10 @@ TalkService_createRoom_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Room(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -3044,10 +3184,10 @@ TalkService_createSession_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -3110,7 +3250,7 @@ TalkService_createSession_result.prototype.write = function(output) { TalkService_fetchAnnouncements_args = function(args) { this.lastFetchedIndex = null; if (args) { - if (args.lastFetchedIndex !== undefined) { + if (args.lastFetchedIndex !== undefined && args.lastFetchedIndex !== null) { this.lastFetchedIndex = args.lastFetchedIndex; } } @@ -3168,10 +3308,10 @@ TalkService_fetchAnnouncements_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Announcement]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -3258,10 +3398,10 @@ TalkService_fetchMessages_args = function(args) { this.localTs = null; this.count = null; if (args) { - if (args.localTs !== undefined) { + if (args.localTs !== undefined && args.localTs !== null) { this.localTs = args.localTs; } - if (args.count !== undefined) { + if (args.count !== undefined && args.count !== null) { this.count = args.count; } } @@ -3328,10 +3468,10 @@ TalkService_fetchMessages_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Message]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -3418,10 +3558,10 @@ TalkService_fetchOperations_args = function(args) { this.localRev = null; this.count = null; if (args) { - if (args.localRev !== undefined) { + if (args.localRev !== undefined && args.localRev !== null) { this.localRev = args.localRev; } - if (args.count !== undefined) { + if (args.count !== undefined && args.count !== null) { this.count = args.count; } } @@ -3488,10 +3628,10 @@ TalkService_fetchOperations_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Operation]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -3580,16 +3720,16 @@ TalkService_fetchOps_args = function(args) { this.globalRev = null; this.individualRev = null; if (args) { - if (args.localRev !== undefined) { + if (args.localRev !== undefined && args.localRev !== null) { this.localRev = args.localRev; } - if (args.count !== undefined) { + if (args.count !== undefined && args.count !== null) { this.count = args.count; } - if (args.globalRev !== undefined) { + if (args.globalRev !== undefined && args.globalRev !== null) { this.globalRev = args.globalRev; } - if (args.individualRev !== undefined) { + if (args.individualRev !== undefined && args.individualRev !== null) { this.individualRev = args.individualRev; } } @@ -3680,10 +3820,10 @@ TalkService_fetchOps_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Operation]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -3770,11 +3910,11 @@ TalkService_findAndAddContactsByEmail_args = function(args) { this.reqSeq = null; this.emails = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.emails !== undefined) { - this.emails = args.emails; + if (args.emails !== undefined && args.emails !== null) { + this.emails = Thrift.copyList(args.emails, [null]); } } }; @@ -3862,10 +4002,10 @@ TalkService_findAndAddContactsByEmail_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -3957,10 +4097,10 @@ TalkService_findAndAddContactsByMid_args = function(args) { this.reqSeq = null; this.mid = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } } @@ -4027,10 +4167,10 @@ TalkService_findAndAddContactsByMid_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -4122,11 +4262,11 @@ TalkService_findAndAddContactsByPhone_args = function(args) { this.reqSeq = null; this.phones = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.phones !== undefined) { - this.phones = args.phones; + if (args.phones !== undefined && args.phones !== null) { + this.phones = Thrift.copyList(args.phones, [null]); } } }; @@ -4214,10 +4354,10 @@ TalkService_findAndAddContactsByPhone_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -4309,10 +4449,10 @@ TalkService_findAndAddContactsByUserid_args = function(args) { this.reqSeq = null; this.userid = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.userid !== undefined) { + if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } @@ -4379,10 +4519,10 @@ TalkService_findAndAddContactsByUserid_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -4473,7 +4613,7 @@ TalkService_findAndAddContactsByUserid_result.prototype.write = function(output) TalkService_findContactByUserid_args = function(args) { this.userid = null; if (args) { - if (args.userid !== undefined) { + if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } @@ -4531,10 +4671,10 @@ TalkService_findContactByUserid_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Contact(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -4598,7 +4738,7 @@ TalkService_findContactByUserid_result.prototype.write = function(output) { TalkService_findContactByUserTicket_args = function(args) { this.ticketId = null; if (args) { - if (args.ticketId !== undefined) { + if (args.ticketId !== undefined && args.ticketId !== null) { this.ticketId = args.ticketId; } } @@ -4656,10 +4796,10 @@ TalkService_findContactByUserTicket_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Contact(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -4723,8 +4863,8 @@ TalkService_findContactByUserTicket_result.prototype.write = function(output) { TalkService_findContactsByEmail_args = function(args) { this.emails = null; if (args) { - if (args.emails !== undefined) { - this.emails = args.emails; + if (args.emails !== undefined && args.emails !== null) { + this.emails = Thrift.copyList(args.emails, [null]); } } }; @@ -4803,10 +4943,10 @@ TalkService_findContactsByEmail_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -4897,8 +5037,8 @@ TalkService_findContactsByEmail_result.prototype.write = function(output) { TalkService_findContactsByPhone_args = function(args) { this.phones = null; if (args) { - if (args.phones !== undefined) { - this.phones = args.phones; + if (args.phones !== undefined && args.phones !== null) { + this.phones = Thrift.copyList(args.phones, [null]); } } }; @@ -4977,10 +5117,10 @@ TalkService_findContactsByPhone_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [ttypes.Contact]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -5073,13 +5213,13 @@ TalkService_findSnsIdUserStatus_args = function(args) { this.snsAccessToken = null; this.udidHash = null; if (args) { - if (args.snsIdType !== undefined) { + if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } - if (args.snsAccessToken !== undefined) { + if (args.snsAccessToken !== undefined && args.snsAccessToken !== null) { this.snsAccessToken = args.snsAccessToken; } - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } } @@ -5158,10 +5298,10 @@ TalkService_findSnsIdUserStatus_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.SnsIdUserStatus(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -5225,7 +5365,7 @@ TalkService_findSnsIdUserStatus_result.prototype.write = function(output) { TalkService_finishUpdateVerification_args = function(args) { this.sessionId = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } @@ -5282,7 +5422,7 @@ TalkService_finishUpdateVerification_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -5337,10 +5477,10 @@ TalkService_generateUserTicket_args = function(args) { this.expirationTime = null; this.maxUseCount = null; if (args) { - if (args.expirationTime !== undefined) { + if (args.expirationTime !== undefined && args.expirationTime !== null) { this.expirationTime = args.expirationTime; } - if (args.maxUseCount !== undefined) { + if (args.maxUseCount !== undefined && args.maxUseCount !== null) { this.maxUseCount = args.maxUseCount; } } @@ -5407,10 +5547,10 @@ TalkService_generateUserTicket_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Ticket(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -5474,7 +5614,7 @@ TalkService_generateUserTicket_result.prototype.write = function(output) { TalkService_getAcceptedProximityMatches_args = function(args) { this.sessionId = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } @@ -5532,10 +5672,10 @@ TalkService_getAcceptedProximityMatches_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -5653,10 +5793,10 @@ TalkService_getActiveBuddySubscriberIds_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -5774,10 +5914,10 @@ TalkService_getAllContactIds_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -5863,10 +6003,10 @@ TalkService_getAuthQrcode_args = function(args) { this.keepLoggedIn = null; this.systemName = null; if (args) { - if (args.keepLoggedIn !== undefined) { + if (args.keepLoggedIn !== undefined && args.keepLoggedIn !== null) { this.keepLoggedIn = args.keepLoggedIn; } - if (args.systemName !== undefined) { + if (args.systemName !== undefined && args.systemName !== null) { this.systemName = args.systemName; } } @@ -5933,10 +6073,10 @@ TalkService_getAuthQrcode_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.AuthQrcode(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -6033,10 +6173,10 @@ TalkService_getBlockedContactIds_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -6122,10 +6262,10 @@ TalkService_getBlockedContactIdsByRange_args = function(args) { this.start = null; this.count = null; if (args) { - if (args.start !== undefined) { + if (args.start !== undefined && args.start !== null) { this.start = args.start; } - if (args.count !== undefined) { + if (args.count !== undefined && args.count !== null) { this.count = args.count; } } @@ -6192,10 +6332,10 @@ TalkService_getBlockedContactIdsByRange_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -6313,10 +6453,10 @@ TalkService_getBlockedRecommendationIds_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -6434,10 +6574,10 @@ TalkService_getBuddyBlockerIds_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -6523,10 +6663,10 @@ TalkService_getBuddyLocation_args = function(args) { this.mid = null; this.index = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.index !== undefined) { + if (args.index !== undefined && args.index !== null) { this.index = args.index; } } @@ -6593,10 +6733,10 @@ TalkService_getBuddyLocation_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Geolocation(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -6660,7 +6800,7 @@ TalkService_getBuddyLocation_result.prototype.write = function(output) { TalkService_getCompactContactsModifiedSince_args = function(args) { this.timestamp = null; if (args) { - if (args.timestamp !== undefined) { + if (args.timestamp !== undefined && args.timestamp !== null) { this.timestamp = args.timestamp; } } @@ -6718,10 +6858,10 @@ TalkService_getCompactContactsModifiedSince_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.CompactContact]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -6807,7 +6947,7 @@ TalkService_getCompactContactsModifiedSince_result.prototype.write = function(ou TalkService_getCompactGroup_args = function(args) { this.groupId = null; if (args) { - if (args.groupId !== undefined) { + if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } @@ -6865,10 +7005,10 @@ TalkService_getCompactGroup_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Group(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -6932,7 +7072,7 @@ TalkService_getCompactGroup_result.prototype.write = function(output) { TalkService_getCompactRoom_args = function(args) { this.roomId = null; if (args) { - if (args.roomId !== undefined) { + if (args.roomId !== undefined && args.roomId !== null) { this.roomId = args.roomId; } } @@ -6990,10 +7130,10 @@ TalkService_getCompactRoom_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Room(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -7057,7 +7197,7 @@ TalkService_getCompactRoom_result.prototype.write = function(output) { TalkService_getContact_args = function(args) { this.id = null; if (args) { - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } } @@ -7115,10 +7255,10 @@ TalkService_getContact_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Contact(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -7182,8 +7322,8 @@ TalkService_getContact_result.prototype.write = function(output) { TalkService_getContacts_args = function(args) { this.ids = null; if (args) { - if (args.ids !== undefined) { - this.ids = args.ids; + if (args.ids !== undefined && args.ids !== null) { + this.ids = Thrift.copyList(args.ids, [null]); } } }; @@ -7262,10 +7402,10 @@ TalkService_getContacts_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Contact]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -7384,10 +7524,10 @@ TalkService_getCountryWithRequestIp_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -7483,10 +7623,10 @@ TalkService_getFavoriteMids_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -7571,7 +7711,7 @@ TalkService_getFavoriteMids_result.prototype.write = function(output) { TalkService_getGroup_args = function(args) { this.groupId = null; if (args) { - if (args.groupId !== undefined) { + if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } @@ -7629,10 +7769,10 @@ TalkService_getGroup_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Group(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -7729,10 +7869,10 @@ TalkService_getGroupIdsInvited_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -7850,10 +7990,10 @@ TalkService_getGroupIdsJoined_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -7938,8 +8078,8 @@ TalkService_getGroupIdsJoined_result.prototype.write = function(output) { TalkService_getGroups_args = function(args) { this.groupIds = null; if (args) { - if (args.groupIds !== undefined) { - this.groupIds = args.groupIds; + if (args.groupIds !== undefined && args.groupIds !== null) { + this.groupIds = Thrift.copyList(args.groupIds, [null]); } } }; @@ -8018,10 +8158,10 @@ TalkService_getGroups_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Group]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -8140,10 +8280,10 @@ TalkService_getHiddenContactMids_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -8261,10 +8401,10 @@ TalkService_getIdentityIdentifier_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -8360,10 +8500,10 @@ TalkService_getLastAnnouncementIndex_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -8459,10 +8599,10 @@ TalkService_getLastOpRevision_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -8527,13 +8667,13 @@ TalkService_getMessageBox_args = function(args) { this.messageBoxId = null; this.lastMessagesCount = null; if (args) { - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.messageBoxId !== undefined) { + if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } - if (args.lastMessagesCount !== undefined) { + if (args.lastMessagesCount !== undefined && args.lastMessagesCount !== null) { this.lastMessagesCount = args.lastMessagesCount; } } @@ -8612,10 +8752,10 @@ TalkService_getMessageBox_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.TMessageBox(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -8679,7 +8819,7 @@ TalkService_getMessageBox_result.prototype.write = function(output) { TalkService_getMessageBoxCompactWrapUp_args = function(args) { this.mid = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } } @@ -8737,10 +8877,10 @@ TalkService_getMessageBoxCompactWrapUp_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.TMessageBoxWrapUp(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -8805,10 +8945,10 @@ TalkService_getMessageBoxCompactWrapUpList_args = function(args) { this.start = null; this.messageBoxCount = null; if (args) { - if (args.start !== undefined) { + if (args.start !== undefined && args.start !== null) { this.start = args.start; } - if (args.messageBoxCount !== undefined) { + if (args.messageBoxCount !== undefined && args.messageBoxCount !== null) { this.messageBoxCount = args.messageBoxCount; } } @@ -8875,10 +9015,10 @@ TalkService_getMessageBoxCompactWrapUpList_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.TMessageBoxWrapUpResponse(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -8943,10 +9083,10 @@ TalkService_getMessageBoxList_args = function(args) { this.channelId = null; this.lastMessagesCount = null; if (args) { - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.lastMessagesCount !== undefined) { + if (args.lastMessagesCount !== undefined && args.lastMessagesCount !== null) { this.lastMessagesCount = args.lastMessagesCount; } } @@ -9013,10 +9153,10 @@ TalkService_getMessageBoxList_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.TMessageBox]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -9104,13 +9244,13 @@ TalkService_getMessageBoxListByStatus_args = function(args) { this.lastMessagesCount = null; this.status = null; if (args) { - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.lastMessagesCount !== undefined) { + if (args.lastMessagesCount !== undefined && args.lastMessagesCount !== null) { this.lastMessagesCount = args.lastMessagesCount; } - if (args.status !== undefined) { + if (args.status !== undefined && args.status !== null) { this.status = args.status; } } @@ -9189,10 +9329,10 @@ TalkService_getMessageBoxListByStatus_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.TMessageBox]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -9278,7 +9418,7 @@ TalkService_getMessageBoxListByStatus_result.prototype.write = function(output) TalkService_getMessageBoxWrapUp_args = function(args) { this.mid = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } } @@ -9336,10 +9476,10 @@ TalkService_getMessageBoxWrapUp_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.TMessageBoxWrapUp(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -9404,10 +9544,10 @@ TalkService_getMessageBoxWrapUpList_args = function(args) { this.start = null; this.messageBoxCount = null; if (args) { - if (args.start !== undefined) { + if (args.start !== undefined && args.start !== null) { this.start = args.start; } - if (args.messageBoxCount !== undefined) { + if (args.messageBoxCount !== undefined && args.messageBoxCount !== null) { this.messageBoxCount = args.messageBoxCount; } } @@ -9474,10 +9614,10 @@ TalkService_getMessageBoxWrapUpList_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.TMessageBoxWrapUpResponse(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -9544,16 +9684,16 @@ TalkService_getMessagesBySequenceNumber_args = function(args) { this.startSeq = null; this.endSeq = null; if (args) { - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.messageBoxId !== undefined) { + if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } - if (args.startSeq !== undefined) { + if (args.startSeq !== undefined && args.startSeq !== null) { this.startSeq = args.startSeq; } - if (args.endSeq !== undefined) { + if (args.endSeq !== undefined && args.endSeq !== null) { this.endSeq = args.endSeq; } } @@ -9644,10 +9784,10 @@ TalkService_getMessagesBySequenceNumber_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Message]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -9735,13 +9875,13 @@ TalkService_getNextMessages_args = function(args) { this.startSeq = null; this.messagesCount = null; if (args) { - if (args.messageBoxId !== undefined) { + if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } - if (args.startSeq !== undefined) { + if (args.startSeq !== undefined && args.startSeq !== null) { this.startSeq = args.startSeq; } - if (args.messagesCount !== undefined) { + if (args.messagesCount !== undefined && args.messagesCount !== null) { this.messagesCount = args.messagesCount; } } @@ -9820,10 +9960,10 @@ TalkService_getNextMessages_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Message]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -9909,7 +10049,7 @@ TalkService_getNextMessages_result.prototype.write = function(output) { TalkService_getNotificationPolicy_args = function(args) { this.carrier = null; if (args) { - if (args.carrier !== undefined) { + if (args.carrier !== undefined && args.carrier !== null) { this.carrier = args.carrier; } } @@ -9967,10 +10107,10 @@ TalkService_getNotificationPolicy_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -10057,13 +10197,13 @@ TalkService_getPreviousMessages_args = function(args) { this.endSeq = null; this.messagesCount = null; if (args) { - if (args.messageBoxId !== undefined) { + if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } - if (args.endSeq !== undefined) { + if (args.endSeq !== undefined && args.endSeq !== null) { this.endSeq = args.endSeq; } - if (args.messagesCount !== undefined) { + if (args.messagesCount !== undefined && args.messagesCount !== null) { this.messagesCount = args.messagesCount; } } @@ -10142,10 +10282,10 @@ TalkService_getPreviousMessages_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Message]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -10264,10 +10404,10 @@ TalkService_getProfile_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Profile(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -10331,7 +10471,7 @@ TalkService_getProfile_result.prototype.write = function(output) { TalkService_getProximityMatchCandidateList_args = function(args) { this.sessionId = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } @@ -10389,10 +10529,10 @@ TalkService_getProximityMatchCandidateList_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.ProximityMatchCandidateResult(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -10456,7 +10596,7 @@ TalkService_getProximityMatchCandidateList_result.prototype.write = function(out TalkService_getProximityMatchCandidates_args = function(args) { this.sessionId = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } @@ -10514,10 +10654,10 @@ TalkService_getProximityMatchCandidates_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Contact]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -10604,10 +10744,10 @@ TalkService_getRecentMessages_args = function(args) { this.messageBoxId = null; this.messagesCount = null; if (args) { - if (args.messageBoxId !== undefined) { + if (args.messageBoxId !== undefined && args.messageBoxId !== null) { this.messageBoxId = args.messageBoxId; } - if (args.messagesCount !== undefined) { + if (args.messagesCount !== undefined && args.messagesCount !== null) { this.messagesCount = args.messagesCount; } } @@ -10674,10 +10814,10 @@ TalkService_getRecentMessages_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.Message]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -10796,10 +10936,10 @@ TalkService_getRecommendationIds_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -10884,7 +11024,7 @@ TalkService_getRecommendationIds_result.prototype.write = function(output) { TalkService_getRoom_args = function(args) { this.roomId = null; if (args) { - if (args.roomId !== undefined) { + if (args.roomId !== undefined && args.roomId !== null) { this.roomId = args.roomId; } } @@ -10942,10 +11082,10 @@ TalkService_getRoom_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Room(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11009,7 +11149,7 @@ TalkService_getRoom_result.prototype.write = function(output) { TalkService_getRSAKeyInfo_args = function(args) { this.provider = null; if (args) { - if (args.provider !== undefined) { + if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } } @@ -11067,10 +11207,10 @@ TalkService_getRSAKeyInfo_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.RSAKey(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11167,10 +11307,10 @@ TalkService_getServerTime_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11266,10 +11406,10 @@ TalkService_getSessions_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.LoginSession]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11388,10 +11528,10 @@ TalkService_getSettings_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Settings(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11455,7 +11595,7 @@ TalkService_getSettings_result.prototype.write = function(output) { TalkService_getSettingsAttributes_args = function(args) { this.attrBitset = null; if (args) { - if (args.attrBitset !== undefined) { + if (args.attrBitset !== undefined && args.attrBitset !== null) { this.attrBitset = args.attrBitset; } } @@ -11513,10 +11653,10 @@ TalkService_getSettingsAttributes_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Settings(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11613,10 +11753,10 @@ TalkService_getSystemConfiguration_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.SystemConfiguration(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11713,10 +11853,10 @@ TalkService_getUserTicket_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Ticket(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11780,7 +11920,7 @@ TalkService_getUserTicket_result.prototype.write = function(output) { TalkService_getWapInvitation_args = function(args) { this.invitationHash = null; if (args) { - if (args.invitationHash !== undefined) { + if (args.invitationHash !== undefined && args.invitationHash !== null) { this.invitationHash = args.invitationHash; } } @@ -11838,10 +11978,10 @@ TalkService_getWapInvitation_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.WapInvitation(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11937,7 +12077,7 @@ TalkService_invalidateUserTicket_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -11991,8 +12131,8 @@ TalkService_invalidateUserTicket_result.prototype.write = function(output) { TalkService_inviteFriendsBySms_args = function(args) { this.phoneNumberList = null; if (args) { - if (args.phoneNumberList !== undefined) { - this.phoneNumberList = args.phoneNumberList; + if (args.phoneNumberList !== undefined && args.phoneNumberList !== null) { + this.phoneNumberList = Thrift.copyList(args.phoneNumberList, [null]); } } }; @@ -12070,7 +12210,7 @@ TalkService_inviteFriendsBySms_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -12126,14 +12266,14 @@ TalkService_inviteIntoGroup_args = function(args) { this.groupId = null; this.contactIds = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.groupId !== undefined) { + if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } - if (args.contactIds !== undefined) { - this.contactIds = args.contactIds; + if (args.contactIds !== undefined && args.contactIds !== null) { + this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; @@ -12232,7 +12372,7 @@ TalkService_inviteIntoGroup_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -12288,14 +12428,14 @@ TalkService_inviteIntoRoom_args = function(args) { this.roomId = null; this.contactIds = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.roomId !== undefined) { + if (args.roomId !== undefined && args.roomId !== null) { this.roomId = args.roomId; } - if (args.contactIds !== undefined) { - this.contactIds = args.contactIds; + if (args.contactIds !== undefined && args.contactIds !== null) { + this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; @@ -12394,7 +12534,7 @@ TalkService_inviteIntoRoom_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -12450,13 +12590,13 @@ TalkService_inviteViaEmail_args = function(args) { this.email = null; this.name = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.email !== undefined) { + if (args.email !== undefined && args.email !== null) { this.email = args.email; } - if (args.name !== undefined) { + if (args.name !== undefined && args.name !== null) { this.name = args.name; } } @@ -12534,7 +12674,7 @@ TalkService_inviteViaEmail_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -12589,10 +12729,10 @@ TalkService_isIdentityIdentifierAvailable_args = function(args) { this.provider = null; this.identifier = null; if (args) { - if (args.provider !== undefined) { + if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } } @@ -12659,10 +12799,10 @@ TalkService_isIdentityIdentifierAvailable_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -12725,7 +12865,7 @@ TalkService_isIdentityIdentifierAvailable_result.prototype.write = function(outp TalkService_isUseridAvailable_args = function(args) { this.userid = null; if (args) { - if (args.userid !== undefined) { + if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } @@ -12783,10 +12923,10 @@ TalkService_isUseridAvailable_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -12851,14 +12991,14 @@ TalkService_kickoutFromGroup_args = function(args) { this.groupId = null; this.contactIds = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.groupId !== undefined) { + if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } - if (args.contactIds !== undefined) { - this.contactIds = args.contactIds; + if (args.contactIds !== undefined && args.contactIds !== null) { + this.contactIds = Thrift.copyList(args.contactIds, [null]); } } }; @@ -12957,7 +13097,7 @@ TalkService_kickoutFromGroup_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -13008,20 +13148,16 @@ TalkService_kickoutFromGroup_result.prototype.write = function(output) { return; }; -TalkService_leaveGroup_args = function(args) { - this.reqSeq = null; +TalkService_reissueGroupTicket_args = function(args) { this.groupId = null; if (args) { - if (args.reqSeq !== undefined) { - this.reqSeq = args.reqSeq; - } - if (args.groupId !== undefined) { + if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } }; -TalkService_leaveGroup_args.prototype = {}; -TalkService_leaveGroup_args.prototype.read = function(input) { +TalkService_reissueGroupTicket_args.prototype = {}; +TalkService_reissueGroupTicket_args.prototype.read = function(input) { input.readStructBegin(); while (true) { @@ -13035,19 +13171,15 @@ TalkService_leaveGroup_args.prototype.read = function(input) { switch (fid) { case 1: - if (ftype == Thrift.Type.I32) { - this.reqSeq = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: if (ftype == Thrift.Type.STRING) { this.groupId = input.readString(); } else { input.skip(ftype); } break; + case 0: + input.skip(ftype); + break; default: input.skip(ftype); } @@ -13057,15 +13189,10 @@ TalkService_leaveGroup_args.prototype.read = function(input) { return; }; -TalkService_leaveGroup_args.prototype.write = function(output) { - output.writeStructBegin('TalkService_leaveGroup_args'); - if (this.reqSeq !== null && this.reqSeq !== undefined) { - output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); - output.writeI32(this.reqSeq); - output.writeFieldEnd(); - } +TalkService_reissueGroupTicket_args.prototype.write = function(output) { + output.writeStructBegin('TalkService_reissueGroupTicket_args'); if (this.groupId !== null && this.groupId !== undefined) { - output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); + output.writeFieldBegin('groupId', Thrift.Type.STRING, 1); output.writeString(this.groupId); output.writeFieldEnd(); } @@ -13074,20 +13201,24 @@ TalkService_leaveGroup_args.prototype.write = function(output) { return; }; -TalkService_leaveGroup_result = function(args) { +TalkService_reissueGroupTicket_result = function(args) { + this.success = null; this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { - if (args.e !== undefined) { + if (args.success !== undefined && args.success !== null) { + this.success = args.success; + } + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; -TalkService_leaveGroup_result.prototype = {}; -TalkService_leaveGroup_result.prototype.read = function(input) { +TalkService_reissueGroupTicket_result.prototype = {}; +TalkService_reissueGroupTicket_result.prototype.read = function(input) { input.readStructBegin(); while (true) { @@ -13100,6 +13231,13 @@ TalkService_leaveGroup_result.prototype.read = function(input) { } switch (fid) { + case 0: + if (ftype == Thrift.Type.STRING) { + this.success = input.readString(); + } else { + input.skip(ftype); + } + break; case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new ttypes.TalkException(); @@ -13108,9 +13246,6 @@ TalkService_leaveGroup_result.prototype.read = function(input) { input.skip(ftype); } break; - case 0: - input.skip(ftype); - break; default: input.skip(ftype); } @@ -13120,8 +13255,13 @@ TalkService_leaveGroup_result.prototype.read = function(input) { return; }; -TalkService_leaveGroup_result.prototype.write = function(output) { - output.writeStructBegin('TalkService_leaveGroup_result'); +TalkService_reissueGroupTicket_result.prototype.write = function(output) { + output.writeStructBegin('TalkService_reissueGroupTicket_result'); + if (this.success !== null && this.success !== undefined) { + output.writeFieldBegin('success', Thrift.Type.STRING, 0); + output.writeString(this.success); + output.writeFieldEnd(); + } if (this.e !== null && this.e !== undefined) { output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); this.e.write(output); @@ -13132,20 +13272,20 @@ TalkService_leaveGroup_result.prototype.write = function(output) { return; }; -TalkService_leaveRoom_args = function(args) { +TalkService_leaveGroup_args = function(args) { this.reqSeq = null; - this.roomId = null; + this.groupId = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.roomId !== undefined) { - this.roomId = args.roomId; + if (args.groupId !== undefined && args.groupId !== null) { + this.groupId = args.groupId; } } }; -TalkService_leaveRoom_args.prototype = {}; -TalkService_leaveRoom_args.prototype.read = function(input) { +TalkService_leaveGroup_args.prototype = {}; +TalkService_leaveGroup_args.prototype.read = function(input) { input.readStructBegin(); while (true) { @@ -13167,7 +13307,7 @@ TalkService_leaveRoom_args.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.roomId = input.readString(); + this.groupId = input.readString(); } else { input.skip(ftype); } @@ -13181,16 +13321,16 @@ TalkService_leaveRoom_args.prototype.read = function(input) { return; }; -TalkService_leaveRoom_args.prototype.write = function(output) { - output.writeStructBegin('TalkService_leaveRoom_args'); +TalkService_leaveGroup_args.prototype.write = function(output) { + output.writeStructBegin('TalkService_leaveGroup_args'); if (this.reqSeq !== null && this.reqSeq !== undefined) { output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); output.writeI32(this.reqSeq); output.writeFieldEnd(); } - if (this.roomId !== null && this.roomId !== undefined) { - output.writeFieldBegin('roomId', Thrift.Type.STRING, 2); - output.writeString(this.roomId); + if (this.groupId !== null && this.groupId !== undefined) { + output.writeFieldBegin('groupId', Thrift.Type.STRING, 2); + output.writeString(this.groupId); output.writeFieldEnd(); } output.writeFieldStop(); @@ -13198,20 +13338,144 @@ TalkService_leaveRoom_args.prototype.write = function(output) { return; }; -TalkService_leaveRoom_result = function(args) { +TalkService_leaveGroup_result = function(args) { this.e = null; if (args instanceof ttypes.TalkException) { this.e = args; return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } }; -TalkService_leaveRoom_result.prototype = {}; -TalkService_leaveRoom_result.prototype.read = function(input) { +TalkService_leaveGroup_result.prototype = {}; +TalkService_leaveGroup_result.prototype.read = function(input) { + input.readStructBegin(); + while (true) + { + var ret = input.readFieldBegin(); + var fname = ret.fname; + var ftype = ret.ftype; + var fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == Thrift.Type.STRUCT) { + this.e = new ttypes.TalkException(); + this.e.read(input); + } else { + input.skip(ftype); + } + break; + case 0: + input.skip(ftype); + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; +}; + +TalkService_leaveGroup_result.prototype.write = function(output) { + output.writeStructBegin('TalkService_leaveGroup_result'); + if (this.e !== null && this.e !== undefined) { + output.writeFieldBegin('e', Thrift.Type.STRUCT, 1); + this.e.write(output); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; +}; + +TalkService_leaveRoom_args = function(args) { + this.reqSeq = null; + this.roomId = null; + if (args) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { + this.reqSeq = args.reqSeq; + } + if (args.roomId !== undefined && args.roomId !== null) { + this.roomId = args.roomId; + } + } +}; +TalkService_leaveRoom_args.prototype = {}; +TalkService_leaveRoom_args.prototype.read = function(input) { + input.readStructBegin(); + while (true) + { + var ret = input.readFieldBegin(); + var fname = ret.fname; + var ftype = ret.ftype; + var fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == Thrift.Type.I32) { + this.reqSeq = input.readI32(); + } else { + input.skip(ftype); + } + break; + case 2: + if (ftype == Thrift.Type.STRING) { + this.roomId = input.readString(); + } else { + input.skip(ftype); + } + break; + default: + input.skip(ftype); + } + input.readFieldEnd(); + } + input.readStructEnd(); + return; +}; + +TalkService_leaveRoom_args.prototype.write = function(output) { + output.writeStructBegin('TalkService_leaveRoom_args'); + if (this.reqSeq !== null && this.reqSeq !== undefined) { + output.writeFieldBegin('reqSeq', Thrift.Type.I32, 1); + output.writeI32(this.reqSeq); + output.writeFieldEnd(); + } + if (this.roomId !== null && this.roomId !== undefined) { + output.writeFieldBegin('roomId', Thrift.Type.STRING, 2); + output.writeString(this.roomId); + output.writeFieldEnd(); + } + output.writeFieldStop(); + output.writeStructEnd(); + return; +}; + +TalkService_leaveRoom_result = function(args) { + this.e = null; + if (args instanceof ttypes.TalkException) { + this.e = args; + return; + } + if (args) { + if (args.e !== undefined && args.e !== null) { + this.e = args.e; + } + } +}; +TalkService_leaveRoom_result.prototype = {}; +TalkService_leaveRoom_result.prototype.read = function(input) { input.readStructBegin(); while (true) { @@ -13265,25 +13529,25 @@ TalkService_loginWithIdentityCredential_args = function(args) { this.systemName = null; this.certificate = null; if (args) { - if (args.identityProvider !== undefined) { + if (args.identityProvider !== undefined && args.identityProvider !== null) { this.identityProvider = args.identityProvider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } - if (args.password !== undefined) { + if (args.password !== undefined && args.password !== null) { this.password = args.password; } - if (args.keepLoggedIn !== undefined) { + if (args.keepLoggedIn !== undefined && args.keepLoggedIn !== null) { this.keepLoggedIn = args.keepLoggedIn; } - if (args.accessLocation !== undefined) { + if (args.accessLocation !== undefined && args.accessLocation !== null) { this.accessLocation = args.accessLocation; } - if (args.systemName !== undefined) { + if (args.systemName !== undefined && args.systemName !== null) { this.systemName = args.systemName; } - if (args.certificate !== undefined) { + if (args.certificate !== undefined && args.certificate !== null) { this.certificate = args.certificate; } } @@ -13410,10 +13674,10 @@ TalkService_loginWithIdentityCredential_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -13482,25 +13746,25 @@ TalkService_loginWithIdentityCredentialForCertificate_args = function(args) { this.systemName = null; this.certificate = null; if (args) { - if (args.identityProvider !== undefined) { + if (args.identityProvider !== undefined && args.identityProvider !== null) { this.identityProvider = args.identityProvider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } - if (args.password !== undefined) { + if (args.password !== undefined && args.password !== null) { this.password = args.password; } - if (args.keepLoggedIn !== undefined) { + if (args.keepLoggedIn !== undefined && args.keepLoggedIn !== null) { this.keepLoggedIn = args.keepLoggedIn; } - if (args.accessLocation !== undefined) { + if (args.accessLocation !== undefined && args.accessLocation !== null) { this.accessLocation = args.accessLocation; } - if (args.systemName !== undefined) { + if (args.systemName !== undefined && args.systemName !== null) { this.systemName = args.systemName; } - if (args.certificate !== undefined) { + if (args.certificate !== undefined && args.certificate !== null) { this.certificate = args.certificate; } } @@ -13627,10 +13891,10 @@ TalkService_loginWithIdentityCredentialForCertificate_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.LoginResult(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -13694,7 +13958,7 @@ TalkService_loginWithIdentityCredentialForCertificate_result.prototype.write = f TalkService_loginWithVerifier_args = function(args) { this.verifier = null; if (args) { - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } @@ -13752,10 +14016,10 @@ TalkService_loginWithVerifier_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -13818,7 +14082,7 @@ TalkService_loginWithVerifier_result.prototype.write = function(output) { TalkService_loginWithVerifierForCerificate_args = function(args) { this.verifier = null; if (args) { - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } @@ -13876,10 +14140,10 @@ TalkService_loginWithVerifierForCerificate_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.LoginResult(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -13943,7 +14207,7 @@ TalkService_loginWithVerifierForCerificate_result.prototype.write = function(out TalkService_loginWithVerifierForCertificate_args = function(args) { this.verifier = null; if (args) { - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } @@ -14001,10 +14265,10 @@ TalkService_loginWithVerifierForCertificate_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.LoginResult(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -14100,7 +14364,7 @@ TalkService_logout_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -14154,7 +14418,7 @@ TalkService_logout_result.prototype.write = function(output) { TalkService_logoutSession_args = function(args) { this.tokenKey = null; if (args) { - if (args.tokenKey !== undefined) { + if (args.tokenKey !== undefined && args.tokenKey !== null) { this.tokenKey = args.tokenKey; } } @@ -14211,7 +14475,7 @@ TalkService_logoutSession_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -14297,7 +14561,7 @@ TalkService_noop_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -14351,8 +14615,8 @@ TalkService_noop_result.prototype.write = function(output) { TalkService_notifiedRedirect_args = function(args) { this.paramMap = null; if (args) { - if (args.paramMap !== undefined) { - this.paramMap = args.paramMap; + if (args.paramMap !== undefined && args.paramMap !== null) { + this.paramMap = Thrift.copyMap(args.paramMap, [null]); } } }; @@ -14435,7 +14699,7 @@ TalkService_notifiedRedirect_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -14490,11 +14754,11 @@ TalkService_notifyBuddyOnAir_args = function(args) { this.seq = null; this.receiverMids = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.receiverMids !== undefined) { - this.receiverMids = args.receiverMids; + if (args.receiverMids !== undefined && args.receiverMids !== null) { + this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; @@ -14582,10 +14846,10 @@ TalkService_notifyBuddyOnAir_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -14676,11 +14940,11 @@ TalkService_notifyIndividualEvent_args = function(args) { this.notificationStatus = null; this.receiverMids = null; if (args) { - if (args.notificationStatus !== undefined) { + if (args.notificationStatus !== undefined && args.notificationStatus !== null) { this.notificationStatus = args.notificationStatus; } - if (args.receiverMids !== undefined) { - this.receiverMids = args.receiverMids; + if (args.receiverMids !== undefined && args.receiverMids !== null) { + this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; @@ -14767,7 +15031,7 @@ TalkService_notifyIndividualEvent_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -14822,10 +15086,10 @@ TalkService_notifyInstalled_args = function(args) { this.udidHash = null; this.applicationTypeWithExtensions = null; if (args) { - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } - if (args.applicationTypeWithExtensions !== undefined) { + if (args.applicationTypeWithExtensions !== undefined && args.applicationTypeWithExtensions !== null) { this.applicationTypeWithExtensions = args.applicationTypeWithExtensions; } } @@ -14916,10 +15180,10 @@ TalkService_notifyRegistrationComplete_args = function(args) { this.udidHash = null; this.applicationTypeWithExtensions = null; if (args) { - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } - if (args.applicationTypeWithExtensions !== undefined) { + if (args.applicationTypeWithExtensions !== undefined && args.applicationTypeWithExtensions !== null) { this.applicationTypeWithExtensions = args.applicationTypeWithExtensions; } } @@ -15010,10 +15274,10 @@ TalkService_notifySleep_args = function(args) { this.lastRev = null; this.badge = null; if (args) { - if (args.lastRev !== undefined) { + if (args.lastRev !== undefined && args.lastRev !== null) { this.lastRev = args.lastRev; } - if (args.badge !== undefined) { + if (args.badge !== undefined && args.badge !== null) { this.badge = args.badge; } } @@ -15079,7 +15343,7 @@ TalkService_notifySleep_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -15134,11 +15398,11 @@ TalkService_notifyUpdated_args = function(args) { this.lastRev = null; this.deviceInfo = null; if (args) { - if (args.lastRev !== undefined) { + if (args.lastRev !== undefined && args.lastRev !== null) { this.lastRev = args.lastRev; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; @@ -15204,7 +15468,7 @@ TalkService_notifyUpdated_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -15258,8 +15522,8 @@ TalkService_notifyUpdated_result.prototype.write = function(output) { TalkService_openProximityMatch_args = function(args) { this.location = null; if (args) { - if (args.location !== undefined) { - this.location = args.location; + if (args.location !== undefined && args.location !== null) { + this.location = new ttypes.Location(args.location); } } }; @@ -15317,10 +15581,10 @@ TalkService_openProximityMatch_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -15384,10 +15648,10 @@ TalkService_registerBuddyUser_args = function(args) { this.buddyId = null; this.registrarPassword = null; if (args) { - if (args.buddyId !== undefined) { + if (args.buddyId !== undefined && args.buddyId !== null) { this.buddyId = args.buddyId; } - if (args.registrarPassword !== undefined) { + if (args.registrarPassword !== undefined && args.registrarPassword !== null) { this.registrarPassword = args.registrarPassword; } } @@ -15454,10 +15718,10 @@ TalkService_registerBuddyUser_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -15521,10 +15785,10 @@ TalkService_registerBuddyUserid_args = function(args) { this.seq = null; this.userid = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.userid !== undefined) { + if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } @@ -15590,7 +15854,7 @@ TalkService_registerBuddyUserid_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -15644,7 +15908,7 @@ TalkService_registerBuddyUserid_result.prototype.write = function(output) { TalkService_registerDevice_args = function(args) { this.sessionId = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } @@ -15702,10 +15966,10 @@ TalkService_registerDevice_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -15771,16 +16035,16 @@ TalkService_registerDeviceWithIdentityCredential_args = function(args) { this.identifier = null; this.verifier = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } - if (args.provider !== undefined) { + if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } @@ -15871,10 +16135,10 @@ TalkService_registerDeviceWithIdentityCredential_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -15939,14 +16203,14 @@ TalkService_registerDeviceWithoutPhoneNumber_args = function(args) { this.udidHash = null; this.deviceInfo = null; if (args) { - if (args.region !== undefined) { + if (args.region !== undefined && args.region !== null) { this.region = args.region; } - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; @@ -16025,10 +16289,10 @@ TalkService_registerDeviceWithoutPhoneNumber_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -16097,25 +16361,25 @@ TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_args = functi this.verifier = null; this.mid = null; if (args) { - if (args.region !== undefined) { + if (args.region !== undefined && args.region !== null) { this.region = args.region; } - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } - if (args.provider !== undefined) { + if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } } @@ -16243,10 +16507,10 @@ TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result = func return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -16310,10 +16574,10 @@ TalkService_registerUserid_args = function(args) { this.reqSeq = null; this.userid = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.userid !== undefined) { + if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } } @@ -16380,10 +16644,10 @@ TalkService_registerUserid_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -16449,17 +16713,17 @@ TalkService_registerWapDevice_args = function(args) { this.email = null; this.deviceInfo = null; if (args) { - if (args.invitationHash !== undefined) { + if (args.invitationHash !== undefined && args.invitationHash !== null) { this.invitationHash = args.invitationHash; } - if (args.guidHash !== undefined) { + if (args.guidHash !== undefined && args.guidHash !== null) { this.guidHash = args.guidHash; } - if (args.email !== undefined) { + if (args.email !== undefined && args.email !== null) { this.email = args.email; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; @@ -16550,10 +16814,10 @@ TalkService_registerWapDevice_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -16619,17 +16883,17 @@ TalkService_registerWithExistingSnsIdAndIdentityCredential_args = function(args) this.udidHash = null; this.deviceInfo = null; if (args) { - if (args.identityCredential !== undefined) { - this.identityCredential = args.identityCredential; + if (args.identityCredential !== undefined && args.identityCredential !== null) { + this.identityCredential = new ttypes.IdentityCredential(args.identityCredential); } - if (args.region !== undefined) { + if (args.region !== undefined && args.region !== null) { this.region = args.region; } - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; @@ -16721,10 +16985,10 @@ TalkService_registerWithExistingSnsIdAndIdentityCredential_result = function(arg return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -16792,22 +17056,22 @@ TalkService_registerWithSnsId_args = function(args) { this.deviceInfo = null; this.mid = null; if (args) { - if (args.snsIdType !== undefined) { + if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } - if (args.snsAccessToken !== undefined) { + if (args.snsAccessToken !== undefined && args.snsAccessToken !== null) { this.snsAccessToken = args.snsAccessToken; } - if (args.region !== undefined) { + if (args.region !== undefined && args.region !== null) { this.region = args.region; } - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } } @@ -16923,10 +17187,10 @@ TalkService_registerWithSnsId_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.RegisterWithSnsIdResult(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -16995,23 +17259,23 @@ TalkService_registerWithSnsIdAndIdentityCredential_args = function(args) { this.udidHash = null; this.deviceInfo = null; if (args) { - if (args.snsIdType !== undefined) { + if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } - if (args.snsAccessToken !== undefined) { + if (args.snsAccessToken !== undefined && args.snsAccessToken !== null) { this.snsAccessToken = args.snsAccessToken; } - if (args.identityCredential !== undefined) { - this.identityCredential = args.identityCredential; + if (args.identityCredential !== undefined && args.identityCredential !== null) { + this.identityCredential = new ttypes.IdentityCredential(args.identityCredential); } - if (args.region !== undefined) { + if (args.region !== undefined && args.region !== null) { this.region = args.region; } - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; @@ -17127,10 +17391,10 @@ TalkService_registerWithSnsIdAndIdentityCredential_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -17226,10 +17490,10 @@ TalkService_reissueDeviceCredential_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -17293,10 +17557,10 @@ TalkService_reissueUserTicket_args = function(args) { this.expirationTime = null; this.maxUseCount = null; if (args) { - if (args.expirationTime !== undefined) { + if (args.expirationTime !== undefined && args.expirationTime !== null) { this.expirationTime = args.expirationTime; } - if (args.maxUseCount !== undefined) { + if (args.maxUseCount !== undefined && args.maxUseCount !== null) { this.maxUseCount = args.maxUseCount; } } @@ -17363,10 +17627,10 @@ TalkService_reissueUserTicket_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -17430,10 +17694,10 @@ TalkService_rejectGroupInvitation_args = function(args) { this.reqSeq = null; this.groupId = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.groupId !== undefined) { + if (args.groupId !== undefined && args.groupId !== null) { this.groupId = args.groupId; } } @@ -17499,7 +17763,7 @@ TalkService_rejectGroupInvitation_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -17585,7 +17849,7 @@ TalkService_releaseSession_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -17640,10 +17904,10 @@ TalkService_removeAllMessages_args = function(args) { this.seq = null; this.lastMessageId = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.lastMessageId !== undefined) { + if (args.lastMessageId !== undefined && args.lastMessageId !== null) { this.lastMessageId = args.lastMessageId; } } @@ -17709,7 +17973,7 @@ TalkService_removeAllMessages_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -17764,10 +18028,10 @@ TalkService_removeBuddyLocation_args = function(args) { this.mid = null; this.index = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.index !== undefined) { + if (args.index !== undefined && args.index !== null) { this.index = args.index; } } @@ -17833,7 +18097,7 @@ TalkService_removeBuddyLocation_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -17887,7 +18151,7 @@ TalkService_removeBuddyLocation_result.prototype.write = function(output) { TalkService_removeMessage_args = function(args) { this.messageId = null; if (args) { - if (args.messageId !== undefined) { + if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } } @@ -17945,10 +18209,10 @@ TalkService_removeMessage_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -18011,7 +18275,7 @@ TalkService_removeMessage_result.prototype.write = function(output) { TalkService_removeMessageFromMyHome_args = function(args) { this.messageId = null; if (args) { - if (args.messageId !== undefined) { + if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } } @@ -18069,10 +18333,10 @@ TalkService_removeMessageFromMyHome_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -18135,7 +18399,7 @@ TalkService_removeMessageFromMyHome_result.prototype.write = function(output) { TalkService_removeSnsId_args = function(args) { this.snsIdType = null; if (args) { - if (args.snsIdType !== undefined) { + if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } } @@ -18193,10 +18457,10 @@ TalkService_removeSnsId_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -18261,13 +18525,13 @@ TalkService_report_args = function(args) { this.category = null; this.report = null; if (args) { - if (args.syncOpRevision !== undefined) { + if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } - if (args.category !== undefined) { + if (args.category !== undefined && args.category !== null) { this.category = args.category; } - if (args.report !== undefined) { + if (args.report !== undefined && args.report !== null) { this.report = args.report; } } @@ -18345,7 +18609,7 @@ TalkService_report_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -18402,16 +18666,16 @@ TalkService_reportContacts_args = function(args) { this.contactReports = null; this.actionType = null; if (args) { - if (args.syncOpRevision !== undefined) { + if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } - if (args.category !== undefined) { + if (args.category !== undefined && args.category !== null) { this.category = args.category; } - if (args.contactReports !== undefined) { - this.contactReports = args.contactReports; + if (args.contactReports !== undefined && args.contactReports !== null) { + this.contactReports = Thrift.copyList(args.contactReports, [ttypes.ContactReport]); } - if (args.actionType !== undefined) { + if (args.actionType !== undefined && args.actionType !== null) { this.actionType = args.actionType; } } @@ -18525,10 +18789,10 @@ TalkService_reportContacts_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.ContactReportResult]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -18615,11 +18879,11 @@ TalkService_reportGroups_args = function(args) { this.syncOpRevision = null; this.groups = null; if (args) { - if (args.syncOpRevision !== undefined) { + if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } - if (args.groups !== undefined) { - this.groups = args.groups; + if (args.groups !== undefined && args.groups !== null) { + this.groups = Thrift.copyList(args.groups, [ttypes.Group]); } } }; @@ -18707,7 +18971,7 @@ TalkService_reportGroups_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -18762,11 +19026,11 @@ TalkService_reportProfile_args = function(args) { this.syncOpRevision = null; this.profile = null; if (args) { - if (args.syncOpRevision !== undefined) { + if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } - if (args.profile !== undefined) { - this.profile = args.profile; + if (args.profile !== undefined && args.profile !== null) { + this.profile = new ttypes.Profile(args.profile); } } }; @@ -18832,7 +19096,7 @@ TalkService_reportProfile_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -18887,11 +19151,11 @@ TalkService_reportRooms_args = function(args) { this.syncOpRevision = null; this.rooms = null; if (args) { - if (args.syncOpRevision !== undefined) { + if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } - if (args.rooms !== undefined) { - this.rooms = args.rooms; + if (args.rooms !== undefined && args.rooms !== null) { + this.rooms = Thrift.copyList(args.rooms, [ttypes.Room]); } } }; @@ -18979,7 +19243,7 @@ TalkService_reportRooms_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -19034,11 +19298,11 @@ TalkService_reportSettings_args = function(args) { this.syncOpRevision = null; this.settings = null; if (args) { - if (args.syncOpRevision !== undefined) { + if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { this.syncOpRevision = args.syncOpRevision; } - if (args.settings !== undefined) { - this.settings = args.settings; + if (args.settings !== undefined && args.settings !== null) { + this.settings = new ttypes.Settings(args.settings); } } }; @@ -19104,7 +19368,7 @@ TalkService_reportSettings_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -19160,14 +19424,14 @@ TalkService_reportSpammer_args = function(args) { this.spammerReasons = null; this.spamMessageIds = null; if (args) { - if (args.spammerMid !== undefined) { + if (args.spammerMid !== undefined && args.spammerMid !== null) { this.spammerMid = args.spammerMid; } - if (args.spammerReasons !== undefined) { - this.spammerReasons = args.spammerReasons; + if (args.spammerReasons !== undefined && args.spammerReasons !== null) { + this.spammerReasons = Thrift.copyList(args.spammerReasons, [null]); } - if (args.spamMessageIds !== undefined) { - this.spamMessageIds = args.spamMessageIds; + if (args.spamMessageIds !== undefined && args.spamMessageIds !== null) { + this.spamMessageIds = Thrift.copyList(args.spamMessageIds, [null]); } } }; @@ -19288,7 +19552,7 @@ TalkService_reportSpammer_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -19344,13 +19608,13 @@ TalkService_requestAccountPasswordReset_args = function(args) { this.identifier = null; this.locale = null; if (args) { - if (args.provider !== undefined) { + if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } - if (args.locale !== undefined) { + if (args.locale !== undefined && args.locale !== null) { this.locale = args.locale; } } @@ -19428,7 +19692,7 @@ TalkService_requestAccountPasswordReset_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -19482,8 +19746,8 @@ TalkService_requestAccountPasswordReset_result.prototype.write = function(output TalkService_requestEmailConfirmation_args = function(args) { this.emailConfirmation = null; if (args) { - if (args.emailConfirmation !== undefined) { - this.emailConfirmation = args.emailConfirmation; + if (args.emailConfirmation !== undefined && args.emailConfirmation !== null) { + this.emailConfirmation = new ttypes.EmailConfirmation(args.emailConfirmation); } } }; @@ -19541,10 +19805,10 @@ TalkService_requestEmailConfirmation_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.EmailConfirmationSession(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -19609,10 +19873,10 @@ TalkService_requestIdentityUnbind_args = function(args) { this.provider = null; this.identifier = null; if (args) { - if (args.provider !== undefined) { + if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } } @@ -19678,7 +19942,7 @@ TalkService_requestIdentityUnbind_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -19732,7 +19996,7 @@ TalkService_requestIdentityUnbind_result.prototype.write = function(output) { TalkService_resendEmailConfirmation_args = function(args) { this.verifier = null; if (args) { - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } @@ -19790,10 +20054,10 @@ TalkService_resendEmailConfirmation_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.EmailConfirmationSession(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -19857,7 +20121,7 @@ TalkService_resendEmailConfirmation_result.prototype.write = function(output) { TalkService_resendPinCode_args = function(args) { this.sessionId = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } @@ -19914,7 +20178,7 @@ TalkService_resendPinCode_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -19968,7 +20232,7 @@ TalkService_resendPinCode_result.prototype.write = function(output) { TalkService_resendPinCodeBySMS_args = function(args) { this.sessionId = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } @@ -20025,7 +20289,7 @@ TalkService_resendPinCodeBySMS_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -20081,13 +20345,13 @@ TalkService_sendChatChecked_args = function(args) { this.consumer = null; this.lastMessageId = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.consumer !== undefined) { + if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } - if (args.lastMessageId !== undefined) { + if (args.lastMessageId !== undefined && args.lastMessageId !== null) { this.lastMessageId = args.lastMessageId; } } @@ -20165,7 +20429,7 @@ TalkService_sendChatChecked_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -20221,13 +20485,13 @@ TalkService_sendChatRemoved_args = function(args) { this.consumer = null; this.lastMessageId = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.consumer !== undefined) { + if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } - if (args.lastMessageId !== undefined) { + if (args.lastMessageId !== undefined && args.lastMessageId !== null) { this.lastMessageId = args.lastMessageId; } } @@ -20305,7 +20569,7 @@ TalkService_sendChatRemoved_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -20361,14 +20625,14 @@ TalkService_sendContentPreviewUpdated_args = function(args) { this.messageId = null; this.receiverMids = null; if (args) { - if (args.esq !== undefined) { + if (args.esq !== undefined && args.esq !== null) { this.esq = args.esq; } - if (args.messageId !== undefined) { + if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } - if (args.receiverMids !== undefined) { - this.receiverMids = args.receiverMids; + if (args.receiverMids !== undefined && args.receiverMids !== null) { + this.receiverMids = Thrift.copyList(args.receiverMids, [null]); } } }; @@ -20468,10 +20732,10 @@ TalkService_sendContentPreviewUpdated_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [null]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -20563,13 +20827,13 @@ TalkService_sendContentReceipt_args = function(args) { this.consumer = null; this.messageId = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.consumer !== undefined) { + if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } - if (args.messageId !== undefined) { + if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } } @@ -20647,7 +20911,7 @@ TalkService_sendContentReceipt_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -20733,7 +20997,7 @@ TalkService_sendDummyPush_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -20788,11 +21052,11 @@ TalkService_sendEvent_args = function(args) { this.seq = null; this.message = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.message !== undefined) { - this.message = args.message; + if (args.message !== undefined && args.message !== null) { + this.message = new ttypes.Message(args.message); } } }; @@ -20859,10 +21123,10 @@ TalkService_sendEvent_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Message(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -20927,11 +21191,11 @@ TalkService_sendMessage_args = function(args) { this.seq = null; this.message = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.message !== undefined) { - this.message = args.message; + if (args.message !== undefined && args.message !== null) { + this.message = new ttypes.Message(args.message); } } }; @@ -20998,10 +21262,10 @@ TalkService_sendMessage_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Message(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -21067,14 +21331,14 @@ TalkService_sendMessageIgnored_args = function(args) { this.consumer = null; this.messageIds = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.consumer !== undefined) { + if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } - if (args.messageIds !== undefined) { - this.messageIds = args.messageIds; + if (args.messageIds !== undefined && args.messageIds !== null) { + this.messageIds = Thrift.copyList(args.messageIds, [null]); } } }; @@ -21173,7 +21437,7 @@ TalkService_sendMessageIgnored_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -21229,14 +21493,14 @@ TalkService_sendMessageReceipt_args = function(args) { this.consumer = null; this.messageIds = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.consumer !== undefined) { + if (args.consumer !== undefined && args.consumer !== null) { this.consumer = args.consumer; } - if (args.messageIds !== undefined) { - this.messageIds = args.messageIds; + if (args.messageIds !== undefined && args.messageIds !== null) { + this.messageIds = Thrift.copyList(args.messageIds, [null]); } } }; @@ -21335,7 +21599,7 @@ TalkService_sendMessageReceipt_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -21390,11 +21654,11 @@ TalkService_sendMessageToMyHome_args = function(args) { this.seq = null; this.message = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.message !== undefined) { - this.message = args.message; + if (args.message !== undefined && args.message !== null) { + this.message = new ttypes.Message(args.message); } } }; @@ -21461,10 +21725,10 @@ TalkService_sendMessageToMyHome_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Message(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -21530,14 +21794,14 @@ TalkService_setBuddyLocation_args = function(args) { this.index = null; this.location = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.index !== undefined) { + if (args.index !== undefined && args.index !== null) { this.index = args.index; } - if (args.location !== undefined) { - this.location = args.location; + if (args.location !== undefined && args.location !== null) { + this.location = new ttypes.Geolocation(args.location); } } }; @@ -21615,7 +21879,7 @@ TalkService_setBuddyLocation_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -21671,13 +21935,13 @@ TalkService_setIdentityCredential_args = function(args) { this.identifier = null; this.verifier = null; if (args) { - if (args.provider !== undefined) { + if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } @@ -21755,7 +22019,7 @@ TalkService_setIdentityCredential_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -21812,16 +22076,16 @@ TalkService_setNotificationsEnabled_args = function(args) { this.target = null; this.enablement = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.target !== undefined) { + if (args.target !== undefined && args.target !== null) { this.target = args.target; } - if (args.enablement !== undefined) { + if (args.enablement !== undefined && args.enablement !== null) { this.enablement = args.enablement; } } @@ -21911,7 +22175,7 @@ TalkService_setNotificationsEnabled_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -21971,25 +22235,25 @@ TalkService_startUpdateVerification_args = function(args) { this.networkCode = null; this.locale = null; if (args) { - if (args.region !== undefined) { + if (args.region !== undefined && args.region !== null) { this.region = args.region; } - if (args.carrier !== undefined) { + if (args.carrier !== undefined && args.carrier !== null) { this.carrier = args.carrier; } - if (args.phone !== undefined) { + if (args.phone !== undefined && args.phone !== null) { this.phone = args.phone; } - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } - if (args.networkCode !== undefined) { + if (args.networkCode !== undefined && args.networkCode !== null) { this.networkCode = args.networkCode; } - if (args.locale !== undefined) { + if (args.locale !== undefined && args.locale !== null) { this.locale = args.locale; } } @@ -22117,10 +22381,10 @@ TalkService_startUpdateVerification_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.VerificationSessionData(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -22191,28 +22455,28 @@ TalkService_startVerification_args = function(args) { this.mid = null; this.locale = null; if (args) { - if (args.region !== undefined) { + if (args.region !== undefined && args.region !== null) { this.region = args.region; } - if (args.carrier !== undefined) { + if (args.carrier !== undefined && args.carrier !== null) { this.carrier = args.carrier; } - if (args.phone !== undefined) { + if (args.phone !== undefined && args.phone !== null) { this.phone = args.phone; } - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } - if (args.networkCode !== undefined) { + if (args.networkCode !== undefined && args.networkCode !== null) { this.networkCode = args.networkCode; } - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.locale !== undefined) { + if (args.locale !== undefined && args.locale !== null) { this.locale = args.locale; } } @@ -22352,10 +22616,10 @@ TalkService_startVerification_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.VerificationSessionData(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -22421,13 +22685,13 @@ TalkService_storeUpdateProfileAttribute_args = function(args) { this.profileAttribute = null; this.value = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.profileAttribute !== undefined) { + if (args.profileAttribute !== undefined && args.profileAttribute !== null) { this.profileAttribute = args.profileAttribute; } - if (args.value !== undefined) { + if (args.value !== undefined && args.value !== null) { this.value = args.value; } } @@ -22505,7 +22769,7 @@ TalkService_storeUpdateProfileAttribute_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -22560,11 +22824,11 @@ TalkService_syncContactBySnsIds_args = function(args) { this.reqSeq = null; this.modifications = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.modifications !== undefined) { - this.modifications = args.modifications; + if (args.modifications !== undefined && args.modifications !== null) { + this.modifications = Thrift.copyList(args.modifications, [ttypes.SnsFriendModification]); } } }; @@ -22653,10 +22917,10 @@ TalkService_syncContactBySnsIds_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyList(args.success, [ttypes.SnsFriendContactRegistration]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -22743,11 +23007,11 @@ TalkService_syncContacts_args = function(args) { this.reqSeq = null; this.localContacts = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.localContacts !== undefined) { - this.localContacts = args.localContacts; + if (args.localContacts !== undefined && args.localContacts !== null) { + this.localContacts = Thrift.copyList(args.localContacts, [ttypes.ContactModification]); } } }; @@ -22836,10 +23100,10 @@ TalkService_syncContacts_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = Thrift.copyMap(args.success, [ttypes.ContactRegistration]); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -22931,11 +23195,11 @@ TalkService_trySendMessage_args = function(args) { this.seq = null; this.message = null; if (args) { - if (args.seq !== undefined) { + if (args.seq !== undefined && args.seq !== null) { this.seq = args.seq; } - if (args.message !== undefined) { - this.message = args.message; + if (args.message !== undefined && args.message !== null) { + this.message = new ttypes.Message(args.message); } } }; @@ -23002,10 +23266,10 @@ TalkService_trySendMessage_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.Message(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -23070,10 +23334,10 @@ TalkService_unblockContact_args = function(args) { this.reqSeq = null; this.id = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } } @@ -23139,7 +23403,7 @@ TalkService_unblockContact_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -23194,10 +23458,10 @@ TalkService_unblockRecommendation_args = function(args) { this.reqSeq = null; this.id = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } } @@ -23263,7 +23527,7 @@ TalkService_unblockRecommendation_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -23350,10 +23614,10 @@ TalkService_unregisterUserAndDevice_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -23416,7 +23680,7 @@ TalkService_unregisterUserAndDevice_result.prototype.write = function(output) { TalkService_updateApnsDeviceToken_args = function(args) { this.apnsDeviceToken = null; if (args) { - if (args.apnsDeviceToken !== undefined) { + if (args.apnsDeviceToken !== undefined && args.apnsDeviceToken !== null) { this.apnsDeviceToken = args.apnsDeviceToken; } } @@ -23473,7 +23737,7 @@ TalkService_updateApnsDeviceToken_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -23528,10 +23792,10 @@ TalkService_updateBuddySetting_args = function(args) { this.key = null; this.value = null; if (args) { - if (args.key !== undefined) { + if (args.key !== undefined && args.key !== null) { this.key = args.key; } - if (args.value !== undefined) { + if (args.value !== undefined && args.value !== null) { this.value = args.value; } } @@ -23597,7 +23861,7 @@ TalkService_updateBuddySetting_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -23651,7 +23915,7 @@ TalkService_updateBuddySetting_result.prototype.write = function(output) { TalkService_updateC2DMRegistrationId_args = function(args) { this.registrationId = null; if (args) { - if (args.registrationId !== undefined) { + if (args.registrationId !== undefined && args.registrationId !== null) { this.registrationId = args.registrationId; } } @@ -23708,7 +23972,7 @@ TalkService_updateC2DMRegistrationId_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -23765,16 +24029,16 @@ TalkService_updateContactSetting_args = function(args) { this.flag = null; this.value = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.flag !== undefined) { + if (args.flag !== undefined && args.flag !== null) { this.flag = args.flag; } - if (args.value !== undefined) { + if (args.value !== undefined && args.value !== null) { this.value = args.value; } } @@ -23864,7 +24128,7 @@ TalkService_updateContactSetting_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -23919,11 +24183,11 @@ TalkService_updateCustomModeSettings_args = function(args) { this.customMode = null; this.paramMap = null; if (args) { - if (args.customMode !== undefined) { + if (args.customMode !== undefined && args.customMode !== null) { this.customMode = args.customMode; } - if (args.paramMap !== undefined) { - this.paramMap = args.paramMap; + if (args.paramMap !== undefined && args.paramMap !== null) { + this.paramMap = Thrift.copyMap(args.paramMap, [null]); } } }; @@ -24015,7 +24279,7 @@ TalkService_updateCustomModeSettings_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -24070,11 +24334,11 @@ TalkService_updateDeviceInfo_args = function(args) { this.deviceUid = null; this.deviceInfo = null; if (args) { - if (args.deviceUid !== undefined) { + if (args.deviceUid !== undefined && args.deviceUid !== null) { this.deviceUid = args.deviceUid; } - if (args.deviceInfo !== undefined) { - this.deviceInfo = args.deviceInfo; + if (args.deviceInfo !== undefined && args.deviceInfo !== null) { + this.deviceInfo = new ttypes.DeviceInfo(args.deviceInfo); } } }; @@ -24140,7 +24404,7 @@ TalkService_updateDeviceInfo_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -24195,11 +24459,11 @@ TalkService_updateGroup_args = function(args) { this.reqSeq = null; this.group = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.group !== undefined) { - this.group = args.group; + if (args.group !== undefined && args.group !== null) { + this.group = new ttypes.Group(args.group); } } }; @@ -24265,7 +24529,7 @@ TalkService_updateGroup_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -24320,10 +24584,10 @@ TalkService_updateNotificationToken_args = function(args) { this.type = null; this.token = null; if (args) { - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.token !== undefined) { + if (args.token !== undefined && args.token !== null) { this.token = args.token; } } @@ -24389,7 +24653,7 @@ TalkService_updateNotificationToken_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -24444,10 +24708,10 @@ TalkService_updateNotificationTokenWithBytes_args = function(args) { this.type = null; this.token = null; if (args) { - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.token !== undefined) { + if (args.token !== undefined && args.token !== null) { this.token = args.token; } } @@ -24513,7 +24777,7 @@ TalkService_updateNotificationTokenWithBytes_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -24568,11 +24832,11 @@ TalkService_updateProfile_args = function(args) { this.reqSeq = null; this.profile = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.profile !== undefined) { - this.profile = args.profile; + if (args.profile !== undefined && args.profile !== null) { + this.profile = new ttypes.Profile(args.profile); } } }; @@ -24638,7 +24902,7 @@ TalkService_updateProfile_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -24694,13 +24958,13 @@ TalkService_updateProfileAttribute_args = function(args) { this.attr = null; this.value = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.attr !== undefined) { + if (args.attr !== undefined && args.attr !== null) { this.attr = args.attr; } - if (args.value !== undefined) { + if (args.value !== undefined && args.value !== null) { this.value = args.value; } } @@ -24778,7 +25042,7 @@ TalkService_updateProfileAttribute_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -24832,7 +25096,7 @@ TalkService_updateProfileAttribute_result.prototype.write = function(output) { TalkService_updateRegion_args = function(args) { this.region = null; if (args) { - if (args.region !== undefined) { + if (args.region !== undefined && args.region !== null) { this.region = args.region; } } @@ -24889,7 +25153,7 @@ TalkService_updateRegion_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -24944,11 +25208,11 @@ TalkService_updateSettings_args = function(args) { this.reqSeq = null; this.settings = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.settings !== undefined) { - this.settings = args.settings; + if (args.settings !== undefined && args.settings !== null) { + this.settings = new ttypes.Settings(args.settings); } } }; @@ -25014,7 +25278,7 @@ TalkService_updateSettings_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -25069,11 +25333,11 @@ TalkService_updateSettings2_args = function(args) { this.reqSeq = null; this.settings = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.settings !== undefined) { - this.settings = args.settings; + if (args.settings !== undefined && args.settings !== null) { + this.settings = new ttypes.Settings(args.settings); } } }; @@ -25140,10 +25404,10 @@ TalkService_updateSettings2_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -25208,13 +25472,13 @@ TalkService_updateSettingsAttribute_args = function(args) { this.attr = null; this.value = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.attr !== undefined) { + if (args.attr !== undefined && args.attr !== null) { this.attr = args.attr; } - if (args.value !== undefined) { + if (args.value !== undefined && args.value !== null) { this.value = args.value; } } @@ -25292,7 +25556,7 @@ TalkService_updateSettingsAttribute_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -25348,14 +25612,14 @@ TalkService_updateSettingsAttributes_args = function(args) { this.attrBitset = null; this.settings = null; if (args) { - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.attrBitset !== undefined) { + if (args.attrBitset !== undefined && args.attrBitset !== null) { this.attrBitset = args.attrBitset; } - if (args.settings !== undefined) { - this.settings = args.settings; + if (args.settings !== undefined && args.settings !== null) { + this.settings = new ttypes.Settings(args.settings); } } }; @@ -25434,10 +25698,10 @@ TalkService_updateSettingsAttributes_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -25502,13 +25766,13 @@ TalkService_verifyIdentityCredential_args = function(args) { this.identifier = null; this.password = null; if (args) { - if (args.identityProvider !== undefined) { + if (args.identityProvider !== undefined && args.identityProvider !== null) { this.identityProvider = args.identityProvider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } - if (args.password !== undefined) { + if (args.password !== undefined && args.password !== null) { this.password = args.password; } } @@ -25586,7 +25850,7 @@ TalkService_verifyIdentityCredential_result = function(args) { return; } if (args) { - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -25640,8 +25904,8 @@ TalkService_verifyIdentityCredential_result.prototype.write = function(output) { TalkService_verifyIdentityCredentialWithResult_args = function(args) { this.identityCredential = null; if (args) { - if (args.identityCredential !== undefined) { - this.identityCredential = args.identityCredential; + if (args.identityCredential !== undefined && args.identityCredential !== null) { + this.identityCredential = new ttypes.IdentityCredential(args.identityCredential); } } }; @@ -25699,10 +25963,10 @@ TalkService_verifyIdentityCredentialWithResult_result = function(args) { return; } if (args) { - if (args.success !== undefined) { - this.success = args.success; + if (args.success !== undefined && args.success !== null) { + this.success = new ttypes.UserAuthStatus(args.success); } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -25768,13 +26032,13 @@ TalkService_verifyPhone_args = function(args) { this.pinCode = null; this.udidHash = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } - if (args.pinCode !== undefined) { + if (args.pinCode !== undefined && args.pinCode !== null) { this.pinCode = args.pinCode; } - if (args.udidHash !== undefined) { + if (args.udidHash !== undefined && args.udidHash !== null) { this.udidHash = args.udidHash; } } @@ -25853,10 +26117,10 @@ TalkService_verifyPhone_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -25920,10 +26184,10 @@ TalkService_verifyQrcode_args = function(args) { this.verifier = null; this.pinCode = null; if (args) { - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } - if (args.pinCode !== undefined) { + if (args.pinCode !== undefined && args.pinCode !== null) { this.pinCode = args.pinCode; } } @@ -25990,10 +26254,10 @@ TalkService_verifyQrcode_result = function(args) { return; } if (args) { - if (args.success !== undefined) { + if (args.success !== undefined && args.success !== null) { this.success = args.success; } - if (args.e !== undefined) { + if (args.e !== undefined && args.e !== null) { this.e = args.e; } } @@ -26110,6 +26374,55 @@ TalkServiceClient.prototype.recv_acceptGroupInvitation = function(input,mtype,rs } callback(null) }; +TalkServiceClient.prototype.acceptGroupInvitationByTicket = function(reqSeq, groupId, ticketId, callback) { + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_acceptGroupInvitationByTicket(reqSeq, groupId, ticketId); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_acceptGroupInvitationByTicket(reqSeq, groupId, ticketId); + } +}; + +TalkServiceClient.prototype.send_acceptGroupInvitationByTicket = function(reqSeq, groupId, ticketId) { + var output = new this.pClass(this.output); + output.writeMessageBegin('acceptGroupInvitationByTicket', Thrift.MessageType.CALL, this.seqid()); + var args = new TalkService_acceptGroupInvitationByTicket_args(); + args.reqSeq = reqSeq; + args.groupId = groupId; + args.ticketId = ticketId; + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); +}; + +TalkServiceClient.prototype.recv_acceptGroupInvitationByTicket = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; + if (mtype == Thrift.MessageType.EXCEPTION) { + var x = new Thrift.TApplicationException(); + x.read(input); + input.readMessageEnd(); + return callback(x); + } + var result = new TalkService_acceptGroupInvitationByTicket_result(); + result.read(input); + input.readMessageEnd(); + + if (null !== result.e) { + return callback(result.e); + } + callback(null) +}; TalkServiceClient.prototype.acceptProximityMatches = function(sessionId, ids, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { @@ -30705,6 +31018,56 @@ TalkServiceClient.prototype.recv_kickoutFromGroup = function(input,mtype,rseqid) } callback(null) }; +TalkServiceClient.prototype.reissueGroupTicket = function(groupId, callback) { + this._seqid = this.new_seqid(); + if (callback === undefined) { + var _defer = Q.defer(); + this._reqs[this.seqid()] = function(error, result) { + if (error) { + _defer.reject(error); + } else { + _defer.resolve(result); + } + }; + this.send_reissueGroupTicket(groupId); + return _defer.promise; + } else { + this._reqs[this.seqid()] = callback; + this.send_reissueGroupTicket(groupId); + } +}; + +TalkServiceClient.prototype.send_reissueGroupTicket = function(groupId) { + var output = new this.pClass(this.output); + output.writeMessageBegin('reissueGroupTicket', Thrift.MessageType.CALL, this.seqid()); + var args = new TalkService_reissueGroupTicket_args(); + args.groupId = groupId; + args.write(output); + output.writeMessageEnd(); + return this.output.flush(); +}; + +TalkServiceClient.prototype.recv_reissueGroupTicket = function(input,mtype,rseqid) { + var callback = this._reqs[rseqid] || function() {}; + delete this._reqs[rseqid]; + if (mtype == Thrift.MessageType.EXCEPTION) { + var x = new Thrift.TApplicationException(); + x.read(input); + input.readMessageEnd(); + return callback(x); + } + var result = new TalkService_reissueGroupTicket_result(); + result.read(input); + input.readMessageEnd(); + + if (null !== result.e) { + return callback(result.e); + } + if (null !== result.success) { + return callback(null, result.success); + } + return callback('reissueGroupTicket failed: unknown result'); +}; TalkServiceClient.prototype.leaveGroup = function(reqSeq, groupId, callback) { this._seqid = this.new_seqid(); if (callback === undefined) { @@ -35348,16 +35711,66 @@ TalkServiceProcessor.prototype.process_acceptGroupInvitation = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_acceptGroupInvitation_result(err); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_acceptGroupInvitation_result(err); + output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); + } + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.acceptGroupInvitation(args.reqSeq, args.groupId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_acceptGroupInvitation_result((err != null ? err : {success: result})); output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); + } + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +} + +TalkServiceProcessor.prototype.process_acceptGroupInvitationByTicket = function(seqid, input, output) { + var args = new TalkService_acceptGroupInvitationByTicket_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.acceptGroupInvitationByTicket.length === 3) { + Q.fcall(this._handler.acceptGroupInvitationByTicket, args.reqSeq, args.groupId, args.ticketId) + .then(function(result) { + var result = new TalkService_acceptGroupInvitationByTicket_result({success: result}); + output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.REPLY, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }, function (err) { + if (err instanceof ttypes.TalkException) { + var result = new TalkService_acceptGroupInvitationByTicket_result(err); + output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.acceptGroupInvitation(args.reqSeq, args.groupId, function (err, result) { - var result = new TalkService_acceptGroupInvitation_result((err != null ? err : {success: result})); - output.writeMessageBegin("acceptGroupInvitation", Thrift.MessageType.REPLY, seqid); + this._handler.acceptGroupInvitationByTicket(args.reqSeq, args.groupId, args.ticketId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_acceptGroupInvitationByTicket_result((err != null ? err : {success: result})); + output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acceptGroupInvitationByTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35378,16 +35791,26 @@ TalkServiceProcessor.prototype.process_acceptProximityMatches = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_acceptProximityMatches_result(err); - output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_acceptProximityMatches_result(err); + output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.acceptProximityMatches(args.sessionId, args.ids, function (err, result) { - var result = new TalkService_acceptProximityMatches_result((err != null ? err : {success: result})); - output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); + this._handler.acceptProximityMatches(args.sessionId, args.ids, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_acceptProximityMatches_result((err != null ? err : {success: result})); + output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acceptProximityMatches", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35408,16 +35831,26 @@ TalkServiceProcessor.prototype.process_acquireCallRoute = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_acquireCallRoute_result(err); - output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_acquireCallRoute_result(err); + output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.acquireCallRoute(args.to, function (err, result) { - var result = new TalkService_acquireCallRoute_result((err != null ? err : {success: result})); - output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); + this._handler.acquireCallRoute(args.to, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_acquireCallRoute_result((err != null ? err : {success: result})); + output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acquireCallRoute", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35438,16 +35871,26 @@ TalkServiceProcessor.prototype.process_acquireCallTicket = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_acquireCallTicket_result(err); - output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_acquireCallTicket_result(err); + output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.acquireCallTicket(args.to, function (err, result) { - var result = new TalkService_acquireCallTicket_result((err != null ? err : {success: result})); - output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); + this._handler.acquireCallTicket(args.to, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_acquireCallTicket_result((err != null ? err : {success: result})); + output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acquireCallTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35468,16 +35911,26 @@ TalkServiceProcessor.prototype.process_acquireEncryptedAccessToken = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_acquireEncryptedAccessToken_result(err); - output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_acquireEncryptedAccessToken_result(err); + output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.acquireEncryptedAccessToken(args.featureType, function (err, result) { - var result = new TalkService_acquireEncryptedAccessToken_result((err != null ? err : {success: result})); - output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); + this._handler.acquireEncryptedAccessToken(args.featureType, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_acquireEncryptedAccessToken_result((err != null ? err : {success: result})); + output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("acquireEncryptedAccessToken", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35498,16 +35951,26 @@ TalkServiceProcessor.prototype.process_addSnsId = function(seqid, input, output) output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_addSnsId_result(err); - output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_addSnsId_result(err); + output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("addSnsId", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.addSnsId(args.snsIdType, args.snsAccessToken, function (err, result) { - var result = new TalkService_addSnsId_result((err != null ? err : {success: result})); - output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); + this._handler.addSnsId(args.snsIdType, args.snsAccessToken, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_addSnsId_result((err != null ? err : {success: result})); + output.writeMessageBegin("addSnsId", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("addSnsId", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35528,16 +35991,26 @@ TalkServiceProcessor.prototype.process_blockContact = function(seqid, input, out output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_blockContact_result(err); - output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_blockContact_result(err); + output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("blockContact", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.blockContact(args.reqSeq, args.id, function (err, result) { - var result = new TalkService_blockContact_result((err != null ? err : {success: result})); - output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); + this._handler.blockContact(args.reqSeq, args.id, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_blockContact_result((err != null ? err : {success: result})); + output.writeMessageBegin("blockContact", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("blockContact", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35558,16 +36031,26 @@ TalkServiceProcessor.prototype.process_blockRecommendation = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_blockRecommendation_result(err); - output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_blockRecommendation_result(err); + output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("blockRecommendation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.blockRecommendation(args.reqSeq, args.id, function (err, result) { - var result = new TalkService_blockRecommendation_result((err != null ? err : {success: result})); - output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); + this._handler.blockRecommendation(args.reqSeq, args.id, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_blockRecommendation_result((err != null ? err : {success: result})); + output.writeMessageBegin("blockRecommendation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("blockRecommendation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35588,16 +36071,26 @@ TalkServiceProcessor.prototype.process_cancelGroupInvitation = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_cancelGroupInvitation_result(err); - output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_cancelGroupInvitation_result(err); + output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.cancelGroupInvitation(args.reqSeq, args.groupId, args.contactIds, function (err, result) { - var result = new TalkService_cancelGroupInvitation_result((err != null ? err : {success: result})); - output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); + this._handler.cancelGroupInvitation(args.reqSeq, args.groupId, args.contactIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_cancelGroupInvitation_result((err != null ? err : {success: result})); + output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("cancelGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35618,16 +36111,26 @@ TalkServiceProcessor.prototype.process_changeVerificationMethod = function(seqid output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_changeVerificationMethod_result(err); - output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_changeVerificationMethod_result(err); + output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.changeVerificationMethod(args.sessionId, args.method, function (err, result) { - var result = new TalkService_changeVerificationMethod_result((err != null ? err : {success: result})); - output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); + this._handler.changeVerificationMethod(args.sessionId, args.method, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_changeVerificationMethod_result((err != null ? err : {success: result})); + output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("changeVerificationMethod", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35648,16 +36151,26 @@ TalkServiceProcessor.prototype.process_clearIdentityCredential = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_clearIdentityCredential_result(err); - output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_clearIdentityCredential_result(err); + output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.clearIdentityCredential( function (err, result) { - var result = new TalkService_clearIdentityCredential_result((err != null ? err : {success: result})); - output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); + this._handler.clearIdentityCredential(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_clearIdentityCredential_result((err != null ? err : {success: result})); + output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("clearIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35678,16 +36191,26 @@ TalkServiceProcessor.prototype.process_clearMessageBox = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_clearMessageBox_result(err); - output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_clearMessageBox_result(err); + output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("clearMessageBox", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.clearMessageBox(args.channelId, args.messageBoxId, function (err, result) { - var result = new TalkService_clearMessageBox_result((err != null ? err : {success: result})); - output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); + this._handler.clearMessageBox(args.channelId, args.messageBoxId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_clearMessageBox_result((err != null ? err : {success: result})); + output.writeMessageBegin("clearMessageBox", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("clearMessageBox", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35708,16 +36231,26 @@ TalkServiceProcessor.prototype.process_closeProximityMatch = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_closeProximityMatch_result(err); - output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_closeProximityMatch_result(err); + output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.closeProximityMatch(args.sessionId, function (err, result) { - var result = new TalkService_closeProximityMatch_result((err != null ? err : {success: result})); - output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); + this._handler.closeProximityMatch(args.sessionId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_closeProximityMatch_result((err != null ? err : {success: result})); + output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("closeProximityMatch", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35738,16 +36271,26 @@ TalkServiceProcessor.prototype.process_commitSendMessage = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_commitSendMessage_result(err); - output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_commitSendMessage_result(err); + output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("commitSendMessage", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.commitSendMessage(args.seq, args.messageId, args.receiverMids, function (err, result) { - var result = new TalkService_commitSendMessage_result((err != null ? err : {success: result})); - output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); + this._handler.commitSendMessage(args.seq, args.messageId, args.receiverMids, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_commitSendMessage_result((err != null ? err : {success: result})); + output.writeMessageBegin("commitSendMessage", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("commitSendMessage", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35768,16 +36311,26 @@ TalkServiceProcessor.prototype.process_commitSendMessages = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_commitSendMessages_result(err); - output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_commitSendMessages_result(err); + output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("commitSendMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.commitSendMessages(args.seq, args.messageIds, args.receiverMids, function (err, result) { - var result = new TalkService_commitSendMessages_result((err != null ? err : {success: result})); - output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); + this._handler.commitSendMessages(args.seq, args.messageIds, args.receiverMids, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_commitSendMessages_result((err != null ? err : {success: result})); + output.writeMessageBegin("commitSendMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("commitSendMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35798,16 +36351,26 @@ TalkServiceProcessor.prototype.process_commitUpdateProfile = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_commitUpdateProfile_result(err); - output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_commitUpdateProfile_result(err); + output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.commitUpdateProfile(args.seq, args.attrs, args.receiverMids, function (err, result) { - var result = new TalkService_commitUpdateProfile_result((err != null ? err : {success: result})); - output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); + this._handler.commitUpdateProfile(args.seq, args.attrs, args.receiverMids, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_commitUpdateProfile_result((err != null ? err : {success: result})); + output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("commitUpdateProfile", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35828,16 +36391,26 @@ TalkServiceProcessor.prototype.process_confirmEmail = function(seqid, input, out output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_confirmEmail_result(err); - output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_confirmEmail_result(err); + output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("confirmEmail", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.confirmEmail(args.verifier, args.pinCode, function (err, result) { - var result = new TalkService_confirmEmail_result((err != null ? err : {success: result})); - output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); + this._handler.confirmEmail(args.verifier, args.pinCode, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_confirmEmail_result((err != null ? err : {success: result})); + output.writeMessageBegin("confirmEmail", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("confirmEmail", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35858,16 +36431,26 @@ TalkServiceProcessor.prototype.process_createGroup = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_createGroup_result(err); - output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_createGroup_result(err); + output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("createGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.createGroup(args.seq, args.name, args.contactIds, function (err, result) { - var result = new TalkService_createGroup_result((err != null ? err : {success: result})); - output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); + this._handler.createGroup(args.seq, args.name, args.contactIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_createGroup_result((err != null ? err : {success: result})); + output.writeMessageBegin("createGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("createGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35888,16 +36471,26 @@ TalkServiceProcessor.prototype.process_createQrcodeBase64Image = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_createQrcodeBase64Image_result(err); - output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_createQrcodeBase64Image_result(err); + output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.createQrcodeBase64Image(args.url, args.characterSet, args.imageSize, args.x, args.y, args.width, args.height, function (err, result) { - var result = new TalkService_createQrcodeBase64Image_result((err != null ? err : {success: result})); - output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, seqid); + this._handler.createQrcodeBase64Image(args.url, args.characterSet, args.imageSize, args.x, args.y, args.width, args.height, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_createQrcodeBase64Image_result((err != null ? err : {success: result})); + output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("createQrcodeBase64Image", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35918,16 +36511,26 @@ TalkServiceProcessor.prototype.process_createRoom = function(seqid, input, outpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_createRoom_result(err); - output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_createRoom_result(err); + output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("createRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.createRoom(args.reqSeq, args.contactIds, function (err, result) { - var result = new TalkService_createRoom_result((err != null ? err : {success: result})); - output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); + this._handler.createRoom(args.reqSeq, args.contactIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_createRoom_result((err != null ? err : {success: result})); + output.writeMessageBegin("createRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("createRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35948,16 +36551,26 @@ TalkServiceProcessor.prototype.process_createSession = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_createSession_result(err); - output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_createSession_result(err); + output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("createSession", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.createSession( function (err, result) { - var result = new TalkService_createSession_result((err != null ? err : {success: result})); - output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); + this._handler.createSession(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_createSession_result((err != null ? err : {success: result})); + output.writeMessageBegin("createSession", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("createSession", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -35978,16 +36591,26 @@ TalkServiceProcessor.prototype.process_fetchAnnouncements = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_fetchAnnouncements_result(err); - output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_fetchAnnouncements_result(err); + output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.fetchAnnouncements(args.lastFetchedIndex, function (err, result) { - var result = new TalkService_fetchAnnouncements_result((err != null ? err : {success: result})); - output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); + this._handler.fetchAnnouncements(args.lastFetchedIndex, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_fetchAnnouncements_result((err != null ? err : {success: result})); + output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("fetchAnnouncements", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36008,16 +36631,26 @@ TalkServiceProcessor.prototype.process_fetchMessages = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_fetchMessages_result(err); - output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_fetchMessages_result(err); + output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("fetchMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.fetchMessages(args.localTs, args.count, function (err, result) { - var result = new TalkService_fetchMessages_result((err != null ? err : {success: result})); - output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); + this._handler.fetchMessages(args.localTs, args.count, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_fetchMessages_result((err != null ? err : {success: result})); + output.writeMessageBegin("fetchMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("fetchMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36038,16 +36671,26 @@ TalkServiceProcessor.prototype.process_fetchOperations = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_fetchOperations_result(err); - output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_fetchOperations_result(err); + output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("fetchOperations", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.fetchOperations(args.localRev, args.count, function (err, result) { - var result = new TalkService_fetchOperations_result((err != null ? err : {success: result})); - output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); + this._handler.fetchOperations(args.localRev, args.count, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_fetchOperations_result((err != null ? err : {success: result})); + output.writeMessageBegin("fetchOperations", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("fetchOperations", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36068,16 +36711,26 @@ TalkServiceProcessor.prototype.process_fetchOps = function(seqid, input, output) output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_fetchOps_result(err); - output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_fetchOps_result(err); + output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("fetchOps", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.fetchOps(args.localRev, args.count, args.globalRev, args.individualRev, function (err, result) { - var result = new TalkService_fetchOps_result((err != null ? err : {success: result})); - output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, seqid); + this._handler.fetchOps(args.localRev, args.count, args.globalRev, args.individualRev, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_fetchOps_result((err != null ? err : {success: result})); + output.writeMessageBegin("fetchOps", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("fetchOps", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36098,16 +36751,26 @@ TalkServiceProcessor.prototype.process_findAndAddContactsByEmail = function(seqi output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_findAndAddContactsByEmail_result(err); - output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_findAndAddContactsByEmail_result(err); + output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.findAndAddContactsByEmail(args.reqSeq, args.emails, function (err, result) { - var result = new TalkService_findAndAddContactsByEmail_result((err != null ? err : {success: result})); - output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); + this._handler.findAndAddContactsByEmail(args.reqSeq, args.emails, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_findAndAddContactsByEmail_result((err != null ? err : {success: result})); + output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findAndAddContactsByEmail", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36128,16 +36791,26 @@ TalkServiceProcessor.prototype.process_findAndAddContactsByMid = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_findAndAddContactsByMid_result(err); - output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_findAndAddContactsByMid_result(err); + output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.findAndAddContactsByMid(args.reqSeq, args.mid, function (err, result) { - var result = new TalkService_findAndAddContactsByMid_result((err != null ? err : {success: result})); - output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); + this._handler.findAndAddContactsByMid(args.reqSeq, args.mid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_findAndAddContactsByMid_result((err != null ? err : {success: result})); + output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findAndAddContactsByMid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36158,16 +36831,26 @@ TalkServiceProcessor.prototype.process_findAndAddContactsByPhone = function(seqi output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_findAndAddContactsByPhone_result(err); - output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_findAndAddContactsByPhone_result(err); + output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.findAndAddContactsByPhone(args.reqSeq, args.phones, function (err, result) { - var result = new TalkService_findAndAddContactsByPhone_result((err != null ? err : {success: result})); - output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); + this._handler.findAndAddContactsByPhone(args.reqSeq, args.phones, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_findAndAddContactsByPhone_result((err != null ? err : {success: result})); + output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findAndAddContactsByPhone", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36188,16 +36871,26 @@ TalkServiceProcessor.prototype.process_findAndAddContactsByUserid = function(seq output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_findAndAddContactsByUserid_result(err); - output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_findAndAddContactsByUserid_result(err); + output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.findAndAddContactsByUserid(args.reqSeq, args.userid, function (err, result) { - var result = new TalkService_findAndAddContactsByUserid_result((err != null ? err : {success: result})); - output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); + this._handler.findAndAddContactsByUserid(args.reqSeq, args.userid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_findAndAddContactsByUserid_result((err != null ? err : {success: result})); + output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findAndAddContactsByUserid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36218,16 +36911,26 @@ TalkServiceProcessor.prototype.process_findContactByUserid = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_findContactByUserid_result(err); - output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_findContactByUserid_result(err); + output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findContactByUserid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.findContactByUserid(args.userid, function (err, result) { - var result = new TalkService_findContactByUserid_result((err != null ? err : {success: result})); - output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); + this._handler.findContactByUserid(args.userid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_findContactByUserid_result((err != null ? err : {success: result})); + output.writeMessageBegin("findContactByUserid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findContactByUserid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36248,16 +36951,26 @@ TalkServiceProcessor.prototype.process_findContactByUserTicket = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_findContactByUserTicket_result(err); - output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_findContactByUserTicket_result(err); + output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.findContactByUserTicket(args.ticketId, function (err, result) { - var result = new TalkService_findContactByUserTicket_result((err != null ? err : {success: result})); - output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); + this._handler.findContactByUserTicket(args.ticketId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_findContactByUserTicket_result((err != null ? err : {success: result})); + output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findContactByUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36278,16 +36991,26 @@ TalkServiceProcessor.prototype.process_findContactsByEmail = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_findContactsByEmail_result(err); - output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_findContactsByEmail_result(err); + output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.findContactsByEmail(args.emails, function (err, result) { - var result = new TalkService_findContactsByEmail_result((err != null ? err : {success: result})); - output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); + this._handler.findContactsByEmail(args.emails, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_findContactsByEmail_result((err != null ? err : {success: result})); + output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findContactsByEmail", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36308,16 +37031,26 @@ TalkServiceProcessor.prototype.process_findContactsByPhone = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_findContactsByPhone_result(err); - output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_findContactsByPhone_result(err); + output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.findContactsByPhone(args.phones, function (err, result) { - var result = new TalkService_findContactsByPhone_result((err != null ? err : {success: result})); - output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); + this._handler.findContactsByPhone(args.phones, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_findContactsByPhone_result((err != null ? err : {success: result})); + output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findContactsByPhone", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36338,16 +37071,26 @@ TalkServiceProcessor.prototype.process_findSnsIdUserStatus = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_findSnsIdUserStatus_result(err); - output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_findSnsIdUserStatus_result(err); + output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.findSnsIdUserStatus(args.snsIdType, args.snsAccessToken, args.udidHash, function (err, result) { - var result = new TalkService_findSnsIdUserStatus_result((err != null ? err : {success: result})); - output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); + this._handler.findSnsIdUserStatus(args.snsIdType, args.snsAccessToken, args.udidHash, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_findSnsIdUserStatus_result((err != null ? err : {success: result})); + output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("findSnsIdUserStatus", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36368,16 +37111,26 @@ TalkServiceProcessor.prototype.process_finishUpdateVerification = function(seqid output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_finishUpdateVerification_result(err); - output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_finishUpdateVerification_result(err); + output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.finishUpdateVerification(args.sessionId, function (err, result) { - var result = new TalkService_finishUpdateVerification_result((err != null ? err : {success: result})); - output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); + this._handler.finishUpdateVerification(args.sessionId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_finishUpdateVerification_result((err != null ? err : {success: result})); + output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("finishUpdateVerification", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36398,16 +37151,26 @@ TalkServiceProcessor.prototype.process_generateUserTicket = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_generateUserTicket_result(err); - output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_generateUserTicket_result(err); + output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("generateUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.generateUserTicket(args.expirationTime, args.maxUseCount, function (err, result) { - var result = new TalkService_generateUserTicket_result((err != null ? err : {success: result})); - output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); + this._handler.generateUserTicket(args.expirationTime, args.maxUseCount, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_generateUserTicket_result((err != null ? err : {success: result})); + output.writeMessageBegin("generateUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("generateUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36428,16 +37191,26 @@ TalkServiceProcessor.prototype.process_getAcceptedProximityMatches = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getAcceptedProximityMatches_result(err); - output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getAcceptedProximityMatches_result(err); + output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getAcceptedProximityMatches(args.sessionId, function (err, result) { - var result = new TalkService_getAcceptedProximityMatches_result((err != null ? err : {success: result})); - output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); + this._handler.getAcceptedProximityMatches(args.sessionId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getAcceptedProximityMatches_result((err != null ? err : {success: result})); + output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getAcceptedProximityMatches", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36458,16 +37231,26 @@ TalkServiceProcessor.prototype.process_getActiveBuddySubscriberIds = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getActiveBuddySubscriberIds_result(err); - output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getActiveBuddySubscriberIds_result(err); + output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getActiveBuddySubscriberIds( function (err, result) { - var result = new TalkService_getActiveBuddySubscriberIds_result((err != null ? err : {success: result})); - output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); + this._handler.getActiveBuddySubscriberIds(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getActiveBuddySubscriberIds_result((err != null ? err : {success: result})); + output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getActiveBuddySubscriberIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36488,16 +37271,26 @@ TalkServiceProcessor.prototype.process_getAllContactIds = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getAllContactIds_result(err); - output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getAllContactIds_result(err); + output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getAllContactIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getAllContactIds( function (err, result) { - var result = new TalkService_getAllContactIds_result((err != null ? err : {success: result})); - output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); + this._handler.getAllContactIds(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getAllContactIds_result((err != null ? err : {success: result})); + output.writeMessageBegin("getAllContactIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getAllContactIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36518,16 +37311,26 @@ TalkServiceProcessor.prototype.process_getAuthQrcode = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getAuthQrcode_result(err); - output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getAuthQrcode_result(err); + output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getAuthQrcode(args.keepLoggedIn, args.systemName, function (err, result) { - var result = new TalkService_getAuthQrcode_result((err != null ? err : {success: result})); - output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); + this._handler.getAuthQrcode(args.keepLoggedIn, args.systemName, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getAuthQrcode_result((err != null ? err : {success: result})); + output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getAuthQrcode", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36548,16 +37351,26 @@ TalkServiceProcessor.prototype.process_getBlockedContactIds = function(seqid, in output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getBlockedContactIds_result(err); - output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getBlockedContactIds_result(err); + output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getBlockedContactIds( function (err, result) { - var result = new TalkService_getBlockedContactIds_result((err != null ? err : {success: result})); - output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); + this._handler.getBlockedContactIds(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getBlockedContactIds_result((err != null ? err : {success: result})); + output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBlockedContactIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36578,16 +37391,26 @@ TalkServiceProcessor.prototype.process_getBlockedContactIdsByRange = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getBlockedContactIdsByRange_result(err); - output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getBlockedContactIdsByRange_result(err); + output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getBlockedContactIdsByRange(args.start, args.count, function (err, result) { - var result = new TalkService_getBlockedContactIdsByRange_result((err != null ? err : {success: result})); - output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); + this._handler.getBlockedContactIdsByRange(args.start, args.count, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getBlockedContactIdsByRange_result((err != null ? err : {success: result})); + output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBlockedContactIdsByRange", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36608,16 +37431,26 @@ TalkServiceProcessor.prototype.process_getBlockedRecommendationIds = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getBlockedRecommendationIds_result(err); - output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getBlockedRecommendationIds_result(err); + output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getBlockedRecommendationIds( function (err, result) { - var result = new TalkService_getBlockedRecommendationIds_result((err != null ? err : {success: result})); - output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); + this._handler.getBlockedRecommendationIds(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getBlockedRecommendationIds_result((err != null ? err : {success: result})); + output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBlockedRecommendationIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36638,16 +37471,26 @@ TalkServiceProcessor.prototype.process_getBuddyBlockerIds = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getBuddyBlockerIds_result(err); - output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getBuddyBlockerIds_result(err); + output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getBuddyBlockerIds( function (err, result) { - var result = new TalkService_getBuddyBlockerIds_result((err != null ? err : {success: result})); - output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); + this._handler.getBuddyBlockerIds(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getBuddyBlockerIds_result((err != null ? err : {success: result})); + output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBuddyBlockerIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36668,16 +37511,26 @@ TalkServiceProcessor.prototype.process_getBuddyLocation = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getBuddyLocation_result(err); - output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getBuddyLocation_result(err); + output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getBuddyLocation(args.mid, args.index, function (err, result) { - var result = new TalkService_getBuddyLocation_result((err != null ? err : {success: result})); - output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); + this._handler.getBuddyLocation(args.mid, args.index, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getBuddyLocation_result((err != null ? err : {success: result})); + output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36698,16 +37551,26 @@ TalkServiceProcessor.prototype.process_getCompactContactsModifiedSince = functio output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getCompactContactsModifiedSince_result(err); - output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getCompactContactsModifiedSince_result(err); + output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getCompactContactsModifiedSince(args.timestamp, function (err, result) { - var result = new TalkService_getCompactContactsModifiedSince_result((err != null ? err : {success: result})); - output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); + this._handler.getCompactContactsModifiedSince(args.timestamp, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getCompactContactsModifiedSince_result((err != null ? err : {success: result})); + output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getCompactContactsModifiedSince", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36728,16 +37591,26 @@ TalkServiceProcessor.prototype.process_getCompactGroup = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getCompactGroup_result(err); - output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getCompactGroup_result(err); + output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getCompactGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getCompactGroup(args.groupId, function (err, result) { - var result = new TalkService_getCompactGroup_result((err != null ? err : {success: result})); - output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); + this._handler.getCompactGroup(args.groupId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getCompactGroup_result((err != null ? err : {success: result})); + output.writeMessageBegin("getCompactGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getCompactGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36758,16 +37631,26 @@ TalkServiceProcessor.prototype.process_getCompactRoom = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getCompactRoom_result(err); - output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getCompactRoom_result(err); + output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getCompactRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getCompactRoom(args.roomId, function (err, result) { - var result = new TalkService_getCompactRoom_result((err != null ? err : {success: result})); - output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); + this._handler.getCompactRoom(args.roomId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getCompactRoom_result((err != null ? err : {success: result})); + output.writeMessageBegin("getCompactRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getCompactRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36788,16 +37671,26 @@ TalkServiceProcessor.prototype.process_getContact = function(seqid, input, outpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getContact_result(err); - output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getContact_result(err); + output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getContact", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getContact(args.id, function (err, result) { - var result = new TalkService_getContact_result((err != null ? err : {success: result})); - output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); + this._handler.getContact(args.id, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getContact_result((err != null ? err : {success: result})); + output.writeMessageBegin("getContact", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getContact", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36818,16 +37711,26 @@ TalkServiceProcessor.prototype.process_getContacts = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getContacts_result(err); - output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getContacts_result(err); + output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getContacts", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getContacts(args.ids, function (err, result) { - var result = new TalkService_getContacts_result((err != null ? err : {success: result})); - output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); + this._handler.getContacts(args.ids, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getContacts_result((err != null ? err : {success: result})); + output.writeMessageBegin("getContacts", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getContacts", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36848,16 +37751,26 @@ TalkServiceProcessor.prototype.process_getCountryWithRequestIp = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getCountryWithRequestIp_result(err); - output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getCountryWithRequestIp_result(err); + output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getCountryWithRequestIp( function (err, result) { - var result = new TalkService_getCountryWithRequestIp_result((err != null ? err : {success: result})); - output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); + this._handler.getCountryWithRequestIp(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getCountryWithRequestIp_result((err != null ? err : {success: result})); + output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getCountryWithRequestIp", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36878,16 +37791,26 @@ TalkServiceProcessor.prototype.process_getFavoriteMids = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getFavoriteMids_result(err); - output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getFavoriteMids_result(err); + output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getFavoriteMids( function (err, result) { - var result = new TalkService_getFavoriteMids_result((err != null ? err : {success: result})); - output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); + this._handler.getFavoriteMids(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getFavoriteMids_result((err != null ? err : {success: result})); + output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getFavoriteMids", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36908,16 +37831,26 @@ TalkServiceProcessor.prototype.process_getGroup = function(seqid, input, output) output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getGroup_result(err); - output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getGroup_result(err); + output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getGroup(args.groupId, function (err, result) { - var result = new TalkService_getGroup_result((err != null ? err : {success: result})); - output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); + this._handler.getGroup(args.groupId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getGroup_result((err != null ? err : {success: result})); + output.writeMessageBegin("getGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36938,16 +37871,26 @@ TalkServiceProcessor.prototype.process_getGroupIdsInvited = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getGroupIdsInvited_result(err); - output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getGroupIdsInvited_result(err); + output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getGroupIdsInvited( function (err, result) { - var result = new TalkService_getGroupIdsInvited_result((err != null ? err : {success: result})); - output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); + this._handler.getGroupIdsInvited(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getGroupIdsInvited_result((err != null ? err : {success: result})); + output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getGroupIdsInvited", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36968,16 +37911,26 @@ TalkServiceProcessor.prototype.process_getGroupIdsJoined = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getGroupIdsJoined_result(err); - output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getGroupIdsJoined_result(err); + output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getGroupIdsJoined( function (err, result) { - var result = new TalkService_getGroupIdsJoined_result((err != null ? err : {success: result})); - output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); + this._handler.getGroupIdsJoined(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getGroupIdsJoined_result((err != null ? err : {success: result})); + output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getGroupIdsJoined", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -36998,16 +37951,26 @@ TalkServiceProcessor.prototype.process_getGroups = function(seqid, input, output output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getGroups_result(err); - output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getGroups_result(err); + output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getGroups", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getGroups(args.groupIds, function (err, result) { - var result = new TalkService_getGroups_result((err != null ? err : {success: result})); - output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); + this._handler.getGroups(args.groupIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getGroups_result((err != null ? err : {success: result})); + output.writeMessageBegin("getGroups", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getGroups", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37028,16 +37991,26 @@ TalkServiceProcessor.prototype.process_getHiddenContactMids = function(seqid, in output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getHiddenContactMids_result(err); - output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getHiddenContactMids_result(err); + output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getHiddenContactMids( function (err, result) { - var result = new TalkService_getHiddenContactMids_result((err != null ? err : {success: result})); - output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); + this._handler.getHiddenContactMids(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getHiddenContactMids_result((err != null ? err : {success: result})); + output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getHiddenContactMids", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37058,16 +38031,26 @@ TalkServiceProcessor.prototype.process_getIdentityIdentifier = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getIdentityIdentifier_result(err); - output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getIdentityIdentifier_result(err); + output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getIdentityIdentifier( function (err, result) { - var result = new TalkService_getIdentityIdentifier_result((err != null ? err : {success: result})); - output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); + this._handler.getIdentityIdentifier(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getIdentityIdentifier_result((err != null ? err : {success: result})); + output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getIdentityIdentifier", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37088,16 +38071,26 @@ TalkServiceProcessor.prototype.process_getLastAnnouncementIndex = function(seqid output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getLastAnnouncementIndex_result(err); - output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getLastAnnouncementIndex_result(err); + output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getLastAnnouncementIndex( function (err, result) { - var result = new TalkService_getLastAnnouncementIndex_result((err != null ? err : {success: result})); - output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); + this._handler.getLastAnnouncementIndex(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getLastAnnouncementIndex_result((err != null ? err : {success: result})); + output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getLastAnnouncementIndex", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37118,16 +38111,26 @@ TalkServiceProcessor.prototype.process_getLastOpRevision = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getLastOpRevision_result(err); - output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getLastOpRevision_result(err); + output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getLastOpRevision( function (err, result) { - var result = new TalkService_getLastOpRevision_result((err != null ? err : {success: result})); - output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); + this._handler.getLastOpRevision(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getLastOpRevision_result((err != null ? err : {success: result})); + output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getLastOpRevision", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37148,16 +38151,26 @@ TalkServiceProcessor.prototype.process_getMessageBox = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getMessageBox_result(err); - output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBox_result(err); + output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBox", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getMessageBox(args.channelId, args.messageBoxId, args.lastMessagesCount, function (err, result) { - var result = new TalkService_getMessageBox_result((err != null ? err : {success: result})); - output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); + this._handler.getMessageBox(args.channelId, args.messageBoxId, args.lastMessagesCount, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBox_result((err != null ? err : {success: result})); + output.writeMessageBegin("getMessageBox", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBox", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37178,16 +38191,26 @@ TalkServiceProcessor.prototype.process_getMessageBoxCompactWrapUp = function(seq output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getMessageBoxCompactWrapUp_result(err); - output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxCompactWrapUp_result(err); + output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getMessageBoxCompactWrapUp(args.mid, function (err, result) { - var result = new TalkService_getMessageBoxCompactWrapUp_result((err != null ? err : {success: result})); - output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); + this._handler.getMessageBoxCompactWrapUp(args.mid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxCompactWrapUp_result((err != null ? err : {success: result})); + output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxCompactWrapUp", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37208,16 +38231,26 @@ TalkServiceProcessor.prototype.process_getMessageBoxCompactWrapUpList = function output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getMessageBoxCompactWrapUpList_result(err); - output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxCompactWrapUpList_result(err); + output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getMessageBoxCompactWrapUpList(args.start, args.messageBoxCount, function (err, result) { - var result = new TalkService_getMessageBoxCompactWrapUpList_result((err != null ? err : {success: result})); - output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); + this._handler.getMessageBoxCompactWrapUpList(args.start, args.messageBoxCount, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxCompactWrapUpList_result((err != null ? err : {success: result})); + output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxCompactWrapUpList", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37238,16 +38271,26 @@ TalkServiceProcessor.prototype.process_getMessageBoxList = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getMessageBoxList_result(err); - output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxList_result(err); + output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getMessageBoxList(args.channelId, args.lastMessagesCount, function (err, result) { - var result = new TalkService_getMessageBoxList_result((err != null ? err : {success: result})); - output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); + this._handler.getMessageBoxList(args.channelId, args.lastMessagesCount, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxList_result((err != null ? err : {success: result})); + output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxList", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37268,16 +38311,26 @@ TalkServiceProcessor.prototype.process_getMessageBoxListByStatus = function(seqi output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getMessageBoxListByStatus_result(err); - output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxListByStatus_result(err); + output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getMessageBoxListByStatus(args.channelId, args.lastMessagesCount, args.status, function (err, result) { - var result = new TalkService_getMessageBoxListByStatus_result((err != null ? err : {success: result})); - output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); + this._handler.getMessageBoxListByStatus(args.channelId, args.lastMessagesCount, args.status, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxListByStatus_result((err != null ? err : {success: result})); + output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxListByStatus", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37298,16 +38351,26 @@ TalkServiceProcessor.prototype.process_getMessageBoxWrapUp = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getMessageBoxWrapUp_result(err); - output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxWrapUp_result(err); + output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getMessageBoxWrapUp(args.mid, function (err, result) { - var result = new TalkService_getMessageBoxWrapUp_result((err != null ? err : {success: result})); - output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); + this._handler.getMessageBoxWrapUp(args.mid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxWrapUp_result((err != null ? err : {success: result})); + output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxWrapUp", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37328,16 +38391,26 @@ TalkServiceProcessor.prototype.process_getMessageBoxWrapUpList = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getMessageBoxWrapUpList_result(err); - output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxWrapUpList_result(err); + output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getMessageBoxWrapUpList(args.start, args.messageBoxCount, function (err, result) { - var result = new TalkService_getMessageBoxWrapUpList_result((err != null ? err : {success: result})); - output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); + this._handler.getMessageBoxWrapUpList(args.start, args.messageBoxCount, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getMessageBoxWrapUpList_result((err != null ? err : {success: result})); + output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessageBoxWrapUpList", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37358,16 +38431,26 @@ TalkServiceProcessor.prototype.process_getMessagesBySequenceNumber = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getMessagesBySequenceNumber_result(err); - output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getMessagesBySequenceNumber_result(err); + output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getMessagesBySequenceNumber(args.channelId, args.messageBoxId, args.startSeq, args.endSeq, function (err, result) { - var result = new TalkService_getMessagesBySequenceNumber_result((err != null ? err : {success: result})); - output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, seqid); + this._handler.getMessagesBySequenceNumber(args.channelId, args.messageBoxId, args.startSeq, args.endSeq, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getMessagesBySequenceNumber_result((err != null ? err : {success: result})); + output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getMessagesBySequenceNumber", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37388,16 +38471,26 @@ TalkServiceProcessor.prototype.process_getNextMessages = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getNextMessages_result(err); - output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getNextMessages_result(err); + output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getNextMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getNextMessages(args.messageBoxId, args.startSeq, args.messagesCount, function (err, result) { - var result = new TalkService_getNextMessages_result((err != null ? err : {success: result})); - output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); + this._handler.getNextMessages(args.messageBoxId, args.startSeq, args.messagesCount, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getNextMessages_result((err != null ? err : {success: result})); + output.writeMessageBegin("getNextMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getNextMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37418,16 +38511,26 @@ TalkServiceProcessor.prototype.process_getNotificationPolicy = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getNotificationPolicy_result(err); - output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getNotificationPolicy_result(err); + output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getNotificationPolicy(args.carrier, function (err, result) { - var result = new TalkService_getNotificationPolicy_result((err != null ? err : {success: result})); - output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); + this._handler.getNotificationPolicy(args.carrier, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getNotificationPolicy_result((err != null ? err : {success: result})); + output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getNotificationPolicy", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37448,16 +38551,26 @@ TalkServiceProcessor.prototype.process_getPreviousMessages = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getPreviousMessages_result(err); - output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getPreviousMessages_result(err); + output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getPreviousMessages(args.messageBoxId, args.endSeq, args.messagesCount, function (err, result) { - var result = new TalkService_getPreviousMessages_result((err != null ? err : {success: result})); - output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); + this._handler.getPreviousMessages(args.messageBoxId, args.endSeq, args.messagesCount, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getPreviousMessages_result((err != null ? err : {success: result})); + output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getPreviousMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37478,16 +38591,26 @@ TalkServiceProcessor.prototype.process_getProfile = function(seqid, input, outpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getProfile_result(err); - output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getProfile_result(err); + output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getProfile", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getProfile( function (err, result) { - var result = new TalkService_getProfile_result((err != null ? err : {success: result})); - output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); + this._handler.getProfile(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getProfile_result((err != null ? err : {success: result})); + output.writeMessageBegin("getProfile", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getProfile", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37508,16 +38631,26 @@ TalkServiceProcessor.prototype.process_getProximityMatchCandidateList = function output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getProximityMatchCandidateList_result(err); - output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getProximityMatchCandidateList_result(err); + output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getProximityMatchCandidateList(args.sessionId, function (err, result) { - var result = new TalkService_getProximityMatchCandidateList_result((err != null ? err : {success: result})); - output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); + this._handler.getProximityMatchCandidateList(args.sessionId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getProximityMatchCandidateList_result((err != null ? err : {success: result})); + output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getProximityMatchCandidateList", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37538,16 +38671,26 @@ TalkServiceProcessor.prototype.process_getProximityMatchCandidates = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getProximityMatchCandidates_result(err); - output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getProximityMatchCandidates_result(err); + output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getProximityMatchCandidates(args.sessionId, function (err, result) { - var result = new TalkService_getProximityMatchCandidates_result((err != null ? err : {success: result})); - output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); + this._handler.getProximityMatchCandidates(args.sessionId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getProximityMatchCandidates_result((err != null ? err : {success: result})); + output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getProximityMatchCandidates", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37568,16 +38711,26 @@ TalkServiceProcessor.prototype.process_getRecentMessages = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getRecentMessages_result(err); - output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getRecentMessages_result(err); + output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getRecentMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getRecentMessages(args.messageBoxId, args.messagesCount, function (err, result) { - var result = new TalkService_getRecentMessages_result((err != null ? err : {success: result})); - output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); + this._handler.getRecentMessages(args.messageBoxId, args.messagesCount, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getRecentMessages_result((err != null ? err : {success: result})); + output.writeMessageBegin("getRecentMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getRecentMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37598,16 +38751,26 @@ TalkServiceProcessor.prototype.process_getRecommendationIds = function(seqid, in output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getRecommendationIds_result(err); - output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getRecommendationIds_result(err); + output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getRecommendationIds( function (err, result) { - var result = new TalkService_getRecommendationIds_result((err != null ? err : {success: result})); - output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); + this._handler.getRecommendationIds(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getRecommendationIds_result((err != null ? err : {success: result})); + output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getRecommendationIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37628,16 +38791,26 @@ TalkServiceProcessor.prototype.process_getRoom = function(seqid, input, output) output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getRoom_result(err); - output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getRoom_result(err); + output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getRoom(args.roomId, function (err, result) { - var result = new TalkService_getRoom_result((err != null ? err : {success: result})); - output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); + this._handler.getRoom(args.roomId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getRoom_result((err != null ? err : {success: result})); + output.writeMessageBegin("getRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37658,16 +38831,26 @@ TalkServiceProcessor.prototype.process_getRSAKeyInfo = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getRSAKeyInfo_result(err); - output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getRSAKeyInfo_result(err); + output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getRSAKeyInfo(args.provider, function (err, result) { - var result = new TalkService_getRSAKeyInfo_result((err != null ? err : {success: result})); - output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); + this._handler.getRSAKeyInfo(args.provider, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getRSAKeyInfo_result((err != null ? err : {success: result})); + output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getRSAKeyInfo", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37688,16 +38871,26 @@ TalkServiceProcessor.prototype.process_getServerTime = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getServerTime_result(err); - output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getServerTime_result(err); + output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getServerTime", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getServerTime( function (err, result) { - var result = new TalkService_getServerTime_result((err != null ? err : {success: result})); - output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); + this._handler.getServerTime(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getServerTime_result((err != null ? err : {success: result})); + output.writeMessageBegin("getServerTime", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getServerTime", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37718,16 +38911,26 @@ TalkServiceProcessor.prototype.process_getSessions = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getSessions_result(err); - output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getSessions_result(err); + output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getSessions", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getSessions( function (err, result) { - var result = new TalkService_getSessions_result((err != null ? err : {success: result})); - output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); + this._handler.getSessions(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getSessions_result((err != null ? err : {success: result})); + output.writeMessageBegin("getSessions", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getSessions", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37748,16 +38951,26 @@ TalkServiceProcessor.prototype.process_getSettings = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getSettings_result(err); - output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getSettings_result(err); + output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getSettings", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getSettings( function (err, result) { - var result = new TalkService_getSettings_result((err != null ? err : {success: result})); - output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); + this._handler.getSettings(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getSettings_result((err != null ? err : {success: result})); + output.writeMessageBegin("getSettings", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getSettings", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37778,16 +38991,26 @@ TalkServiceProcessor.prototype.process_getSettingsAttributes = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getSettingsAttributes_result(err); - output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getSettingsAttributes_result(err); + output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getSettingsAttributes(args.attrBitset, function (err, result) { - var result = new TalkService_getSettingsAttributes_result((err != null ? err : {success: result})); - output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); + this._handler.getSettingsAttributes(args.attrBitset, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getSettingsAttributes_result((err != null ? err : {success: result})); + output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getSettingsAttributes", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37808,16 +39031,26 @@ TalkServiceProcessor.prototype.process_getSystemConfiguration = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getSystemConfiguration_result(err); - output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getSystemConfiguration_result(err); + output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getSystemConfiguration( function (err, result) { - var result = new TalkService_getSystemConfiguration_result((err != null ? err : {success: result})); - output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); + this._handler.getSystemConfiguration(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getSystemConfiguration_result((err != null ? err : {success: result})); + output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getSystemConfiguration", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37838,16 +39071,26 @@ TalkServiceProcessor.prototype.process_getUserTicket = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getUserTicket_result(err); - output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getUserTicket_result(err); + output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getUserTicket( function (err, result) { - var result = new TalkService_getUserTicket_result((err != null ? err : {success: result})); - output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); + this._handler.getUserTicket(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getUserTicket_result((err != null ? err : {success: result})); + output.writeMessageBegin("getUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37868,16 +39111,26 @@ TalkServiceProcessor.prototype.process_getWapInvitation = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_getWapInvitation_result(err); - output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_getWapInvitation_result(err); + output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getWapInvitation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.getWapInvitation(args.invitationHash, function (err, result) { - var result = new TalkService_getWapInvitation_result((err != null ? err : {success: result})); - output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); + this._handler.getWapInvitation(args.invitationHash, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_getWapInvitation_result((err != null ? err : {success: result})); + output.writeMessageBegin("getWapInvitation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("getWapInvitation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37898,16 +39151,26 @@ TalkServiceProcessor.prototype.process_invalidateUserTicket = function(seqid, in output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_invalidateUserTicket_result(err); - output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_invalidateUserTicket_result(err); + output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.invalidateUserTicket( function (err, result) { - var result = new TalkService_invalidateUserTicket_result((err != null ? err : {success: result})); - output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); + this._handler.invalidateUserTicket(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_invalidateUserTicket_result((err != null ? err : {success: result})); + output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("invalidateUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37928,16 +39191,26 @@ TalkServiceProcessor.prototype.process_inviteFriendsBySms = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_inviteFriendsBySms_result(err); - output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_inviteFriendsBySms_result(err); + output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.inviteFriendsBySms(args.phoneNumberList, function (err, result) { - var result = new TalkService_inviteFriendsBySms_result((err != null ? err : {success: result})); - output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); + this._handler.inviteFriendsBySms(args.phoneNumberList, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_inviteFriendsBySms_result((err != null ? err : {success: result})); + output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("inviteFriendsBySms", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37958,16 +39231,26 @@ TalkServiceProcessor.prototype.process_inviteIntoGroup = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_inviteIntoGroup_result(err); - output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_inviteIntoGroup_result(err); + output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.inviteIntoGroup(args.reqSeq, args.groupId, args.contactIds, function (err, result) { - var result = new TalkService_inviteIntoGroup_result((err != null ? err : {success: result})); - output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); + this._handler.inviteIntoGroup(args.reqSeq, args.groupId, args.contactIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_inviteIntoGroup_result((err != null ? err : {success: result})); + output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("inviteIntoGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -37988,16 +39271,26 @@ TalkServiceProcessor.prototype.process_inviteIntoRoom = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_inviteIntoRoom_result(err); - output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_inviteIntoRoom_result(err); + output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.inviteIntoRoom(args.reqSeq, args.roomId, args.contactIds, function (err, result) { - var result = new TalkService_inviteIntoRoom_result((err != null ? err : {success: result})); - output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); + this._handler.inviteIntoRoom(args.reqSeq, args.roomId, args.contactIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_inviteIntoRoom_result((err != null ? err : {success: result})); + output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("inviteIntoRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38018,16 +39311,26 @@ TalkServiceProcessor.prototype.process_inviteViaEmail = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_inviteViaEmail_result(err); - output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_inviteViaEmail_result(err); + output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.inviteViaEmail(args.reqSeq, args.email, args.name, function (err, result) { - var result = new TalkService_inviteViaEmail_result((err != null ? err : {success: result})); - output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); + this._handler.inviteViaEmail(args.reqSeq, args.email, args.name, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_inviteViaEmail_result((err != null ? err : {success: result})); + output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("inviteViaEmail", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38048,16 +39351,26 @@ TalkServiceProcessor.prototype.process_isIdentityIdentifierAvailable = function( output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_isIdentityIdentifierAvailable_result(err); - output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_isIdentityIdentifierAvailable_result(err); + output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.isIdentityIdentifierAvailable(args.provider, args.identifier, function (err, result) { - var result = new TalkService_isIdentityIdentifierAvailable_result((err != null ? err : {success: result})); - output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); + this._handler.isIdentityIdentifierAvailable(args.provider, args.identifier, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_isIdentityIdentifierAvailable_result((err != null ? err : {success: result})); + output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("isIdentityIdentifierAvailable", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38078,16 +39391,26 @@ TalkServiceProcessor.prototype.process_isUseridAvailable = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_isUseridAvailable_result(err); - output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_isUseridAvailable_result(err); + output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.isUseridAvailable(args.userid, function (err, result) { - var result = new TalkService_isUseridAvailable_result((err != null ? err : {success: result})); - output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); + this._handler.isUseridAvailable(args.userid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_isUseridAvailable_result((err != null ? err : {success: result})); + output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("isUseridAvailable", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38108,16 +39431,66 @@ TalkServiceProcessor.prototype.process_kickoutFromGroup = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_kickoutFromGroup_result(err); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_kickoutFromGroup_result(err); + output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.EXCEPTION, seqid); + } + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } else { + this._handler.kickoutFromGroup(args.reqSeq, args.groupId, args.contactIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_kickoutFromGroup_result((err != null ? err : {success: result})); output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.EXCEPTION, seqid); + } + result.write(output); + output.writeMessageEnd(); + output.flush(); + }); + } +} + +TalkServiceProcessor.prototype.process_reissueGroupTicket = function(seqid, input, output) { + var args = new TalkService_reissueGroupTicket_args(); + args.read(input); + input.readMessageEnd(); + if (this._handler.reissueGroupTicket.length === 1) { + Q.fcall(this._handler.reissueGroupTicket, args.groupId) + .then(function(result) { + var result = new TalkService_reissueGroupTicket_result({success: result}); + output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.REPLY, seqid); + result.write(output); + output.writeMessageEnd(); + output.flush(); + }, function (err) { + if (err instanceof ttypes.TalkException) { + var result = new TalkService_reissueGroupTicket_result(err); + output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.kickoutFromGroup(args.reqSeq, args.groupId, args.contactIds, function (err, result) { - var result = new TalkService_kickoutFromGroup_result((err != null ? err : {success: result})); - output.writeMessageBegin("kickoutFromGroup", Thrift.MessageType.REPLY, seqid); + this._handler.reissueGroupTicket(args.groupId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_reissueGroupTicket_result((err != null ? err : {success: result})); + output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reissueGroupTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38138,16 +39511,26 @@ TalkServiceProcessor.prototype.process_leaveGroup = function(seqid, input, outpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_leaveGroup_result(err); - output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_leaveGroup_result(err); + output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("leaveGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.leaveGroup(args.reqSeq, args.groupId, function (err, result) { - var result = new TalkService_leaveGroup_result((err != null ? err : {success: result})); - output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); + this._handler.leaveGroup(args.reqSeq, args.groupId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_leaveGroup_result((err != null ? err : {success: result})); + output.writeMessageBegin("leaveGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("leaveGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38168,16 +39551,26 @@ TalkServiceProcessor.prototype.process_leaveRoom = function(seqid, input, output output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_leaveRoom_result(err); - output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_leaveRoom_result(err); + output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("leaveRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.leaveRoom(args.reqSeq, args.roomId, function (err, result) { - var result = new TalkService_leaveRoom_result((err != null ? err : {success: result})); - output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); + this._handler.leaveRoom(args.reqSeq, args.roomId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_leaveRoom_result((err != null ? err : {success: result})); + output.writeMessageBegin("leaveRoom", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("leaveRoom", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38198,16 +39591,26 @@ TalkServiceProcessor.prototype.process_loginWithIdentityCredential = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_loginWithIdentityCredential_result(err); - output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithIdentityCredential_result(err); + output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.loginWithIdentityCredential(args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate, function (err, result) { - var result = new TalkService_loginWithIdentityCredential_result((err != null ? err : {success: result})); - output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + this._handler.loginWithIdentityCredential(args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithIdentityCredential_result((err != null ? err : {success: result})); + output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38228,16 +39631,26 @@ TalkServiceProcessor.prototype.process_loginWithIdentityCredentialForCertificate output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_loginWithIdentityCredentialForCertificate_result(err); - output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithIdentityCredentialForCertificate_result(err); + output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.loginWithIdentityCredentialForCertificate(args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate, function (err, result) { - var result = new TalkService_loginWithIdentityCredentialForCertificate_result((err != null ? err : {success: result})); - output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, seqid); + this._handler.loginWithIdentityCredentialForCertificate(args.identityProvider, args.identifier, args.password, args.keepLoggedIn, args.accessLocation, args.systemName, args.certificate, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithIdentityCredentialForCertificate_result((err != null ? err : {success: result})); + output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithIdentityCredentialForCertificate", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38258,16 +39671,26 @@ TalkServiceProcessor.prototype.process_loginWithVerifier = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_loginWithVerifier_result(err); - output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithVerifier_result(err); + output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.loginWithVerifier(args.verifier, function (err, result) { - var result = new TalkService_loginWithVerifier_result((err != null ? err : {success: result})); - output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); + this._handler.loginWithVerifier(args.verifier, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithVerifier_result((err != null ? err : {success: result})); + output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithVerifier", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38288,16 +39711,26 @@ TalkServiceProcessor.prototype.process_loginWithVerifierForCerificate = function output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_loginWithVerifierForCerificate_result(err); - output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithVerifierForCerificate_result(err); + output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.loginWithVerifierForCerificate(args.verifier, function (err, result) { - var result = new TalkService_loginWithVerifierForCerificate_result((err != null ? err : {success: result})); - output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); + this._handler.loginWithVerifierForCerificate(args.verifier, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithVerifierForCerificate_result((err != null ? err : {success: result})); + output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithVerifierForCerificate", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38318,16 +39751,26 @@ TalkServiceProcessor.prototype.process_loginWithVerifierForCertificate = functio output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_loginWithVerifierForCertificate_result(err); - output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithVerifierForCertificate_result(err); + output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.loginWithVerifierForCertificate(args.verifier, function (err, result) { - var result = new TalkService_loginWithVerifierForCertificate_result((err != null ? err : {success: result})); - output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); + this._handler.loginWithVerifierForCertificate(args.verifier, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_loginWithVerifierForCertificate_result((err != null ? err : {success: result})); + output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("loginWithVerifierForCertificate", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38348,16 +39791,26 @@ TalkServiceProcessor.prototype.process_logout = function(seqid, input, output) { output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_logout_result(err); - output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_logout_result(err); + output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("logout", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.logout( function (err, result) { - var result = new TalkService_logout_result((err != null ? err : {success: result})); - output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); + this._handler.logout(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_logout_result((err != null ? err : {success: result})); + output.writeMessageBegin("logout", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("logout", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38378,16 +39831,26 @@ TalkServiceProcessor.prototype.process_logoutSession = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_logoutSession_result(err); - output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_logoutSession_result(err); + output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("logoutSession", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.logoutSession(args.tokenKey, function (err, result) { - var result = new TalkService_logoutSession_result((err != null ? err : {success: result})); - output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); + this._handler.logoutSession(args.tokenKey, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_logoutSession_result((err != null ? err : {success: result})); + output.writeMessageBegin("logoutSession", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("logoutSession", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38408,16 +39871,26 @@ TalkServiceProcessor.prototype.process_noop = function(seqid, input, output) { output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_noop_result(err); - output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_noop_result(err); + output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("noop", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.noop( function (err, result) { - var result = new TalkService_noop_result((err != null ? err : {success: result})); - output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); + this._handler.noop(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_noop_result((err != null ? err : {success: result})); + output.writeMessageBegin("noop", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("noop", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38438,16 +39911,26 @@ TalkServiceProcessor.prototype.process_notifiedRedirect = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_notifiedRedirect_result(err); - output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_notifiedRedirect_result(err); + output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.notifiedRedirect(args.paramMap, function (err, result) { - var result = new TalkService_notifiedRedirect_result((err != null ? err : {success: result})); - output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); + this._handler.notifiedRedirect(args.paramMap, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_notifiedRedirect_result((err != null ? err : {success: result})); + output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifiedRedirect", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38468,16 +39951,26 @@ TalkServiceProcessor.prototype.process_notifyBuddyOnAir = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_notifyBuddyOnAir_result(err); - output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_notifyBuddyOnAir_result(err); + output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.notifyBuddyOnAir(args.seq, args.receiverMids, function (err, result) { - var result = new TalkService_notifyBuddyOnAir_result((err != null ? err : {success: result})); - output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); + this._handler.notifyBuddyOnAir(args.seq, args.receiverMids, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_notifyBuddyOnAir_result((err != null ? err : {success: result})); + output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyBuddyOnAir", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38498,16 +39991,26 @@ TalkServiceProcessor.prototype.process_notifyIndividualEvent = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_notifyIndividualEvent_result(err); - output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_notifyIndividualEvent_result(err); + output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.notifyIndividualEvent(args.notificationStatus, args.receiverMids, function (err, result) { - var result = new TalkService_notifyIndividualEvent_result((err != null ? err : {success: result})); - output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); + this._handler.notifyIndividualEvent(args.notificationStatus, args.receiverMids, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_notifyIndividualEvent_result((err != null ? err : {success: result})); + output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyIndividualEvent", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38528,16 +40031,21 @@ TalkServiceProcessor.prototype.process_notifyInstalled = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_notifyInstalled_result(err); - output.writeMessageBegin("notifyInstalled", Thrift.MessageType.REPLY, seqid); + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyInstalled", Thrift.MessageType.EXCEPTION, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.notifyInstalled(args.udidHash, args.applicationTypeWithExtensions, function (err, result) { - var result = new TalkService_notifyInstalled_result((err != null ? err : {success: result})); - output.writeMessageBegin("notifyInstalled", Thrift.MessageType.REPLY, seqid); + this._handler.notifyInstalled(args.udidHash, args.applicationTypeWithExtensions, function (err, result) { + if (err == null) { + var result = new TalkService_notifyInstalled_result((err != null ? err : {success: result})); + output.writeMessageBegin("notifyInstalled", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyInstalled", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38558,16 +40066,21 @@ TalkServiceProcessor.prototype.process_notifyRegistrationComplete = function(seq output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_notifyRegistrationComplete_result(err); - output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.REPLY, seqid); + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.EXCEPTION, seqid); result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.notifyRegistrationComplete(args.udidHash, args.applicationTypeWithExtensions, function (err, result) { - var result = new TalkService_notifyRegistrationComplete_result((err != null ? err : {success: result})); - output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.REPLY, seqid); + this._handler.notifyRegistrationComplete(args.udidHash, args.applicationTypeWithExtensions, function (err, result) { + if (err == null) { + var result = new TalkService_notifyRegistrationComplete_result((err != null ? err : {success: result})); + output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyRegistrationComplete", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38588,16 +40101,26 @@ TalkServiceProcessor.prototype.process_notifySleep = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_notifySleep_result(err); - output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_notifySleep_result(err); + output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifySleep", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.notifySleep(args.lastRev, args.badge, function (err, result) { - var result = new TalkService_notifySleep_result((err != null ? err : {success: result})); - output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); + this._handler.notifySleep(args.lastRev, args.badge, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_notifySleep_result((err != null ? err : {success: result})); + output.writeMessageBegin("notifySleep", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifySleep", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38618,16 +40141,26 @@ TalkServiceProcessor.prototype.process_notifyUpdated = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_notifyUpdated_result(err); - output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_notifyUpdated_result(err); + output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyUpdated", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.notifyUpdated(args.lastRev, args.deviceInfo, function (err, result) { - var result = new TalkService_notifyUpdated_result((err != null ? err : {success: result})); - output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); + this._handler.notifyUpdated(args.lastRev, args.deviceInfo, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_notifyUpdated_result((err != null ? err : {success: result})); + output.writeMessageBegin("notifyUpdated", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("notifyUpdated", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38648,16 +40181,26 @@ TalkServiceProcessor.prototype.process_openProximityMatch = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_openProximityMatch_result(err); - output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_openProximityMatch_result(err); + output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("openProximityMatch", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.openProximityMatch(args.location, function (err, result) { - var result = new TalkService_openProximityMatch_result((err != null ? err : {success: result})); - output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); + this._handler.openProximityMatch(args.location, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_openProximityMatch_result((err != null ? err : {success: result})); + output.writeMessageBegin("openProximityMatch", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("openProximityMatch", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38678,16 +40221,26 @@ TalkServiceProcessor.prototype.process_registerBuddyUser = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerBuddyUser_result(err); - output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerBuddyUser_result(err); + output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerBuddyUser(args.buddyId, args.registrarPassword, function (err, result) { - var result = new TalkService_registerBuddyUser_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); + this._handler.registerBuddyUser(args.buddyId, args.registrarPassword, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerBuddyUser_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerBuddyUser", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38708,16 +40261,26 @@ TalkServiceProcessor.prototype.process_registerBuddyUserid = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerBuddyUserid_result(err); - output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerBuddyUserid_result(err); + output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerBuddyUserid(args.seq, args.userid, function (err, result) { - var result = new TalkService_registerBuddyUserid_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); + this._handler.registerBuddyUserid(args.seq, args.userid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerBuddyUserid_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerBuddyUserid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38738,16 +40301,26 @@ TalkServiceProcessor.prototype.process_registerDevice = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerDevice_result(err); - output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerDevice_result(err); + output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerDevice", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerDevice(args.sessionId, function (err, result) { - var result = new TalkService_registerDevice_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); + this._handler.registerDevice(args.sessionId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerDevice_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerDevice", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerDevice", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38768,16 +40341,26 @@ TalkServiceProcessor.prototype.process_registerDeviceWithIdentityCredential = fu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerDeviceWithIdentityCredential_result(err); - output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerDeviceWithIdentityCredential_result(err); + output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerDeviceWithIdentityCredential(args.sessionId, args.provider, args.identifier, args.verifier, function (err, result) { - var result = new TalkService_registerDeviceWithIdentityCredential_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + this._handler.registerDeviceWithIdentityCredential(args.sessionId, args.provider, args.identifier, args.verifier, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerDeviceWithIdentityCredential_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerDeviceWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38798,16 +40381,26 @@ TalkServiceProcessor.prototype.process_registerDeviceWithoutPhoneNumber = functi output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerDeviceWithoutPhoneNumber_result(err); - output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerDeviceWithoutPhoneNumber_result(err); + output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerDeviceWithoutPhoneNumber(args.region, args.udidHash, args.deviceInfo, function (err, result) { - var result = new TalkService_registerDeviceWithoutPhoneNumber_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); + this._handler.registerDeviceWithoutPhoneNumber(args.region, args.udidHash, args.deviceInfo, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerDeviceWithoutPhoneNumber_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerDeviceWithoutPhoneNumber", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38828,16 +40421,26 @@ TalkServiceProcessor.prototype.process_registerDeviceWithoutPhoneNumberWithIdent output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result(err); - output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result(err); + output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerDeviceWithoutPhoneNumberWithIdentityCredential(args.region, args.udidHash, args.deviceInfo, args.provider, args.identifier, args.verifier, args.mid, function (err, result) { - var result = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + this._handler.registerDeviceWithoutPhoneNumberWithIdentityCredential(args.region, args.udidHash, args.deviceInfo, args.provider, args.identifier, args.verifier, args.mid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerDeviceWithoutPhoneNumberWithIdentityCredential_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerDeviceWithoutPhoneNumberWithIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38858,16 +40461,26 @@ TalkServiceProcessor.prototype.process_registerUserid = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerUserid_result(err); - output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerUserid_result(err); + output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerUserid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerUserid(args.reqSeq, args.userid, function (err, result) { - var result = new TalkService_registerUserid_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); + this._handler.registerUserid(args.reqSeq, args.userid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerUserid_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerUserid", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerUserid", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38888,16 +40501,26 @@ TalkServiceProcessor.prototype.process_registerWapDevice = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerWapDevice_result(err); - output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerWapDevice_result(err); + output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerWapDevice", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerWapDevice(args.invitationHash, args.guidHash, args.email, args.deviceInfo, function (err, result) { - var result = new TalkService_registerWapDevice_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, seqid); + this._handler.registerWapDevice(args.invitationHash, args.guidHash, args.email, args.deviceInfo, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerWapDevice_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerWapDevice", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerWapDevice", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38918,16 +40541,26 @@ TalkServiceProcessor.prototype.process_registerWithExistingSnsIdAndIdentityCrede output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result(err); - output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result(err); + output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerWithExistingSnsIdAndIdentityCredential(args.identityCredential, args.region, args.udidHash, args.deviceInfo, function (err, result) { - var result = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); + this._handler.registerWithExistingSnsIdAndIdentityCredential(args.identityCredential, args.region, args.udidHash, args.deviceInfo, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerWithExistingSnsIdAndIdentityCredential_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerWithExistingSnsIdAndIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38948,16 +40581,26 @@ TalkServiceProcessor.prototype.process_registerWithSnsId = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerWithSnsId_result(err); - output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerWithSnsId_result(err); + output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerWithSnsId(args.snsIdType, args.snsAccessToken, args.region, args.udidHash, args.deviceInfo, args.mid, function (err, result) { - var result = new TalkService_registerWithSnsId_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, seqid); + this._handler.registerWithSnsId(args.snsIdType, args.snsAccessToken, args.region, args.udidHash, args.deviceInfo, args.mid, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerWithSnsId_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerWithSnsId", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -38978,16 +40621,26 @@ TalkServiceProcessor.prototype.process_registerWithSnsIdAndIdentityCredential = output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_registerWithSnsIdAndIdentityCredential_result(err); - output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_registerWithSnsIdAndIdentityCredential_result(err); + output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.registerWithSnsIdAndIdentityCredential(args.snsIdType, args.snsAccessToken, args.identityCredential, args.region, args.udidHash, args.deviceInfo, function (err, result) { - var result = new TalkService_registerWithSnsIdAndIdentityCredential_result((err != null ? err : {success: result})); - output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); + this._handler.registerWithSnsIdAndIdentityCredential(args.snsIdType, args.snsAccessToken, args.identityCredential, args.region, args.udidHash, args.deviceInfo, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_registerWithSnsIdAndIdentityCredential_result((err != null ? err : {success: result})); + output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("registerWithSnsIdAndIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39008,16 +40661,26 @@ TalkServiceProcessor.prototype.process_reissueDeviceCredential = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_reissueDeviceCredential_result(err); - output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_reissueDeviceCredential_result(err); + output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.reissueDeviceCredential( function (err, result) { - var result = new TalkService_reissueDeviceCredential_result((err != null ? err : {success: result})); - output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); + this._handler.reissueDeviceCredential(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_reissueDeviceCredential_result((err != null ? err : {success: result})); + output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reissueDeviceCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39038,16 +40701,26 @@ TalkServiceProcessor.prototype.process_reissueUserTicket = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_reissueUserTicket_result(err); - output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_reissueUserTicket_result(err); + output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.reissueUserTicket(args.expirationTime, args.maxUseCount, function (err, result) { - var result = new TalkService_reissueUserTicket_result((err != null ? err : {success: result})); - output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); + this._handler.reissueUserTicket(args.expirationTime, args.maxUseCount, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_reissueUserTicket_result((err != null ? err : {success: result})); + output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reissueUserTicket", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39068,16 +40741,26 @@ TalkServiceProcessor.prototype.process_rejectGroupInvitation = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_rejectGroupInvitation_result(err); - output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_rejectGroupInvitation_result(err); + output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.rejectGroupInvitation(args.reqSeq, args.groupId, function (err, result) { - var result = new TalkService_rejectGroupInvitation_result((err != null ? err : {success: result})); - output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); + this._handler.rejectGroupInvitation(args.reqSeq, args.groupId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_rejectGroupInvitation_result((err != null ? err : {success: result})); + output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("rejectGroupInvitation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39098,16 +40781,26 @@ TalkServiceProcessor.prototype.process_releaseSession = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_releaseSession_result(err); - output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_releaseSession_result(err); + output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("releaseSession", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.releaseSession( function (err, result) { - var result = new TalkService_releaseSession_result((err != null ? err : {success: result})); - output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); + this._handler.releaseSession(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_releaseSession_result((err != null ? err : {success: result})); + output.writeMessageBegin("releaseSession", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("releaseSession", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39128,16 +40821,26 @@ TalkServiceProcessor.prototype.process_removeAllMessages = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_removeAllMessages_result(err); - output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_removeAllMessages_result(err); + output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeAllMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.removeAllMessages(args.seq, args.lastMessageId, function (err, result) { - var result = new TalkService_removeAllMessages_result((err != null ? err : {success: result})); - output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); + this._handler.removeAllMessages(args.seq, args.lastMessageId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_removeAllMessages_result((err != null ? err : {success: result})); + output.writeMessageBegin("removeAllMessages", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeAllMessages", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39158,16 +40861,26 @@ TalkServiceProcessor.prototype.process_removeBuddyLocation = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_removeBuddyLocation_result(err); - output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_removeBuddyLocation_result(err); + output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.removeBuddyLocation(args.mid, args.index, function (err, result) { - var result = new TalkService_removeBuddyLocation_result((err != null ? err : {success: result})); - output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); + this._handler.removeBuddyLocation(args.mid, args.index, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_removeBuddyLocation_result((err != null ? err : {success: result})); + output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39188,16 +40901,26 @@ TalkServiceProcessor.prototype.process_removeMessage = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_removeMessage_result(err); - output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_removeMessage_result(err); + output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeMessage", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.removeMessage(args.messageId, function (err, result) { - var result = new TalkService_removeMessage_result((err != null ? err : {success: result})); - output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); + this._handler.removeMessage(args.messageId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_removeMessage_result((err != null ? err : {success: result})); + output.writeMessageBegin("removeMessage", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeMessage", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39218,16 +40941,26 @@ TalkServiceProcessor.prototype.process_removeMessageFromMyHome = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_removeMessageFromMyHome_result(err); - output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_removeMessageFromMyHome_result(err); + output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.removeMessageFromMyHome(args.messageId, function (err, result) { - var result = new TalkService_removeMessageFromMyHome_result((err != null ? err : {success: result})); - output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); + this._handler.removeMessageFromMyHome(args.messageId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_removeMessageFromMyHome_result((err != null ? err : {success: result})); + output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeMessageFromMyHome", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39248,16 +40981,26 @@ TalkServiceProcessor.prototype.process_removeSnsId = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_removeSnsId_result(err); - output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_removeSnsId_result(err); + output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeSnsId", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.removeSnsId(args.snsIdType, function (err, result) { - var result = new TalkService_removeSnsId_result((err != null ? err : {success: result})); - output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); + this._handler.removeSnsId(args.snsIdType, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_removeSnsId_result((err != null ? err : {success: result})); + output.writeMessageBegin("removeSnsId", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("removeSnsId", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39278,16 +41021,26 @@ TalkServiceProcessor.prototype.process_report = function(seqid, input, output) { output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_report_result(err); - output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_report_result(err); + output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("report", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.report(args.syncOpRevision, args.category, args.report, function (err, result) { - var result = new TalkService_report_result((err != null ? err : {success: result})); - output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); + this._handler.report(args.syncOpRevision, args.category, args.report, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_report_result((err != null ? err : {success: result})); + output.writeMessageBegin("report", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("report", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39308,16 +41061,26 @@ TalkServiceProcessor.prototype.process_reportContacts = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_reportContacts_result(err); - output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_reportContacts_result(err); + output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportContacts", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.reportContacts(args.syncOpRevision, args.category, args.contactReports, args.actionType, function (err, result) { - var result = new TalkService_reportContacts_result((err != null ? err : {success: result})); - output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, seqid); + this._handler.reportContacts(args.syncOpRevision, args.category, args.contactReports, args.actionType, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_reportContacts_result((err != null ? err : {success: result})); + output.writeMessageBegin("reportContacts", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportContacts", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39338,16 +41101,26 @@ TalkServiceProcessor.prototype.process_reportGroups = function(seqid, input, out output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_reportGroups_result(err); - output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_reportGroups_result(err); + output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportGroups", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.reportGroups(args.syncOpRevision, args.groups, function (err, result) { - var result = new TalkService_reportGroups_result((err != null ? err : {success: result})); - output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); + this._handler.reportGroups(args.syncOpRevision, args.groups, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_reportGroups_result((err != null ? err : {success: result})); + output.writeMessageBegin("reportGroups", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportGroups", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39368,16 +41141,26 @@ TalkServiceProcessor.prototype.process_reportProfile = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_reportProfile_result(err); - output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_reportProfile_result(err); + output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportProfile", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.reportProfile(args.syncOpRevision, args.profile, function (err, result) { - var result = new TalkService_reportProfile_result((err != null ? err : {success: result})); - output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); + this._handler.reportProfile(args.syncOpRevision, args.profile, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_reportProfile_result((err != null ? err : {success: result})); + output.writeMessageBegin("reportProfile", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportProfile", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39398,16 +41181,26 @@ TalkServiceProcessor.prototype.process_reportRooms = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_reportRooms_result(err); - output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_reportRooms_result(err); + output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportRooms", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.reportRooms(args.syncOpRevision, args.rooms, function (err, result) { - var result = new TalkService_reportRooms_result((err != null ? err : {success: result})); - output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); + this._handler.reportRooms(args.syncOpRevision, args.rooms, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_reportRooms_result((err != null ? err : {success: result})); + output.writeMessageBegin("reportRooms", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportRooms", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39428,16 +41221,26 @@ TalkServiceProcessor.prototype.process_reportSettings = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_reportSettings_result(err); - output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_reportSettings_result(err); + output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportSettings", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.reportSettings(args.syncOpRevision, args.settings, function (err, result) { - var result = new TalkService_reportSettings_result((err != null ? err : {success: result})); - output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); + this._handler.reportSettings(args.syncOpRevision, args.settings, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_reportSettings_result((err != null ? err : {success: result})); + output.writeMessageBegin("reportSettings", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportSettings", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39458,16 +41261,26 @@ TalkServiceProcessor.prototype.process_reportSpammer = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_reportSpammer_result(err); - output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_reportSpammer_result(err); + output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportSpammer", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.reportSpammer(args.spammerMid, args.spammerReasons, args.spamMessageIds, function (err, result) { - var result = new TalkService_reportSpammer_result((err != null ? err : {success: result})); - output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); + this._handler.reportSpammer(args.spammerMid, args.spammerReasons, args.spamMessageIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_reportSpammer_result((err != null ? err : {success: result})); + output.writeMessageBegin("reportSpammer", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("reportSpammer", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39488,16 +41301,26 @@ TalkServiceProcessor.prototype.process_requestAccountPasswordReset = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_requestAccountPasswordReset_result(err); - output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_requestAccountPasswordReset_result(err); + output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.requestAccountPasswordReset(args.provider, args.identifier, args.locale, function (err, result) { - var result = new TalkService_requestAccountPasswordReset_result((err != null ? err : {success: result})); - output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); + this._handler.requestAccountPasswordReset(args.provider, args.identifier, args.locale, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_requestAccountPasswordReset_result((err != null ? err : {success: result})); + output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("requestAccountPasswordReset", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39518,16 +41341,26 @@ TalkServiceProcessor.prototype.process_requestEmailConfirmation = function(seqid output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_requestEmailConfirmation_result(err); - output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_requestEmailConfirmation_result(err); + output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.requestEmailConfirmation(args.emailConfirmation, function (err, result) { - var result = new TalkService_requestEmailConfirmation_result((err != null ? err : {success: result})); - output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); + this._handler.requestEmailConfirmation(args.emailConfirmation, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_requestEmailConfirmation_result((err != null ? err : {success: result})); + output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("requestEmailConfirmation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39548,16 +41381,26 @@ TalkServiceProcessor.prototype.process_requestIdentityUnbind = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_requestIdentityUnbind_result(err); - output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_requestIdentityUnbind_result(err); + output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.requestIdentityUnbind(args.provider, args.identifier, function (err, result) { - var result = new TalkService_requestIdentityUnbind_result((err != null ? err : {success: result})); - output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); + this._handler.requestIdentityUnbind(args.provider, args.identifier, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_requestIdentityUnbind_result((err != null ? err : {success: result})); + output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("requestIdentityUnbind", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39578,16 +41421,26 @@ TalkServiceProcessor.prototype.process_resendEmailConfirmation = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_resendEmailConfirmation_result(err); - output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_resendEmailConfirmation_result(err); + output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.resendEmailConfirmation(args.verifier, function (err, result) { - var result = new TalkService_resendEmailConfirmation_result((err != null ? err : {success: result})); - output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); + this._handler.resendEmailConfirmation(args.verifier, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_resendEmailConfirmation_result((err != null ? err : {success: result})); + output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("resendEmailConfirmation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39608,16 +41461,26 @@ TalkServiceProcessor.prototype.process_resendPinCode = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_resendPinCode_result(err); - output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_resendPinCode_result(err); + output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("resendPinCode", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.resendPinCode(args.sessionId, function (err, result) { - var result = new TalkService_resendPinCode_result((err != null ? err : {success: result})); - output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); + this._handler.resendPinCode(args.sessionId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_resendPinCode_result((err != null ? err : {success: result})); + output.writeMessageBegin("resendPinCode", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("resendPinCode", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39638,16 +41501,26 @@ TalkServiceProcessor.prototype.process_resendPinCodeBySMS = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_resendPinCodeBySMS_result(err); - output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_resendPinCodeBySMS_result(err); + output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.resendPinCodeBySMS(args.sessionId, function (err, result) { - var result = new TalkService_resendPinCodeBySMS_result((err != null ? err : {success: result})); - output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); + this._handler.resendPinCodeBySMS(args.sessionId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_resendPinCodeBySMS_result((err != null ? err : {success: result})); + output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("resendPinCodeBySMS", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39668,16 +41541,26 @@ TalkServiceProcessor.prototype.process_sendChatChecked = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendChatChecked_result(err); - output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendChatChecked_result(err); + output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendChatChecked", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendChatChecked(args.seq, args.consumer, args.lastMessageId, function (err, result) { - var result = new TalkService_sendChatChecked_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); + this._handler.sendChatChecked(args.seq, args.consumer, args.lastMessageId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendChatChecked_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendChatChecked", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendChatChecked", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39698,16 +41581,26 @@ TalkServiceProcessor.prototype.process_sendChatRemoved = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendChatRemoved_result(err); - output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendChatRemoved_result(err); + output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendChatRemoved(args.seq, args.consumer, args.lastMessageId, function (err, result) { - var result = new TalkService_sendChatRemoved_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); + this._handler.sendChatRemoved(args.seq, args.consumer, args.lastMessageId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendChatRemoved_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendChatRemoved", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39728,16 +41621,26 @@ TalkServiceProcessor.prototype.process_sendContentPreviewUpdated = function(seqi output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendContentPreviewUpdated_result(err); - output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendContentPreviewUpdated_result(err); + output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendContentPreviewUpdated(args.esq, args.messageId, args.receiverMids, function (err, result) { - var result = new TalkService_sendContentPreviewUpdated_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); + this._handler.sendContentPreviewUpdated(args.esq, args.messageId, args.receiverMids, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendContentPreviewUpdated_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendContentPreviewUpdated", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39758,16 +41661,26 @@ TalkServiceProcessor.prototype.process_sendContentReceipt = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendContentReceipt_result(err); - output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendContentReceipt_result(err); + output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendContentReceipt(args.seq, args.consumer, args.messageId, function (err, result) { - var result = new TalkService_sendContentReceipt_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); + this._handler.sendContentReceipt(args.seq, args.consumer, args.messageId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendContentReceipt_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendContentReceipt", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39788,16 +41701,26 @@ TalkServiceProcessor.prototype.process_sendDummyPush = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendDummyPush_result(err); - output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendDummyPush_result(err); + output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendDummyPush", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendDummyPush( function (err, result) { - var result = new TalkService_sendDummyPush_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); + this._handler.sendDummyPush(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendDummyPush_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendDummyPush", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendDummyPush", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39818,16 +41741,26 @@ TalkServiceProcessor.prototype.process_sendEvent = function(seqid, input, output output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendEvent_result(err); - output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendEvent_result(err); + output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendEvent", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendEvent(args.seq, args.message, function (err, result) { - var result = new TalkService_sendEvent_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); + this._handler.sendEvent(args.seq, args.message, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendEvent_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendEvent", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendEvent", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39848,16 +41781,26 @@ TalkServiceProcessor.prototype.process_sendMessage = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendMessage_result(err); - output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendMessage_result(err); + output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendMessage", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendMessage(args.seq, args.message, function (err, result) { - var result = new TalkService_sendMessage_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); + this._handler.sendMessage(args.seq, args.message, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendMessage_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendMessage", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendMessage", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39878,16 +41821,26 @@ TalkServiceProcessor.prototype.process_sendMessageIgnored = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendMessageIgnored_result(err); - output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendMessageIgnored_result(err); + output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendMessageIgnored(args.seq, args.consumer, args.messageIds, function (err, result) { - var result = new TalkService_sendMessageIgnored_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); + this._handler.sendMessageIgnored(args.seq, args.consumer, args.messageIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendMessageIgnored_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendMessageIgnored", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39908,16 +41861,26 @@ TalkServiceProcessor.prototype.process_sendMessageReceipt = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendMessageReceipt_result(err); - output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendMessageReceipt_result(err); + output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendMessageReceipt(args.seq, args.consumer, args.messageIds, function (err, result) { - var result = new TalkService_sendMessageReceipt_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); + this._handler.sendMessageReceipt(args.seq, args.consumer, args.messageIds, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendMessageReceipt_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendMessageReceipt", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39938,16 +41901,26 @@ TalkServiceProcessor.prototype.process_sendMessageToMyHome = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_sendMessageToMyHome_result(err); - output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_sendMessageToMyHome_result(err); + output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.sendMessageToMyHome(args.seq, args.message, function (err, result) { - var result = new TalkService_sendMessageToMyHome_result((err != null ? err : {success: result})); - output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); + this._handler.sendMessageToMyHome(args.seq, args.message, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_sendMessageToMyHome_result((err != null ? err : {success: result})); + output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("sendMessageToMyHome", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39968,16 +41941,26 @@ TalkServiceProcessor.prototype.process_setBuddyLocation = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_setBuddyLocation_result(err); - output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_setBuddyLocation_result(err); + output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.setBuddyLocation(args.mid, args.index, args.location, function (err, result) { - var result = new TalkService_setBuddyLocation_result((err != null ? err : {success: result})); - output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); + this._handler.setBuddyLocation(args.mid, args.index, args.location, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_setBuddyLocation_result((err != null ? err : {success: result})); + output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("setBuddyLocation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -39998,16 +41981,26 @@ TalkServiceProcessor.prototype.process_setIdentityCredential = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_setIdentityCredential_result(err); - output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_setIdentityCredential_result(err); + output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.setIdentityCredential(args.provider, args.identifier, args.verifier, function (err, result) { - var result = new TalkService_setIdentityCredential_result((err != null ? err : {success: result})); - output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); + this._handler.setIdentityCredential(args.provider, args.identifier, args.verifier, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_setIdentityCredential_result((err != null ? err : {success: result})); + output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("setIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40028,16 +42021,26 @@ TalkServiceProcessor.prototype.process_setNotificationsEnabled = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_setNotificationsEnabled_result(err); - output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_setNotificationsEnabled_result(err); + output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.setNotificationsEnabled(args.reqSeq, args.type, args.target, args.enablement, function (err, result) { - var result = new TalkService_setNotificationsEnabled_result((err != null ? err : {success: result})); - output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, seqid); + this._handler.setNotificationsEnabled(args.reqSeq, args.type, args.target, args.enablement, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_setNotificationsEnabled_result((err != null ? err : {success: result})); + output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("setNotificationsEnabled", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40058,16 +42061,26 @@ TalkServiceProcessor.prototype.process_startUpdateVerification = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_startUpdateVerification_result(err); - output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_startUpdateVerification_result(err); + output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.startUpdateVerification(args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.locale, function (err, result) { - var result = new TalkService_startUpdateVerification_result((err != null ? err : {success: result})); - output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, seqid); + this._handler.startUpdateVerification(args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.locale, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_startUpdateVerification_result((err != null ? err : {success: result})); + output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("startUpdateVerification", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40088,16 +42101,26 @@ TalkServiceProcessor.prototype.process_startVerification = function(seqid, input output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_startVerification_result(err); - output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_startVerification_result(err); + output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("startVerification", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.startVerification(args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.mid, args.locale, function (err, result) { - var result = new TalkService_startVerification_result((err != null ? err : {success: result})); - output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, seqid); + this._handler.startVerification(args.region, args.carrier, args.phone, args.udidHash, args.deviceInfo, args.networkCode, args.mid, args.locale, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_startVerification_result((err != null ? err : {success: result})); + output.writeMessageBegin("startVerification", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("startVerification", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40118,16 +42141,26 @@ TalkServiceProcessor.prototype.process_storeUpdateProfileAttribute = function(se output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_storeUpdateProfileAttribute_result(err); - output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_storeUpdateProfileAttribute_result(err); + output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.storeUpdateProfileAttribute(args.seq, args.profileAttribute, args.value, function (err, result) { - var result = new TalkService_storeUpdateProfileAttribute_result((err != null ? err : {success: result})); - output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); + this._handler.storeUpdateProfileAttribute(args.seq, args.profileAttribute, args.value, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_storeUpdateProfileAttribute_result((err != null ? err : {success: result})); + output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("storeUpdateProfileAttribute", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40148,16 +42181,26 @@ TalkServiceProcessor.prototype.process_syncContactBySnsIds = function(seqid, inp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_syncContactBySnsIds_result(err); - output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_syncContactBySnsIds_result(err); + output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.syncContactBySnsIds(args.reqSeq, args.modifications, function (err, result) { - var result = new TalkService_syncContactBySnsIds_result((err != null ? err : {success: result})); - output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); + this._handler.syncContactBySnsIds(args.reqSeq, args.modifications, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_syncContactBySnsIds_result((err != null ? err : {success: result})); + output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("syncContactBySnsIds", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40178,16 +42221,26 @@ TalkServiceProcessor.prototype.process_syncContacts = function(seqid, input, out output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_syncContacts_result(err); - output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_syncContacts_result(err); + output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("syncContacts", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.syncContacts(args.reqSeq, args.localContacts, function (err, result) { - var result = new TalkService_syncContacts_result((err != null ? err : {success: result})); - output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); + this._handler.syncContacts(args.reqSeq, args.localContacts, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_syncContacts_result((err != null ? err : {success: result})); + output.writeMessageBegin("syncContacts", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("syncContacts", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40208,16 +42261,26 @@ TalkServiceProcessor.prototype.process_trySendMessage = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_trySendMessage_result(err); - output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_trySendMessage_result(err); + output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("trySendMessage", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.trySendMessage(args.seq, args.message, function (err, result) { - var result = new TalkService_trySendMessage_result((err != null ? err : {success: result})); - output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); + this._handler.trySendMessage(args.seq, args.message, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_trySendMessage_result((err != null ? err : {success: result})); + output.writeMessageBegin("trySendMessage", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("trySendMessage", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40238,16 +42301,26 @@ TalkServiceProcessor.prototype.process_unblockContact = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_unblockContact_result(err); - output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_unblockContact_result(err); + output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("unblockContact", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.unblockContact(args.reqSeq, args.id, function (err, result) { - var result = new TalkService_unblockContact_result((err != null ? err : {success: result})); - output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); + this._handler.unblockContact(args.reqSeq, args.id, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_unblockContact_result((err != null ? err : {success: result})); + output.writeMessageBegin("unblockContact", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("unblockContact", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40268,16 +42341,26 @@ TalkServiceProcessor.prototype.process_unblockRecommendation = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_unblockRecommendation_result(err); - output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_unblockRecommendation_result(err); + output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.unblockRecommendation(args.reqSeq, args.id, function (err, result) { - var result = new TalkService_unblockRecommendation_result((err != null ? err : {success: result})); - output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); + this._handler.unblockRecommendation(args.reqSeq, args.id, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_unblockRecommendation_result((err != null ? err : {success: result})); + output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("unblockRecommendation", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40298,16 +42381,26 @@ TalkServiceProcessor.prototype.process_unregisterUserAndDevice = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_unregisterUserAndDevice_result(err); - output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_unregisterUserAndDevice_result(err); + output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.unregisterUserAndDevice( function (err, result) { - var result = new TalkService_unregisterUserAndDevice_result((err != null ? err : {success: result})); - output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); + this._handler.unregisterUserAndDevice(function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_unregisterUserAndDevice_result((err != null ? err : {success: result})); + output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("unregisterUserAndDevice", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40328,16 +42421,26 @@ TalkServiceProcessor.prototype.process_updateApnsDeviceToken = function(seqid, i output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateApnsDeviceToken_result(err); - output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateApnsDeviceToken_result(err); + output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateApnsDeviceToken(args.apnsDeviceToken, function (err, result) { - var result = new TalkService_updateApnsDeviceToken_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); + this._handler.updateApnsDeviceToken(args.apnsDeviceToken, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateApnsDeviceToken_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateApnsDeviceToken", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40358,16 +42461,26 @@ TalkServiceProcessor.prototype.process_updateBuddySetting = function(seqid, inpu output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateBuddySetting_result(err); - output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateBuddySetting_result(err); + output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateBuddySetting(args.key, args.value, function (err, result) { - var result = new TalkService_updateBuddySetting_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); + this._handler.updateBuddySetting(args.key, args.value, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateBuddySetting_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateBuddySetting", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40388,16 +42501,26 @@ TalkServiceProcessor.prototype.process_updateC2DMRegistrationId = function(seqid output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateC2DMRegistrationId_result(err); - output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateC2DMRegistrationId_result(err); + output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateC2DMRegistrationId(args.registrationId, function (err, result) { - var result = new TalkService_updateC2DMRegistrationId_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); + this._handler.updateC2DMRegistrationId(args.registrationId, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateC2DMRegistrationId_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateC2DMRegistrationId", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40418,16 +42541,26 @@ TalkServiceProcessor.prototype.process_updateContactSetting = function(seqid, in output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateContactSetting_result(err); - output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateContactSetting_result(err); + output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateContactSetting", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateContactSetting(args.reqSeq, args.mid, args.flag, args.value, function (err, result) { - var result = new TalkService_updateContactSetting_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, seqid); + this._handler.updateContactSetting(args.reqSeq, args.mid, args.flag, args.value, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateContactSetting_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateContactSetting", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateContactSetting", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40448,16 +42581,26 @@ TalkServiceProcessor.prototype.process_updateCustomModeSettings = function(seqid output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateCustomModeSettings_result(err); - output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateCustomModeSettings_result(err); + output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateCustomModeSettings(args.customMode, args.paramMap, function (err, result) { - var result = new TalkService_updateCustomModeSettings_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); + this._handler.updateCustomModeSettings(args.customMode, args.paramMap, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateCustomModeSettings_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateCustomModeSettings", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40478,16 +42621,26 @@ TalkServiceProcessor.prototype.process_updateDeviceInfo = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateDeviceInfo_result(err); - output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateDeviceInfo_result(err); + output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateDeviceInfo(args.deviceUid, args.deviceInfo, function (err, result) { - var result = new TalkService_updateDeviceInfo_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); + this._handler.updateDeviceInfo(args.deviceUid, args.deviceInfo, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateDeviceInfo_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateDeviceInfo", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40508,16 +42661,26 @@ TalkServiceProcessor.prototype.process_updateGroup = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateGroup_result(err); - output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateGroup_result(err); + output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateGroup(args.reqSeq, args.group, function (err, result) { - var result = new TalkService_updateGroup_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); + this._handler.updateGroup(args.reqSeq, args.group, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateGroup_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateGroup", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateGroup", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40538,16 +42701,26 @@ TalkServiceProcessor.prototype.process_updateNotificationToken = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateNotificationToken_result(err); - output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateNotificationToken_result(err); + output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateNotificationToken(args.type, args.token, function (err, result) { - var result = new TalkService_updateNotificationToken_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); + this._handler.updateNotificationToken(args.type, args.token, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateNotificationToken_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateNotificationToken", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40568,16 +42741,26 @@ TalkServiceProcessor.prototype.process_updateNotificationTokenWithBytes = functi output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateNotificationTokenWithBytes_result(err); - output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateNotificationTokenWithBytes_result(err); + output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateNotificationTokenWithBytes(args.type, args.token, function (err, result) { - var result = new TalkService_updateNotificationTokenWithBytes_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); + this._handler.updateNotificationTokenWithBytes(args.type, args.token, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateNotificationTokenWithBytes_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateNotificationTokenWithBytes", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40598,16 +42781,26 @@ TalkServiceProcessor.prototype.process_updateProfile = function(seqid, input, ou output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateProfile_result(err); - output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateProfile_result(err); + output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateProfile", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateProfile(args.reqSeq, args.profile, function (err, result) { - var result = new TalkService_updateProfile_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); + this._handler.updateProfile(args.reqSeq, args.profile, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateProfile_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateProfile", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateProfile", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40628,16 +42821,26 @@ TalkServiceProcessor.prototype.process_updateProfileAttribute = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateProfileAttribute_result(err); - output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateProfileAttribute_result(err); + output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateProfileAttribute(args.reqSeq, args.attr, args.value, function (err, result) { - var result = new TalkService_updateProfileAttribute_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); + this._handler.updateProfileAttribute(args.reqSeq, args.attr, args.value, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateProfileAttribute_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateProfileAttribute", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40658,16 +42861,26 @@ TalkServiceProcessor.prototype.process_updateRegion = function(seqid, input, out output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateRegion_result(err); - output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateRegion_result(err); + output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateRegion", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateRegion(args.region, function (err, result) { - var result = new TalkService_updateRegion_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); + this._handler.updateRegion(args.region, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateRegion_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateRegion", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateRegion", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40688,16 +42901,26 @@ TalkServiceProcessor.prototype.process_updateSettings = function(seqid, input, o output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateSettings_result(err); - output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateSettings_result(err); + output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateSettings", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateSettings(args.reqSeq, args.settings, function (err, result) { - var result = new TalkService_updateSettings_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); + this._handler.updateSettings(args.reqSeq, args.settings, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateSettings_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateSettings", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateSettings", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40718,16 +42941,26 @@ TalkServiceProcessor.prototype.process_updateSettings2 = function(seqid, input, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateSettings2_result(err); - output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateSettings2_result(err); + output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateSettings2", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateSettings2(args.reqSeq, args.settings, function (err, result) { - var result = new TalkService_updateSettings2_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); + this._handler.updateSettings2(args.reqSeq, args.settings, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateSettings2_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateSettings2", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateSettings2", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40748,16 +42981,26 @@ TalkServiceProcessor.prototype.process_updateSettingsAttribute = function(seqid, output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateSettingsAttribute_result(err); - output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateSettingsAttribute_result(err); + output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateSettingsAttribute(args.reqSeq, args.attr, args.value, function (err, result) { - var result = new TalkService_updateSettingsAttribute_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); + this._handler.updateSettingsAttribute(args.reqSeq, args.attr, args.value, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateSettingsAttribute_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateSettingsAttribute", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40778,16 +43021,26 @@ TalkServiceProcessor.prototype.process_updateSettingsAttributes = function(seqid output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_updateSettingsAttributes_result(err); - output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_updateSettingsAttributes_result(err); + output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.updateSettingsAttributes(args.reqSeq, args.attrBitset, args.settings, function (err, result) { - var result = new TalkService_updateSettingsAttributes_result((err != null ? err : {success: result})); - output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); + this._handler.updateSettingsAttributes(args.reqSeq, args.attrBitset, args.settings, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_updateSettingsAttributes_result((err != null ? err : {success: result})); + output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("updateSettingsAttributes", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40808,16 +43061,26 @@ TalkServiceProcessor.prototype.process_verifyIdentityCredential = function(seqid output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_verifyIdentityCredential_result(err); - output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_verifyIdentityCredential_result(err); + output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.verifyIdentityCredential(args.identityProvider, args.identifier, args.password, function (err, result) { - var result = new TalkService_verifyIdentityCredential_result((err != null ? err : {success: result})); - output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); + this._handler.verifyIdentityCredential(args.identityProvider, args.identifier, args.password, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_verifyIdentityCredential_result((err != null ? err : {success: result})); + output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyIdentityCredential", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40838,16 +43101,26 @@ TalkServiceProcessor.prototype.process_verifyIdentityCredentialWithResult = func output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_verifyIdentityCredentialWithResult_result(err); - output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_verifyIdentityCredentialWithResult_result(err); + output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.verifyIdentityCredentialWithResult(args.identityCredential, function (err, result) { - var result = new TalkService_verifyIdentityCredentialWithResult_result((err != null ? err : {success: result})); - output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); + this._handler.verifyIdentityCredentialWithResult(args.identityCredential, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_verifyIdentityCredentialWithResult_result((err != null ? err : {success: result})); + output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyIdentityCredentialWithResult", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40868,16 +43141,26 @@ TalkServiceProcessor.prototype.process_verifyPhone = function(seqid, input, outp output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_verifyPhone_result(err); - output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_verifyPhone_result(err); + output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyPhone", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.verifyPhone(args.sessionId, args.pinCode, args.udidHash, function (err, result) { - var result = new TalkService_verifyPhone_result((err != null ? err : {success: result})); - output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); + this._handler.verifyPhone(args.sessionId, args.pinCode, args.udidHash, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_verifyPhone_result((err != null ? err : {success: result})); + output.writeMessageBegin("verifyPhone", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyPhone", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); @@ -40898,16 +43181,26 @@ TalkServiceProcessor.prototype.process_verifyQrcode = function(seqid, input, out output.writeMessageEnd(); output.flush(); }, function (err) { - var result = new TalkService_verifyQrcode_result(err); - output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); + if (err instanceof ttypes.TalkException) { + var result = new TalkService_verifyQrcode_result(err); + output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyQrcode", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); }); } else { - this._handler.verifyQrcode(args.verifier, args.pinCode, function (err, result) { - var result = new TalkService_verifyQrcode_result((err != null ? err : {success: result})); - output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); + this._handler.verifyQrcode(args.verifier, args.pinCode, function (err, result) { + if (err == null || err instanceof ttypes.TalkException) { + var result = new TalkService_verifyQrcode_result((err != null ? err : {success: result})); + output.writeMessageBegin("verifyQrcode", Thrift.MessageType.REPLY, seqid); + } else { + var result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message); + output.writeMessageBegin("verifyQrcode", Thrift.MessageType.EXCEPTION, seqid); + } result.write(output); output.writeMessageEnd(); output.flush(); diff --git a/curve-thrift/line_types.js b/curve-thrift/line_types.js index a8e8092..b8739d8 100644 --- a/curve-thrift/line_types.js +++ b/curve-thrift/line_types.js @@ -1,5 +1,5 @@ // -// Autogenerated by Thrift Compiler (0.9.2) +// Autogenerated by Thrift Compiler (0.9.3) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // @@ -333,7 +333,7 @@ ttypes.OpStatus = { 'NORMAL' : 0, 'ALERT_DISABLED' : 1 }; -ttypes.OperationType = { +ttypes.OpType = { 'END_OF_OPERATION' : 0, 'UPDATE_PROFILE' : 1, 'NOTIFIED_UPDATE_PROFILE' : 2, @@ -547,10 +547,10 @@ AgeCheckDocomoResult = module.exports.AgeCheckDocomoResult = function(args) { this.authUrl = null; this.userAgeType = null; if (args) { - if (args.authUrl !== undefined) { + if (args.authUrl !== undefined && args.authUrl !== null) { this.authUrl = args.authUrl; } - if (args.userAgeType !== undefined) { + if (args.userAgeType !== undefined && args.userAgeType !== null) { this.userAgeType = args.userAgeType; } } @@ -613,10 +613,10 @@ AgeCheckRequestResult = module.exports.AgeCheckRequestResult = function(args) { this.authUrl = null; this.sessionId = null; if (args) { - if (args.authUrl !== undefined) { + if (args.authUrl !== undefined && args.authUrl !== null) { this.authUrl = args.authUrl; } - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } } @@ -684,25 +684,25 @@ Announcement = module.exports.Announcement = function(args) { this.pictureUrl = null; this.thumbnailUrl = null; if (args) { - if (args.index !== undefined) { + if (args.index !== undefined && args.index !== null) { this.index = args.index; } - if (args.forceUpdate !== undefined) { + if (args.forceUpdate !== undefined && args.forceUpdate !== null) { this.forceUpdate = args.forceUpdate; } - if (args.title !== undefined) { + if (args.title !== undefined && args.title !== null) { this.title = args.title; } - if (args.text !== undefined) { + if (args.text !== undefined && args.text !== null) { this.text = args.text; } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.pictureUrl !== undefined) { + if (args.pictureUrl !== undefined && args.pictureUrl !== null) { this.pictureUrl = args.pictureUrl; } - if (args.thumbnailUrl !== undefined) { + if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { this.thumbnailUrl = args.thumbnailUrl; } } @@ -824,7 +824,7 @@ Announcement.prototype.write = function(output) { ChannelProvider = module.exports.ChannelProvider = function(args) { this.name = null; if (args) { - if (args.name !== undefined) { + if (args.name !== undefined && args.name !== null) { this.name = args.name; } } @@ -886,35 +886,35 @@ ChannelInfo = module.exports.ChannelInfo = function(args) { this.iconThumbnailImage = null; this.channelConfigurations = null; if (args) { - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.name !== undefined) { + if (args.name !== undefined && args.name !== null) { this.name = args.name; } - if (args.entryPageUrl !== undefined) { + if (args.entryPageUrl !== undefined && args.entryPageUrl !== null) { this.entryPageUrl = args.entryPageUrl; } - if (args.descriptionText !== undefined) { + if (args.descriptionText !== undefined && args.descriptionText !== null) { this.descriptionText = args.descriptionText; } - if (args.provider !== undefined) { - this.provider = args.provider; + if (args.provider !== undefined && args.provider !== null) { + this.provider = new ttypes.ChannelProvider(args.provider); } - if (args.publicType !== undefined) { + if (args.publicType !== undefined && args.publicType !== null) { this.publicType = args.publicType; } - if (args.iconImage !== undefined) { + if (args.iconImage !== undefined && args.iconImage !== null) { this.iconImage = args.iconImage; } - if (args.permissions !== undefined) { - this.permissions = args.permissions; + if (args.permissions !== undefined && args.permissions !== null) { + this.permissions = Thrift.copyList(args.permissions, [null]); } - if (args.iconThumbnailImage !== undefined) { + if (args.iconThumbnailImage !== undefined && args.iconThumbnailImage !== null) { this.iconThumbnailImage = args.iconThumbnailImage; } - if (args.channelConfigurations !== undefined) { - this.channelConfigurations = args.channelConfigurations; + if (args.channelConfigurations !== undefined && args.channelConfigurations !== null) { + this.channelConfigurations = Thrift.copyList(args.channelConfigurations, [null]); } } }; @@ -1117,10 +1117,10 @@ ApprovedChannelInfo = module.exports.ApprovedChannelInfo = function(args) { this.channelInfo = null; this.approvedAt = null; if (args) { - if (args.channelInfo !== undefined) { - this.channelInfo = args.channelInfo; + if (args.channelInfo !== undefined && args.channelInfo !== null) { + this.channelInfo = new ttypes.ChannelInfo(args.channelInfo); } - if (args.approvedAt !== undefined) { + if (args.approvedAt !== undefined && args.approvedAt !== null) { this.approvedAt = args.approvedAt; } } @@ -1184,10 +1184,10 @@ ApprovedChannelInfos = module.exports.ApprovedChannelInfos = function(args) { this.approvedChannelInfos = null; this.revision = null; if (args) { - if (args.approvedChannelInfos !== undefined) { - this.approvedChannelInfos = args.approvedChannelInfos; + if (args.approvedChannelInfos !== undefined && args.approvedChannelInfos !== null) { + this.approvedChannelInfos = Thrift.copyList(args.approvedChannelInfos, [ttypes.ApprovedChannelInfo]); } - if (args.revision !== undefined) { + if (args.revision !== undefined && args.revision !== null) { this.revision = args.revision; } } @@ -1273,10 +1273,10 @@ AuthQrcode = module.exports.AuthQrcode = function(args) { this.qrcode = null; this.verifier = null; if (args) { - if (args.qrcode !== undefined) { + if (args.qrcode !== undefined && args.qrcode !== null) { this.qrcode = args.qrcode; } - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } } @@ -1340,13 +1340,13 @@ BuddyBanner = module.exports.BuddyBanner = function(args) { this.buddyBannerLink = null; this.buddyBannerImageUrl = null; if (args) { - if (args.buddyBannerLinkType !== undefined) { + if (args.buddyBannerLinkType !== undefined && args.buddyBannerLinkType !== null) { this.buddyBannerLinkType = args.buddyBannerLinkType; } - if (args.buddyBannerLink !== undefined) { + if (args.buddyBannerLink !== undefined && args.buddyBannerLink !== null) { this.buddyBannerLink = args.buddyBannerLink; } - if (args.buddyBannerImageUrl !== undefined) { + if (args.buddyBannerImageUrl !== undefined && args.buddyBannerImageUrl !== null) { this.buddyBannerImageUrl = args.buddyBannerImageUrl; } } @@ -1426,25 +1426,25 @@ BuddyDetail = module.exports.BuddyDetail = function(args) { this.acceptableContentTypes = null; this.capableMyhome = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.memberCount !== undefined) { + if (args.memberCount !== undefined && args.memberCount !== null) { this.memberCount = args.memberCount; } - if (args.onAir !== undefined) { + if (args.onAir !== undefined && args.onAir !== null) { this.onAir = args.onAir; } - if (args.businessAccount !== undefined) { + if (args.businessAccount !== undefined && args.businessAccount !== null) { this.businessAccount = args.businessAccount; } - if (args.addable !== undefined) { + if (args.addable !== undefined && args.addable !== null) { this.addable = args.addable; } - if (args.acceptableContentTypes !== undefined) { - this.acceptableContentTypes = args.acceptableContentTypes; + if (args.acceptableContentTypes !== undefined && args.acceptableContentTypes !== null) { + this.acceptableContentTypes = Thrift.copyList(args.acceptableContentTypes, [null]); } - if (args.capableMyhome !== undefined) { + if (args.capableMyhome !== undefined && args.capableMyhome !== null) { this.capableMyhome = args.capableMyhome; } } @@ -1606,61 +1606,61 @@ Contact = module.exports.Contact = function(args) { this.settings = null; this.picturePath = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.status !== undefined) { + if (args.status !== undefined && args.status !== null) { this.status = args.status; } - if (args.relation !== undefined) { + if (args.relation !== undefined && args.relation !== null) { this.relation = args.relation; } - if (args.displayName !== undefined) { + if (args.displayName !== undefined && args.displayName !== null) { this.displayName = args.displayName; } - if (args.phoneticName !== undefined) { + if (args.phoneticName !== undefined && args.phoneticName !== null) { this.phoneticName = args.phoneticName; } - if (args.pictureStatus !== undefined) { + if (args.pictureStatus !== undefined && args.pictureStatus !== null) { this.pictureStatus = args.pictureStatus; } - if (args.thumbnailUrl !== undefined) { + if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { this.thumbnailUrl = args.thumbnailUrl; } - if (args.statusMessage !== undefined) { + if (args.statusMessage !== undefined && args.statusMessage !== null) { this.statusMessage = args.statusMessage; } - if (args.displayNameOverridden !== undefined) { + if (args.displayNameOverridden !== undefined && args.displayNameOverridden !== null) { this.displayNameOverridden = args.displayNameOverridden; } - if (args.favoriteTime !== undefined) { + if (args.favoriteTime !== undefined && args.favoriteTime !== null) { this.favoriteTime = args.favoriteTime; } - if (args.capableVoiceCall !== undefined) { + if (args.capableVoiceCall !== undefined && args.capableVoiceCall !== null) { this.capableVoiceCall = args.capableVoiceCall; } - if (args.capableVideoCall !== undefined) { + if (args.capableVideoCall !== undefined && args.capableVideoCall !== null) { this.capableVideoCall = args.capableVideoCall; } - if (args.capableMyhome !== undefined) { + if (args.capableMyhome !== undefined && args.capableMyhome !== null) { this.capableMyhome = args.capableMyhome; } - if (args.capableBuddy !== undefined) { + if (args.capableBuddy !== undefined && args.capableBuddy !== null) { this.capableBuddy = args.capableBuddy; } - if (args.attributes !== undefined) { + if (args.attributes !== undefined && args.attributes !== null) { this.attributes = args.attributes; } - if (args.settings !== undefined) { + if (args.settings !== undefined && args.settings !== null) { this.settings = args.settings; } - if (args.picturePath !== undefined) { + if (args.picturePath !== undefined && args.picturePath !== null) { this.picturePath = args.picturePath; } } @@ -1929,17 +1929,17 @@ BuddyList = module.exports.BuddyList = function(args) { this.totalBuddyCount = null; this.popularContacts = null; if (args) { - if (args.classification !== undefined) { + if (args.classification !== undefined && args.classification !== null) { this.classification = args.classification; } - if (args.displayName !== undefined) { + if (args.displayName !== undefined && args.displayName !== null) { this.displayName = args.displayName; } - if (args.totalBuddyCount !== undefined) { + if (args.totalBuddyCount !== undefined && args.totalBuddyCount !== null) { this.totalBuddyCount = args.totalBuddyCount; } - if (args.popularContacts !== undefined) { - this.popularContacts = args.popularContacts; + if (args.popularContacts !== undefined && args.popularContacts !== null) { + this.popularContacts = Thrift.copyList(args.popularContacts, [ttypes.Contact]); } } }; @@ -2051,19 +2051,19 @@ Location = module.exports.Location = function(args) { this.longitude = null; this.phone = null; if (args) { - if (args.title !== undefined) { + if (args.title !== undefined && args.title !== null) { this.title = args.title; } - if (args.address !== undefined) { + if (args.address !== undefined && args.address !== null) { this.address = args.address; } - if (args.latitude !== undefined) { + if (args.latitude !== undefined && args.latitude !== null) { this.latitude = args.latitude; } - if (args.longitude !== undefined) { + if (args.longitude !== undefined && args.longitude !== null) { this.longitude = args.longitude; } - if (args.phone !== undefined) { + if (args.phone !== undefined && args.phone !== null) { this.phone = args.phone; } } @@ -2165,20 +2165,20 @@ BuddyMessageRequest = module.exports.BuddyMessageRequest = function(args) { this.content = null; this.contentMetadata = null; if (args) { - if (args.contentType !== undefined) { + if (args.contentType !== undefined && args.contentType !== null) { this.contentType = args.contentType; } - if (args.text !== undefined) { + if (args.text !== undefined && args.text !== null) { this.text = args.text; } - if (args.location !== undefined) { - this.location = args.location; + if (args.location !== undefined && args.location !== null) { + this.location = new ttypes.Location(args.location); } - if (args.content !== undefined) { + if (args.content !== undefined && args.content !== null) { this.content = args.content; } - if (args.contentMetadata !== undefined) { - this.contentMetadata = args.contentMetadata; + if (args.contentMetadata !== undefined && args.contentMetadata !== null) { + this.contentMetadata = Thrift.copyMap(args.contentMetadata, [null]); } } }; @@ -2304,11 +2304,11 @@ BuddyOnAirUrls = module.exports.BuddyOnAirUrls = function(args) { this.hls = null; this.smoothStreaming = null; if (args) { - if (args.hls !== undefined) { - this.hls = args.hls; + if (args.hls !== undefined && args.hls !== null) { + this.hls = Thrift.copyMap(args.hls, [null]); } - if (args.smoothStreaming !== undefined) { - this.smoothStreaming = args.smoothStreaming; + if (args.smoothStreaming !== undefined && args.smoothStreaming !== null) { + this.smoothStreaming = Thrift.copyMap(args.smoothStreaming, [null]); } } }; @@ -2431,32 +2431,32 @@ BuddyOnAir = module.exports.BuddyOnAir = function(args) { this.onAirType = null; this.onAirUrls = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.freshnessLifetime !== undefined) { + if (args.freshnessLifetime !== undefined && args.freshnessLifetime !== null) { this.freshnessLifetime = args.freshnessLifetime; } - if (args.onAirId !== undefined) { + if (args.onAirId !== undefined && args.onAirId !== null) { this.onAirId = args.onAirId; } - if (args.onAir !== undefined) { + if (args.onAir !== undefined && args.onAir !== null) { this.onAir = args.onAir; } - if (args.text !== undefined) { + if (args.text !== undefined && args.text !== null) { this.text = args.text; } - if (args.viewerCount !== undefined) { + if (args.viewerCount !== undefined && args.viewerCount !== null) { this.viewerCount = args.viewerCount; } - if (args.targetCount !== undefined) { + if (args.targetCount !== undefined && args.targetCount !== null) { this.targetCount = args.targetCount; } - if (args.onAirType !== undefined) { + if (args.onAirType !== undefined && args.onAirType !== null) { this.onAirType = args.onAirType; } - if (args.onAirUrls !== undefined) { - this.onAirUrls = args.onAirUrls; + if (args.onAirUrls !== undefined && args.onAirUrls !== null) { + this.onAirUrls = new ttypes.BuddyOnAirUrls(args.onAirUrls); } } }; @@ -2607,22 +2607,22 @@ BuddyProfile = module.exports.BuddyProfile = function(args) { this.statusMessage = null; this.contactCount = null; if (args) { - if (args.buddyId !== undefined) { + if (args.buddyId !== undefined && args.buddyId !== null) { this.buddyId = args.buddyId; } - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.searchId !== undefined) { + if (args.searchId !== undefined && args.searchId !== null) { this.searchId = args.searchId; } - if (args.displayName !== undefined) { + if (args.displayName !== undefined && args.displayName !== null) { this.displayName = args.displayName; } - if (args.statusMessage !== undefined) { + if (args.statusMessage !== undefined && args.statusMessage !== null) { this.statusMessage = args.statusMessage; } - if (args.contactCount !== undefined) { + if (args.contactCount !== undefined && args.contactCount !== null) { this.contactCount = args.contactCount; } } @@ -2737,22 +2737,22 @@ BuddySearchResult = module.exports.BuddySearchResult = function(args) { this.statusMessage = null; this.businessAccount = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.displayName !== undefined) { + if (args.displayName !== undefined && args.displayName !== null) { this.displayName = args.displayName; } - if (args.pictureStatus !== undefined) { + if (args.pictureStatus !== undefined && args.pictureStatus !== null) { this.pictureStatus = args.pictureStatus; } - if (args.picturePath !== undefined) { + if (args.picturePath !== undefined && args.picturePath !== null) { this.picturePath = args.picturePath; } - if (args.statusMessage !== undefined) { + if (args.statusMessage !== undefined && args.statusMessage !== null) { this.statusMessage = args.statusMessage; } - if (args.businessAccount !== undefined) { + if (args.businessAccount !== undefined && args.businessAccount !== null) { this.businessAccount = args.businessAccount; } } @@ -2863,10 +2863,10 @@ ChannelDomain = module.exports.ChannelDomain = function(args) { this.host = null; this.removed = null; if (args) { - if (args.host !== undefined) { + if (args.host !== undefined && args.host !== null) { this.host = args.host; } - if (args.removed !== undefined) { + if (args.removed !== undefined && args.removed !== null) { this.removed = args.removed; } } @@ -2929,10 +2929,10 @@ ChannelDomains = module.exports.ChannelDomains = function(args) { this.channelDomains = null; this.revision = null; if (args) { - if (args.channelDomains !== undefined) { - this.channelDomains = args.channelDomains; + if (args.channelDomains !== undefined && args.channelDomains !== null) { + this.channelDomains = Thrift.copyList(args.channelDomains, [ttypes.ChannelDomain]); } - if (args.revision !== undefined) { + if (args.revision !== undefined && args.revision !== null) { this.revision = args.revision; } } @@ -3021,14 +3021,14 @@ ChannelException = module.exports.ChannelException = function(args) { this.reason = null; this.parameterMap = null; if (args) { - if (args.code !== undefined) { + if (args.code !== undefined && args.code !== null) { this.code = args.code; } - if (args.reason !== undefined) { + if (args.reason !== undefined && args.reason !== null) { this.reason = args.reason; } - if (args.parameterMap !== undefined) { - this.parameterMap = args.parameterMap; + if (args.parameterMap !== undefined && args.parameterMap !== null) { + this.parameterMap = Thrift.copyMap(args.parameterMap, [null]); } } }; @@ -3130,10 +3130,10 @@ ChannelInfos = module.exports.ChannelInfos = function(args) { this.channelInfos = null; this.revision = null; if (args) { - if (args.channelInfos !== undefined) { - this.channelInfos = args.channelInfos; + if (args.channelInfos !== undefined && args.channelInfos !== null) { + this.channelInfos = Thrift.copyList(args.channelInfos, [ttypes.ChannelInfo]); } - if (args.revision !== undefined) { + if (args.revision !== undefined && args.revision !== null) { this.revision = args.revision; } } @@ -3222,19 +3222,19 @@ ChannelNotificationSetting = module.exports.ChannelNotificationSetting = functio this.messageReceivable = null; this.showDefault = null; if (args) { - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.name !== undefined) { + if (args.name !== undefined && args.name !== null) { this.name = args.name; } - if (args.notificationReceivable !== undefined) { + if (args.notificationReceivable !== undefined && args.notificationReceivable !== null) { this.notificationReceivable = args.notificationReceivable; } - if (args.messageReceivable !== undefined) { + if (args.messageReceivable !== undefined && args.messageReceivable !== null) { this.messageReceivable = args.messageReceivable; } - if (args.showDefault !== undefined) { + if (args.showDefault !== undefined && args.showDefault !== null) { this.showDefault = args.showDefault; } } @@ -3335,16 +3335,16 @@ ChannelSyncDatas = module.exports.ChannelSyncDatas = function(args) { this.revision = null; this.expires = null; if (args) { - if (args.channelInfos !== undefined) { - this.channelInfos = args.channelInfos; + if (args.channelInfos !== undefined && args.channelInfos !== null) { + this.channelInfos = Thrift.copyList(args.channelInfos, [ttypes.ChannelInfo]); } - if (args.channelDomains !== undefined) { - this.channelDomains = args.channelDomains; + if (args.channelDomains !== undefined && args.channelDomains !== null) { + this.channelDomains = Thrift.copyList(args.channelDomains, [ttypes.ChannelDomain]); } - if (args.revision !== undefined) { + if (args.revision !== undefined && args.revision !== null) { this.revision = args.revision; } - if (args.expires !== undefined) { + if (args.expires !== undefined && args.expires !== null) { this.expires = args.expires; } } @@ -3480,19 +3480,19 @@ ChannelToken = module.exports.ChannelToken = function(args) { this.refreshToken = null; this.channelAccessToken = null; if (args) { - if (args.token !== undefined) { + if (args.token !== undefined && args.token !== null) { this.token = args.token; } - if (args.obsToken !== undefined) { + if (args.obsToken !== undefined && args.obsToken !== null) { this.obsToken = args.obsToken; } - if (args.expiration !== undefined) { + if (args.expiration !== undefined && args.expiration !== null) { this.expiration = args.expiration; } - if (args.refreshToken !== undefined) { + if (args.refreshToken !== undefined && args.refreshToken !== null) { this.refreshToken = args.refreshToken; } - if (args.channelAccessToken !== undefined) { + if (args.channelAccessToken !== undefined && args.channelAccessToken !== null) { this.channelAccessToken = args.channelAccessToken; } } @@ -3593,16 +3593,16 @@ Coin = module.exports.Coin = function(args) { this.totalCoinBalance = null; this.rewardCoinBalance = null; if (args) { - if (args.freeCoinBalance !== undefined) { + if (args.freeCoinBalance !== undefined && args.freeCoinBalance !== null) { this.freeCoinBalance = args.freeCoinBalance; } - if (args.payedCoinBalance !== undefined) { + if (args.payedCoinBalance !== undefined && args.payedCoinBalance !== null) { this.payedCoinBalance = args.payedCoinBalance; } - if (args.totalCoinBalance !== undefined) { + if (args.totalCoinBalance !== undefined && args.totalCoinBalance !== null) { this.totalCoinBalance = args.totalCoinBalance; } - if (args.rewardCoinBalance !== undefined) { + if (args.rewardCoinBalance !== undefined && args.rewardCoinBalance !== null) { this.rewardCoinBalance = args.rewardCoinBalance; } } @@ -3691,16 +3691,16 @@ CoinPayLoad = module.exports.CoinPayLoad = function(args) { this.type = null; this.rewardCoin = null; if (args) { - if (args.payCoin !== undefined) { + if (args.payCoin !== undefined && args.payCoin !== null) { this.payCoin = args.payCoin; } - if (args.freeCoin !== undefined) { + if (args.freeCoin !== undefined && args.freeCoin !== null) { this.freeCoin = args.freeCoin; } - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.rewardCoin !== undefined) { + if (args.rewardCoin !== undefined && args.rewardCoin !== null) { this.rewardCoin = args.rewardCoin; } } @@ -3797,40 +3797,40 @@ CoinHistory = module.exports.CoinHistory = function(args) { this.payload = null; this.channelId = null; if (args) { - if (args.payDate !== undefined) { + if (args.payDate !== undefined && args.payDate !== null) { this.payDate = args.payDate; } - if (args.coinBalance !== undefined) { + if (args.coinBalance !== undefined && args.coinBalance !== null) { this.coinBalance = args.coinBalance; } - if (args.coin !== undefined) { + if (args.coin !== undefined && args.coin !== null) { this.coin = args.coin; } - if (args.price !== undefined) { + if (args.price !== undefined && args.price !== null) { this.price = args.price; } - if (args.title !== undefined) { + if (args.title !== undefined && args.title !== null) { this.title = args.title; } - if (args.refund !== undefined) { + if (args.refund !== undefined && args.refund !== null) { this.refund = args.refund; } - if (args.paySeq !== undefined) { + if (args.paySeq !== undefined && args.paySeq !== null) { this.paySeq = args.paySeq; } - if (args.currency !== undefined) { + if (args.currency !== undefined && args.currency !== null) { this.currency = args.currency; } - if (args.currencySign !== undefined) { + if (args.currencySign !== undefined && args.currencySign !== null) { this.currencySign = args.currencySign; } - if (args.displayPrice !== undefined) { + if (args.displayPrice !== undefined && args.displayPrice !== null) { this.displayPrice = args.displayPrice; } - if (args.payload !== undefined) { - this.payload = args.payload; + if (args.payload !== undefined && args.payload !== null) { + this.payload = new ttypes.CoinPayLoad(args.payload); } - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } } @@ -4017,19 +4017,19 @@ CoinHistoryCondition = module.exports.CoinHistoryCondition = function(args) { this.eddt = null; this.appStoreCode = null; if (args) { - if (args.start !== undefined) { + if (args.start !== undefined && args.start !== null) { this.start = args.start; } - if (args.size !== undefined) { + if (args.size !== undefined && args.size !== null) { this.size = args.size; } - if (args.language !== undefined) { + if (args.language !== undefined && args.language !== null) { this.language = args.language; } - if (args.eddt !== undefined) { + if (args.eddt !== undefined && args.eddt !== null) { this.eddt = args.eddt; } - if (args.appStoreCode !== undefined) { + if (args.appStoreCode !== undefined && args.appStoreCode !== null) { this.appStoreCode = args.appStoreCode; } } @@ -4129,13 +4129,13 @@ CoinHistoryResult = module.exports.CoinHistoryResult = function(args) { this.balance = null; this.hasNext = null; if (args) { - if (args.historys !== undefined) { - this.historys = args.historys; + if (args.historys !== undefined && args.historys !== null) { + this.historys = Thrift.copyList(args.historys, [ttypes.CoinHistory]); } - if (args.balance !== undefined) { - this.balance = args.balance; + if (args.balance !== undefined && args.balance !== null) { + this.balance = new ttypes.Coin(args.balance); } - if (args.hasNext !== undefined) { + if (args.hasNext !== undefined && args.hasNext !== null) { this.hasNext = args.hasNext; } } @@ -4240,28 +4240,28 @@ CoinProductItem = module.exports.CoinProductItem = function(args) { this.name = null; this.desc = null; if (args) { - if (args.itemId !== undefined) { + if (args.itemId !== undefined && args.itemId !== null) { this.itemId = args.itemId; } - if (args.coin !== undefined) { + if (args.coin !== undefined && args.coin !== null) { this.coin = args.coin; } - if (args.freeCoin !== undefined) { + if (args.freeCoin !== undefined && args.freeCoin !== null) { this.freeCoin = args.freeCoin; } - if (args.currency !== undefined) { + if (args.currency !== undefined && args.currency !== null) { this.currency = args.currency; } - if (args.price !== undefined) { + if (args.price !== undefined && args.price !== null) { this.price = args.price; } - if (args.displayPrice !== undefined) { + if (args.displayPrice !== undefined && args.displayPrice !== null) { this.displayPrice = args.displayPrice; } - if (args.name !== undefined) { + if (args.name !== undefined && args.name !== null) { this.name = args.name; } - if (args.desc !== undefined) { + if (args.desc !== undefined && args.desc !== null) { this.desc = args.desc; } } @@ -4401,25 +4401,25 @@ CoinPurchaseConfirm = module.exports.CoinPurchaseConfirm = function(args) { this.requestType = null; this.ignoreReceipt = null; if (args) { - if (args.orderId !== undefined) { + if (args.orderId !== undefined && args.orderId !== null) { this.orderId = args.orderId; } - if (args.appStoreCode !== undefined) { + if (args.appStoreCode !== undefined && args.appStoreCode !== null) { this.appStoreCode = args.appStoreCode; } - if (args.receipt !== undefined) { + if (args.receipt !== undefined && args.receipt !== null) { this.receipt = args.receipt; } - if (args.signature !== undefined) { + if (args.signature !== undefined && args.signature !== null) { this.signature = args.signature; } - if (args.seller !== undefined) { + if (args.seller !== undefined && args.seller !== null) { this.seller = args.seller; } - if (args.requestType !== undefined) { + if (args.requestType !== undefined && args.requestType !== null) { this.requestType = args.requestType; } - if (args.ignoreReceipt !== undefined) { + if (args.ignoreReceipt !== undefined && args.ignoreReceipt !== null) { this.ignoreReceipt = args.ignoreReceipt; } } @@ -4548,28 +4548,28 @@ CoinPurchaseReservation = module.exports.CoinPurchaseReservation = function(args this.pgCode = null; this.redirectUrl = null; if (args) { - if (args.productId !== undefined) { + if (args.productId !== undefined && args.productId !== null) { this.productId = args.productId; } - if (args.country !== undefined) { + if (args.country !== undefined && args.country !== null) { this.country = args.country; } - if (args.currency !== undefined) { + if (args.currency !== undefined && args.currency !== null) { this.currency = args.currency; } - if (args.price !== undefined) { + if (args.price !== undefined && args.price !== null) { this.price = args.price; } - if (args.appStoreCode !== undefined) { + if (args.appStoreCode !== undefined && args.appStoreCode !== null) { this.appStoreCode = args.appStoreCode; } - if (args.language !== undefined) { + if (args.language !== undefined && args.language !== null) { this.language = args.language; } - if (args.pgCode !== undefined) { + if (args.pgCode !== undefined && args.pgCode !== null) { this.pgCode = args.pgCode; } - if (args.redirectUrl !== undefined) { + if (args.redirectUrl !== undefined && args.redirectUrl !== null) { this.redirectUrl = args.redirectUrl; } } @@ -4705,13 +4705,13 @@ CoinUseReservationItem = module.exports.CoinUseReservationItem = function(args) this.itemName = null; this.amount = null; if (args) { - if (args.itemId !== undefined) { + if (args.itemId !== undefined && args.itemId !== null) { this.itemId = args.itemId; } - if (args.itemName !== undefined) { + if (args.itemName !== undefined && args.itemName !== null) { this.itemName = args.itemName; } - if (args.amount !== undefined) { + if (args.amount !== undefined && args.amount !== null) { this.amount = args.amount; } } @@ -4789,19 +4789,19 @@ CoinUseReservation = module.exports.CoinUseReservation = function(args) { this.items = null; this.country = null; if (args) { - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.shopOrderId !== undefined) { + if (args.shopOrderId !== undefined && args.shopOrderId !== null) { this.shopOrderId = args.shopOrderId; } - if (args.appStoreCode !== undefined) { + if (args.appStoreCode !== undefined && args.appStoreCode !== null) { this.appStoreCode = args.appStoreCode; } - if (args.items !== undefined) { - this.items = args.items; + if (args.items !== undefined && args.items !== null) { + this.items = Thrift.copyList(args.items, [ttypes.CoinUseReservationItem]); } - if (args.country !== undefined) { + if (args.country !== undefined && args.country !== null) { this.country = args.country; } } @@ -4927,22 +4927,22 @@ CompactContact = module.exports.CompactContact = function(args) { this.settings = null; this.displayNameOverridden = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.modifiedTime !== undefined) { + if (args.modifiedTime !== undefined && args.modifiedTime !== null) { this.modifiedTime = args.modifiedTime; } - if (args.status !== undefined) { + if (args.status !== undefined && args.status !== null) { this.status = args.status; } - if (args.settings !== undefined) { + if (args.settings !== undefined && args.settings !== null) { this.settings = args.settings; } - if (args.displayNameOverridden !== undefined) { + if (args.displayNameOverridden !== undefined && args.displayNameOverridden !== null) { this.displayNameOverridden = args.displayNameOverridden; } } @@ -5056,20 +5056,20 @@ ContactModification = module.exports.ContactModification = function(args) { this.emails = null; this.userids = null; if (args) { - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.luid !== undefined) { + if (args.luid !== undefined && args.luid !== null) { this.luid = args.luid; } - if (args.phones !== undefined) { - this.phones = args.phones; + if (args.phones !== undefined && args.phones !== null) { + this.phones = Thrift.copyList(args.phones, [null]); } - if (args.emails !== undefined) { - this.emails = args.emails; + if (args.emails !== undefined && args.emails !== null) { + this.emails = Thrift.copyList(args.emails, [null]); } - if (args.userids !== undefined) { - this.userids = args.userids; + if (args.userids !== undefined && args.userids !== null) { + this.userids = Thrift.copyList(args.userids, [null]); } } }; @@ -5235,16 +5235,16 @@ ContactRegistration = module.exports.ContactRegistration = function(args) { this.contactType = null; this.contactKey = null; if (args) { - if (args.contact !== undefined) { - this.contact = args.contact; + if (args.contact !== undefined && args.contact !== null) { + this.contact = new ttypes.Contact(args.contact); } - if (args.luid !== undefined) { + if (args.luid !== undefined && args.luid !== null) { this.luid = args.luid; } - if (args.contactType !== undefined) { + if (args.contactType !== undefined && args.contactType !== null) { this.contactType = args.contactType; } - if (args.contactKey !== undefined) { + if (args.contactKey !== undefined && args.contactKey !== null) { this.contactKey = args.contactKey; } } @@ -5333,14 +5333,14 @@ ContactReport = module.exports.ContactReport = function(args) { this.exists = null; this.contact = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.exists !== undefined) { + if (args.exists !== undefined && args.exists !== null) { this.exists = args.exists; } - if (args.contact !== undefined) { - this.contact = args.contact; + if (args.contact !== undefined && args.contact !== null) { + this.contact = new ttypes.Contact(args.contact); } } }; @@ -5415,10 +5415,10 @@ ContactReportResult = module.exports.ContactReportResult = function(args) { this.mid = null; this.exists = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.exists !== undefined) { + if (args.exists !== undefined && args.exists !== null) { this.exists = args.exists; } } @@ -5486,25 +5486,25 @@ DeviceInfo = module.exports.DeviceInfo = function(args) { this.carrierName = null; this.applicationType = null; if (args) { - if (args.deviceName !== undefined) { + if (args.deviceName !== undefined && args.deviceName !== null) { this.deviceName = args.deviceName; } - if (args.systemName !== undefined) { + if (args.systemName !== undefined && args.systemName !== null) { this.systemName = args.systemName; } - if (args.systemVersion !== undefined) { + if (args.systemVersion !== undefined && args.systemVersion !== null) { this.systemVersion = args.systemVersion; } - if (args.model !== undefined) { + if (args.model !== undefined && args.model !== null) { this.model = args.model; } - if (args.carrierCode !== undefined) { + if (args.carrierCode !== undefined && args.carrierCode !== null) { this.carrierCode = args.carrierCode; } - if (args.carrierName !== undefined) { + if (args.carrierName !== undefined && args.carrierName !== null) { this.carrierName = args.carrierName; } - if (args.applicationType !== undefined) { + if (args.applicationType !== undefined && args.applicationType !== null) { this.applicationType = args.applicationType; } } @@ -5629,16 +5629,16 @@ EmailConfirmation = module.exports.EmailConfirmation = function(args) { this.password = null; this.ignoreDuplication = null; if (args) { - if (args.usePasswordSet !== undefined) { + if (args.usePasswordSet !== undefined && args.usePasswordSet !== null) { this.usePasswordSet = args.usePasswordSet; } - if (args.email !== undefined) { + if (args.email !== undefined && args.email !== null) { this.email = args.email; } - if (args.password !== undefined) { + if (args.password !== undefined && args.password !== null) { this.password = args.password; } - if (args.ignoreDuplication !== undefined) { + if (args.ignoreDuplication !== undefined && args.ignoreDuplication !== null) { this.ignoreDuplication = args.ignoreDuplication; } } @@ -5726,13 +5726,13 @@ EmailConfirmationSession = module.exports.EmailConfirmationSession = function(ar this.verifier = null; this.targetEmail = null; if (args) { - if (args.emailConfirmationType !== undefined) { + if (args.emailConfirmationType !== undefined && args.emailConfirmationType !== null) { this.emailConfirmationType = args.emailConfirmationType; } - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } - if (args.targetEmail !== undefined) { + if (args.targetEmail !== undefined && args.targetEmail !== null) { this.targetEmail = args.targetEmail; } } @@ -5808,13 +5808,13 @@ FriendChannelMatrix = module.exports.FriendChannelMatrix = function(args) { this.representMid = null; this.count = null; if (args) { - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.representMid !== undefined) { + if (args.representMid !== undefined && args.representMid !== null) { this.representMid = args.representMid; } - if (args.count !== undefined) { + if (args.count !== undefined && args.count !== null) { this.count = args.count; } } @@ -5889,11 +5889,11 @@ FriendChannelMatricesResponse = module.exports.FriendChannelMatricesResponse = f this.expires = null; this.matrices = null; if (args) { - if (args.expires !== undefined) { + if (args.expires !== undefined && args.expires !== null) { this.expires = args.expires; } - if (args.matrices !== undefined) { - this.matrices = args.matrices; + if (args.matrices !== undefined && args.matrices !== null) { + this.matrices = Thrift.copyList(args.matrices, [ttypes.FriendChannelMatrix]); } } }; @@ -5978,10 +5978,10 @@ Geolocation = module.exports.Geolocation = function(args) { this.longitude = null; this.latitude = null; if (args) { - if (args.longitude !== undefined) { + if (args.longitude !== undefined && args.longitude !== null) { this.longitude = args.longitude; } - if (args.latitude !== undefined) { + if (args.latitude !== undefined && args.latitude !== null) { this.latitude = args.latitude; } } @@ -6045,13 +6045,13 @@ NotificationTarget = module.exports.NotificationTarget = function(args) { this.applicationVersion = null; this.region = null; if (args) { - if (args.applicationType !== undefined) { + if (args.applicationType !== undefined && args.applicationType !== null) { this.applicationType = args.applicationType; } - if (args.applicationVersion !== undefined) { + if (args.applicationVersion !== undefined && args.applicationVersion !== null) { this.applicationVersion = args.applicationVersion; } - if (args.region !== undefined) { + if (args.region !== undefined && args.region !== null) { this.region = args.region; } } @@ -6129,19 +6129,19 @@ GlobalEvent = module.exports.GlobalEvent = function(args) { this.data = null; this.maxDelay = null; if (args) { - if (args.key !== undefined) { + if (args.key !== undefined && args.key !== null) { this.key = args.key; } - if (args.targets !== undefined) { - this.targets = args.targets; + if (args.targets !== undefined && args.targets !== null) { + this.targets = Thrift.copyList(args.targets, [ttypes.NotificationTarget]); } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.data !== undefined) { + if (args.data !== undefined && args.data !== null) { this.data = args.data; } - if (args.maxDelay !== undefined) { + if (args.maxDelay !== undefined && args.maxDelay !== null) { this.maxDelay = args.maxDelay; } } @@ -6264,33 +6264,37 @@ Group = module.exports.Group = function(args) { this.createdTime = null; this.name = null; this.pictureStatus = null; + this.preventJoinByTicket = null; this.members = null; this.creator = null; this.invitee = null; this.notificationDisabled = null; if (args) { - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.name !== undefined) { + if (args.name !== undefined && args.name !== null) { this.name = args.name; } - if (args.pictureStatus !== undefined) { + if (args.pictureStatus !== undefined && args.pictureStatus !== null) { this.pictureStatus = args.pictureStatus; } - if (args.members !== undefined) { - this.members = args.members; + if (args.preventJoinByTicket !== undefined && args.preventJoinByTicket !== null) { + this.preventJoinByTicket = args.preventJoinByTicket; } - if (args.creator !== undefined) { - this.creator = args.creator; + if (args.members !== undefined && args.members !== null) { + this.members = Thrift.copyList(args.members, [ttypes.Contact]); } - if (args.invitee !== undefined) { - this.invitee = args.invitee; + if (args.creator !== undefined && args.creator !== null) { + this.creator = new ttypes.Contact(args.creator); } - if (args.notificationDisabled !== undefined) { + if (args.invitee !== undefined && args.invitee !== null) { + this.invitee = Thrift.copyList(args.invitee, [ttypes.Contact]); + } + if (args.notificationDisabled !== undefined && args.notificationDisabled !== null) { this.notificationDisabled = args.notificationDisabled; } } @@ -6337,6 +6341,13 @@ Group.prototype.read = function(input) { input.skip(ftype); } break; + case 12: + if (ftype == Thrift.Type.BOOL) { + this.preventJoinByTicket = input.readBool(); + } else { + input.skip(ftype); + } + break; case 20: if (ftype == Thrift.Type.LIST) { var _size168 = 0; @@ -6425,6 +6436,11 @@ Group.prototype.write = function(output) { output.writeString(this.pictureStatus); output.writeFieldEnd(); } + if (this.preventJoinByTicket !== null && this.preventJoinByTicket !== undefined) { + output.writeFieldBegin('preventJoinByTicket', Thrift.Type.BOOL, 12); + output.writeBool(this.preventJoinByTicket); + output.writeFieldEnd(); + } if (this.members !== null && this.members !== undefined) { output.writeFieldBegin('members', Thrift.Type.LIST, 20); output.writeListBegin(Thrift.Type.STRUCT, this.members.length); @@ -6473,13 +6489,13 @@ IdentityCredential = module.exports.IdentityCredential = function(args) { this.identifier = null; this.password = null; if (args) { - if (args.provider !== undefined) { + if (args.provider !== undefined && args.provider !== null) { this.provider = args.provider; } - if (args.identifier !== undefined) { + if (args.identifier !== undefined && args.identifier !== null) { this.identifier = args.identifier; } - if (args.password !== undefined) { + if (args.password !== undefined && args.password !== null) { this.password = args.password; } } @@ -6554,10 +6570,10 @@ LastReadMessageId = module.exports.LastReadMessageId = function(args) { this.mid = null; this.lastReadMessageId = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.lastReadMessageId !== undefined) { + if (args.lastReadMessageId !== undefined && args.lastReadMessageId !== null) { this.lastReadMessageId = args.lastReadMessageId; } } @@ -6620,11 +6636,11 @@ LastReadMessageIds = module.exports.LastReadMessageIds = function(args) { this.chatId = null; this.lastReadMessageIds = null; if (args) { - if (args.chatId !== undefined) { + if (args.chatId !== undefined && args.chatId !== null) { this.chatId = args.chatId; } - if (args.lastReadMessageIds !== undefined) { - this.lastReadMessageIds = args.lastReadMessageIds; + if (args.lastReadMessageIds !== undefined && args.lastReadMessageIds !== null) { + this.lastReadMessageIds = Thrift.copyList(args.lastReadMessageIds, [ttypes.LastReadMessageId]); } } }; @@ -6712,19 +6728,19 @@ LoginResult = module.exports.LoginResult = function(args) { this.pinCode = null; this.type = null; if (args) { - if (args.authToken !== undefined) { + if (args.authToken !== undefined && args.authToken !== null) { this.authToken = args.authToken; } - if (args.certificate !== undefined) { + if (args.certificate !== undefined && args.certificate !== null) { this.certificate = args.certificate; } - if (args.verifier !== undefined) { + if (args.verifier !== undefined && args.verifier !== null) { this.verifier = args.verifier; } - if (args.pinCode !== undefined) { + if (args.pinCode !== undefined && args.pinCode !== null) { this.pinCode = args.pinCode; } - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } } @@ -6826,19 +6842,19 @@ LoginSession = module.exports.LoginSession = function(args) { this.systemName = null; this.accessLocation = null; if (args) { - if (args.tokenKey !== undefined) { + if (args.tokenKey !== undefined && args.tokenKey !== null) { this.tokenKey = args.tokenKey; } - if (args.expirationTime !== undefined) { + if (args.expirationTime !== undefined && args.expirationTime !== null) { this.expirationTime = args.expirationTime; } - if (args.applicationType !== undefined) { + if (args.applicationType !== undefined && args.applicationType !== null) { this.applicationType = args.applicationType; } - if (args.systemName !== undefined) { + if (args.systemName !== undefined && args.systemName !== null) { this.systemName = args.systemName; } - if (args.accessLocation !== undefined) { + if (args.accessLocation !== undefined && args.accessLocation !== null) { this.accessLocation = args.accessLocation; } } @@ -6934,7 +6950,7 @@ LoginSession.prototype.write = function(output) { }; Message = module.exports.Message = function(args) { - this.from = null; + this.from_ = null; this.to = null; this.toType = null; this.id = null; @@ -6947,41 +6963,41 @@ Message = module.exports.Message = function(args) { this.contentPreview = null; this.contentMetadata = null; if (args) { - if (args.from !== undefined) { - this.from = args.from; + if (args.from_ !== undefined && args.from_ !== null) { + this.from_ = args.from_; } - if (args.to !== undefined) { + if (args.to !== undefined && args.to !== null) { this.to = args.to; } - if (args.toType !== undefined) { + if (args.toType !== undefined && args.toType !== null) { this.toType = args.toType; } - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.deliveredTime !== undefined) { + if (args.deliveredTime !== undefined && args.deliveredTime !== null) { this.deliveredTime = args.deliveredTime; } - if (args.text !== undefined) { + if (args.text !== undefined && args.text !== null) { this.text = args.text; } - if (args.location !== undefined) { - this.location = args.location; + if (args.location !== undefined && args.location !== null) { + this.location = new ttypes.Location(args.location); } - if (args.hasContent !== undefined) { + if (args.hasContent !== undefined && args.hasContent !== null) { this.hasContent = args.hasContent; } - if (args.contentType !== undefined) { + if (args.contentType !== undefined && args.contentType !== null) { this.contentType = args.contentType; } - if (args.contentPreview !== undefined) { + if (args.contentPreview !== undefined && args.contentPreview !== null) { this.contentPreview = args.contentPreview; } - if (args.contentMetadata !== undefined) { - this.contentMetadata = args.contentMetadata; + if (args.contentMetadata !== undefined && args.contentMetadata !== null) { + this.contentMetadata = Thrift.copyMap(args.contentMetadata, [null]); } } }; @@ -7001,7 +7017,7 @@ Message.prototype.read = function(input) { { case 1: if (ftype == Thrift.Type.STRING) { - this.from = input.readString(); + this.from_ = input.readString(); } else { input.skip(ftype); } @@ -7112,9 +7128,9 @@ Message.prototype.read = function(input) { Message.prototype.write = function(output) { output.writeStructBegin('Message'); - if (this.from !== null && this.from !== undefined) { - output.writeFieldBegin('from', Thrift.Type.STRING, 1); - output.writeString(this.from); + if (this.from_ !== null && this.from_ !== undefined) { + output.writeFieldBegin('from_', Thrift.Type.STRING, 1); + output.writeString(this.from_); output.writeFieldEnd(); } if (this.to !== null && this.to !== undefined) { @@ -7198,32 +7214,32 @@ MessageOperation = module.exports.MessageOperation = function(args) { this.param3 = null; this.message = null; if (args) { - if (args.revision !== undefined) { + if (args.revision !== undefined && args.revision !== null) { this.revision = args.revision; } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.status !== undefined) { + if (args.status !== undefined && args.status !== null) { this.status = args.status; } - if (args.param1 !== undefined) { + if (args.param1 !== undefined && args.param1 !== null) { this.param1 = args.param1; } - if (args.param2 !== undefined) { + if (args.param2 !== undefined && args.param2 !== null) { this.param2 = args.param2; } - if (args.param3 !== undefined) { + if (args.param3 !== undefined && args.param3 !== null) { this.param3 = args.param3; } - if (args.message !== undefined) { - this.message = args.message; + if (args.message !== undefined && args.message !== null) { + this.message = new ttypes.Message(args.message); } } }; @@ -7370,10 +7386,10 @@ MessageOperations = module.exports.MessageOperations = function(args) { this.operations = null; this.endFlag = null; if (args) { - if (args.operations !== undefined) { - this.operations = args.operations; + if (args.operations !== undefined && args.operations !== null) { + this.operations = Thrift.copyList(args.operations, [ttypes.MessageOperation]); } - if (args.endFlag !== undefined) { + if (args.endFlag !== undefined && args.endFlag !== null) { this.endFlag = args.endFlag; } } @@ -7460,14 +7476,14 @@ MetaProfile = module.exports.MetaProfile = function(args) { this.regionCode = null; this.identities = null; if (args) { - if (args.createTime !== undefined) { + if (args.createTime !== undefined && args.createTime !== null) { this.createTime = args.createTime; } - if (args.regionCode !== undefined) { + if (args.regionCode !== undefined && args.regionCode !== null) { this.regionCode = args.regionCode; } - if (args.identities !== undefined) { - this.identities = args.identities; + if (args.identities !== undefined && args.identities !== null) { + this.identities = Thrift.copyMap(args.identities, [null]); } } }; @@ -7566,7 +7582,7 @@ MetaProfile.prototype.write = function(output) { NotificationItem = module.exports.NotificationItem = function(args) { this.id = null; - this.from = null; + this.from_ = null; this.to = null; this.fromChannel = null; this.toChannel = null; @@ -7574,29 +7590,29 @@ NotificationItem = module.exports.NotificationItem = function(args) { this.createdTime = null; this.content = null; if (args) { - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } - if (args.from !== undefined) { - this.from = args.from; + if (args.from_ !== undefined && args.from_ !== null) { + this.from_ = args.from_; } - if (args.to !== undefined) { + if (args.to !== undefined && args.to !== null) { this.to = args.to; } - if (args.fromChannel !== undefined) { + if (args.fromChannel !== undefined && args.fromChannel !== null) { this.fromChannel = args.fromChannel; } - if (args.toChannel !== undefined) { + if (args.toChannel !== undefined && args.toChannel !== null) { this.toChannel = args.toChannel; } - if (args.revision !== undefined) { + if (args.revision !== undefined && args.revision !== null) { this.revision = args.revision; } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.content !== undefined) { - this.content = args.content; + if (args.content !== undefined && args.content !== null) { + this.content = Thrift.copyMap(args.content, [null]); } } }; @@ -7623,7 +7639,7 @@ NotificationItem.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.STRING) { - this.from = input.readString(); + this.from_ = input.readString(); } else { input.skip(ftype); } @@ -7703,9 +7719,9 @@ NotificationItem.prototype.write = function(output) { output.writeString(this.id); output.writeFieldEnd(); } - if (this.from !== null && this.from !== undefined) { - output.writeFieldBegin('from', Thrift.Type.STRING, 2); - output.writeString(this.from); + if (this.from_ !== null && this.from_ !== undefined) { + output.writeFieldBegin('from_', Thrift.Type.STRING, 2); + output.writeString(this.from_); output.writeFieldEnd(); } if (this.to !== null && this.to !== undefined) { @@ -7757,11 +7773,11 @@ NotificationFetchResult = module.exports.NotificationFetchResult = function(args this.fetchMode = null; this.itemList = null; if (args) { - if (args.fetchMode !== undefined) { + if (args.fetchMode !== undefined && args.fetchMode !== null) { this.fetchMode = args.fetchMode; } - if (args.itemList !== undefined) { - this.itemList = args.itemList; + if (args.itemList !== undefined && args.itemList !== null) { + this.itemList = Thrift.copyList(args.itemList, [ttypes.NotificationItem]); } } }; @@ -7854,35 +7870,35 @@ Operation = module.exports.Operation = function(args) { this.param3 = null; this.message = null; if (args) { - if (args.revision !== undefined) { + if (args.revision !== undefined && args.revision !== null) { this.revision = args.revision; } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.reqSeq !== undefined) { + if (args.reqSeq !== undefined && args.reqSeq !== null) { this.reqSeq = args.reqSeq; } - if (args.checksum !== undefined) { + if (args.checksum !== undefined && args.checksum !== null) { this.checksum = args.checksum; } - if (args.status !== undefined) { + if (args.status !== undefined && args.status !== null) { this.status = args.status; } - if (args.param1 !== undefined) { + if (args.param1 !== undefined && args.param1 !== null) { this.param1 = args.param1; } - if (args.param2 !== undefined) { + if (args.param2 !== undefined && args.param2 !== null) { this.param2 = args.param2; } - if (args.param3 !== undefined) { + if (args.param3 !== undefined && args.param3 !== null) { this.param3 = args.param3; } - if (args.message !== undefined) { - this.message = args.message; + if (args.message !== undefined && args.message !== null) { + this.message = new ttypes.Message(args.message); } } }; @@ -8049,34 +8065,34 @@ PaymentReservation = module.exports.PaymentReservation = function(args) { this.messageTemplate = null; this.packageId = null; if (args) { - if (args.receiverMid !== undefined) { + if (args.receiverMid !== undefined && args.receiverMid !== null) { this.receiverMid = args.receiverMid; } - if (args.productId !== undefined) { + if (args.productId !== undefined && args.productId !== null) { this.productId = args.productId; } - if (args.language !== undefined) { + if (args.language !== undefined && args.language !== null) { this.language = args.language; } - if (args.location !== undefined) { + if (args.location !== undefined && args.location !== null) { this.location = args.location; } - if (args.currency !== undefined) { + if (args.currency !== undefined && args.currency !== null) { this.currency = args.currency; } - if (args.price !== undefined) { + if (args.price !== undefined && args.price !== null) { this.price = args.price; } - if (args.appStoreCode !== undefined) { + if (args.appStoreCode !== undefined && args.appStoreCode !== null) { this.appStoreCode = args.appStoreCode; } - if (args.messageText !== undefined) { + if (args.messageText !== undefined && args.messageText !== null) { this.messageText = args.messageText; } - if (args.messageTemplate !== undefined) { + if (args.messageTemplate !== undefined && args.messageTemplate !== null) { this.messageTemplate = args.messageTemplate; } - if (args.packageId !== undefined) { + if (args.packageId !== undefined && args.packageId !== null) { this.packageId = args.packageId; } } @@ -8236,14 +8252,14 @@ PaymentReservationResult = module.exports.PaymentReservationResult = function(ar this.confirmUrl = null; this.extras = null; if (args) { - if (args.orderId !== undefined) { + if (args.orderId !== undefined && args.orderId !== null) { this.orderId = args.orderId; } - if (args.confirmUrl !== undefined) { + if (args.confirmUrl !== undefined && args.confirmUrl !== null) { this.confirmUrl = args.confirmUrl; } - if (args.extras !== undefined) { - this.extras = args.extras; + if (args.extras !== undefined && args.extras !== null) { + this.extras = Thrift.copyMap(args.extras, [null]); } } }; @@ -8370,88 +8386,88 @@ Product = module.exports.Product = function(args) { this.newFlag = null; this.missionFlag = null; if (args) { - if (args.productId !== undefined) { + if (args.productId !== undefined && args.productId !== null) { this.productId = args.productId; } - if (args.packageId !== undefined) { + if (args.packageId !== undefined && args.packageId !== null) { this.packageId = args.packageId; } - if (args.version !== undefined) { + if (args.version !== undefined && args.version !== null) { this.version = args.version; } - if (args.authorName !== undefined) { + if (args.authorName !== undefined && args.authorName !== null) { this.authorName = args.authorName; } - if (args.onSale !== undefined) { + if (args.onSale !== undefined && args.onSale !== null) { this.onSale = args.onSale; } - if (args.validDays !== undefined) { + if (args.validDays !== undefined && args.validDays !== null) { this.validDays = args.validDays; } - if (args.saleType !== undefined) { + if (args.saleType !== undefined && args.saleType !== null) { this.saleType = args.saleType; } - if (args.copyright !== undefined) { + if (args.copyright !== undefined && args.copyright !== null) { this.copyright = args.copyright; } - if (args.title !== undefined) { + if (args.title !== undefined && args.title !== null) { this.title = args.title; } - if (args.descriptionText !== undefined) { + if (args.descriptionText !== undefined && args.descriptionText !== null) { this.descriptionText = args.descriptionText; } - if (args.shopOrderId !== undefined) { + if (args.shopOrderId !== undefined && args.shopOrderId !== null) { this.shopOrderId = args.shopOrderId; } - if (args.fromMid !== undefined) { + if (args.fromMid !== undefined && args.fromMid !== null) { this.fromMid = args.fromMid; } - if (args.toMid !== undefined) { + if (args.toMid !== undefined && args.toMid !== null) { this.toMid = args.toMid; } - if (args.validUntil !== undefined) { + if (args.validUntil !== undefined && args.validUntil !== null) { this.validUntil = args.validUntil; } - if (args.priceTier !== undefined) { + if (args.priceTier !== undefined && args.priceTier !== null) { this.priceTier = args.priceTier; } - if (args.price !== undefined) { + if (args.price !== undefined && args.price !== null) { this.price = args.price; } - if (args.currency !== undefined) { + if (args.currency !== undefined && args.currency !== null) { this.currency = args.currency; } - if (args.currencySymbol !== undefined) { + if (args.currencySymbol !== undefined && args.currencySymbol !== null) { this.currencySymbol = args.currencySymbol; } - if (args.paymentType !== undefined) { + if (args.paymentType !== undefined && args.paymentType !== null) { this.paymentType = args.paymentType; } - if (args.createDate !== undefined) { + if (args.createDate !== undefined && args.createDate !== null) { this.createDate = args.createDate; } - if (args.ownFlag !== undefined) { + if (args.ownFlag !== undefined && args.ownFlag !== null) { this.ownFlag = args.ownFlag; } - if (args.eventType !== undefined) { + if (args.eventType !== undefined && args.eventType !== null) { this.eventType = args.eventType; } - if (args.urlSchema !== undefined) { + if (args.urlSchema !== undefined && args.urlSchema !== null) { this.urlSchema = args.urlSchema; } - if (args.downloadUrl !== undefined) { + if (args.downloadUrl !== undefined && args.downloadUrl !== null) { this.downloadUrl = args.downloadUrl; } - if (args.buddyMid !== undefined) { + if (args.buddyMid !== undefined && args.buddyMid !== null) { this.buddyMid = args.buddyMid; } - if (args.publishSince !== undefined) { + if (args.publishSince !== undefined && args.publishSince !== null) { this.publishSince = args.publishSince; } - if (args.newFlag !== undefined) { + if (args.newFlag !== undefined && args.newFlag !== null) { this.newFlag = args.newFlag; } - if (args.missionFlag !== undefined) { + if (args.missionFlag !== undefined && args.missionFlag !== null) { this.missionFlag = args.missionFlag; } } @@ -8830,22 +8846,22 @@ ProductList = module.exports.ProductList = function(args) { this.productList = null; this.bannerLang = null; if (args) { - if (args.hasNext !== undefined) { + if (args.hasNext !== undefined && args.hasNext !== null) { this.hasNext = args.hasNext; } - if (args.bannerSequence !== undefined) { + if (args.bannerSequence !== undefined && args.bannerSequence !== null) { this.bannerSequence = args.bannerSequence; } - if (args.bannerTargetType !== undefined) { + if (args.bannerTargetType !== undefined && args.bannerTargetType !== null) { this.bannerTargetType = args.bannerTargetType; } - if (args.bannerTargetPath !== undefined) { + if (args.bannerTargetPath !== undefined && args.bannerTargetPath !== null) { this.bannerTargetPath = args.bannerTargetPath; } - if (args.productList !== undefined) { - this.productList = args.productList; + if (args.productList !== undefined && args.productList !== null) { + this.productList = Thrift.copyList(args.productList, [ttypes.Product]); } - if (args.bannerLang !== undefined) { + if (args.bannerLang !== undefined && args.bannerLang !== null) { this.bannerLang = args.bannerLang; } } @@ -8982,19 +8998,19 @@ ProductSimple = module.exports.ProductSimple = function(args) { this.onSale = null; this.validUntil = null; if (args) { - if (args.productId !== undefined) { + if (args.productId !== undefined && args.productId !== null) { this.productId = args.productId; } - if (args.packageId !== undefined) { + if (args.packageId !== undefined && args.packageId !== null) { this.packageId = args.packageId; } - if (args.version !== undefined) { + if (args.version !== undefined && args.version !== null) { this.version = args.version; } - if (args.onSale !== undefined) { + if (args.onSale !== undefined && args.onSale !== null) { this.onSale = args.onSale; } - if (args.validUntil !== undefined) { + if (args.validUntil !== undefined && args.validUntil !== null) { this.validUntil = args.validUntil; } } @@ -9097,22 +9113,22 @@ ProductSimpleList = module.exports.ProductSimpleList = function(args) { this.recentNewReleaseDate = null; this.recentEventReleaseDate = null; if (args) { - if (args.hasNext !== undefined) { + if (args.hasNext !== undefined && args.hasNext !== null) { this.hasNext = args.hasNext; } - if (args.reinvokeHour !== undefined) { + if (args.reinvokeHour !== undefined && args.reinvokeHour !== null) { this.reinvokeHour = args.reinvokeHour; } - if (args.lastVersionSeq !== undefined) { + if (args.lastVersionSeq !== undefined && args.lastVersionSeq !== null) { this.lastVersionSeq = args.lastVersionSeq; } - if (args.productList !== undefined) { - this.productList = args.productList; + if (args.productList !== undefined && args.productList !== null) { + this.productList = Thrift.copyList(args.productList, [ttypes.ProductSimple]); } - if (args.recentNewReleaseDate !== undefined) { + if (args.recentNewReleaseDate !== undefined && args.recentNewReleaseDate !== null) { this.recentNewReleaseDate = args.recentNewReleaseDate; } - if (args.recentEventReleaseDate !== undefined) { + if (args.recentEventReleaseDate !== undefined && args.recentEventReleaseDate !== null) { this.recentEventReleaseDate = args.recentEventReleaseDate; } } @@ -9257,43 +9273,43 @@ Profile = module.exports.Profile = function(args) { this.allowSearchByEmail = null; this.picturePath = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.userid !== undefined) { + if (args.userid !== undefined && args.userid !== null) { this.userid = args.userid; } - if (args.phone !== undefined) { + if (args.phone !== undefined && args.phone !== null) { this.phone = args.phone; } - if (args.email !== undefined) { + if (args.email !== undefined && args.email !== null) { this.email = args.email; } - if (args.regionCode !== undefined) { + if (args.regionCode !== undefined && args.regionCode !== null) { this.regionCode = args.regionCode; } - if (args.displayName !== undefined) { + if (args.displayName !== undefined && args.displayName !== null) { this.displayName = args.displayName; } - if (args.phoneticName !== undefined) { + if (args.phoneticName !== undefined && args.phoneticName !== null) { this.phoneticName = args.phoneticName; } - if (args.pictureStatus !== undefined) { + if (args.pictureStatus !== undefined && args.pictureStatus !== null) { this.pictureStatus = args.pictureStatus; } - if (args.thumbnailUrl !== undefined) { + if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { this.thumbnailUrl = args.thumbnailUrl; } - if (args.statusMessage !== undefined) { + if (args.statusMessage !== undefined && args.statusMessage !== null) { this.statusMessage = args.statusMessage; } - if (args.allowSearchByUserid !== undefined) { + if (args.allowSearchByUserid !== undefined && args.allowSearchByUserid !== null) { this.allowSearchByUserid = args.allowSearchByUserid; } - if (args.allowSearchByEmail !== undefined) { + if (args.allowSearchByEmail !== undefined && args.allowSearchByEmail !== null) { this.allowSearchByEmail = args.allowSearchByEmail; } - if (args.picturePath !== undefined) { + if (args.picturePath !== undefined && args.picturePath !== null) { this.picturePath = args.picturePath; } } @@ -9488,11 +9504,11 @@ ProximityMatchCandidateResult = module.exports.ProximityMatchCandidateResult = f this.users = null; this.buddies = null; if (args) { - if (args.users !== undefined) { - this.users = args.users; + if (args.users !== undefined && args.users !== null) { + this.users = Thrift.copyList(args.users, [ttypes.Contact]); } - if (args.buddies !== undefined) { - this.buddies = args.buddies; + if (args.buddies !== undefined && args.buddies !== null) { + this.buddies = Thrift.copyList(args.buddies, [ttypes.Contact]); } } }; @@ -9600,10 +9616,10 @@ RegisterWithSnsIdResult = module.exports.RegisterWithSnsIdResult = function(args this.authToken = null; this.userCreated = null; if (args) { - if (args.authToken !== undefined) { + if (args.authToken !== undefined && args.authToken !== null) { this.authToken = args.authToken; } - if (args.userCreated !== undefined) { + if (args.userCreated !== undefined && args.userCreated !== null) { this.userCreated = args.userCreated; } } @@ -9666,10 +9682,10 @@ RequestTokenResponse = module.exports.RequestTokenResponse = function(args) { this.requestToken = null; this.returnUrl = null; if (args) { - if (args.requestToken !== undefined) { + if (args.requestToken !== undefined && args.requestToken !== null) { this.requestToken = args.requestToken; } - if (args.returnUrl !== undefined) { + if (args.returnUrl !== undefined && args.returnUrl !== null) { this.returnUrl = args.returnUrl; } } @@ -9734,16 +9750,16 @@ Room = module.exports.Room = function(args) { this.contacts = null; this.notificationDisabled = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.createdTime !== undefined) { + if (args.createdTime !== undefined && args.createdTime !== null) { this.createdTime = args.createdTime; } - if (args.contacts !== undefined) { - this.contacts = args.contacts; + if (args.contacts !== undefined && args.contacts !== null) { + this.contacts = Thrift.copyList(args.contacts, [ttypes.Contact]); } - if (args.notificationDisabled !== undefined) { + if (args.notificationDisabled !== undefined && args.notificationDisabled !== null) { this.notificationDisabled = args.notificationDisabled; } } @@ -9855,16 +9871,16 @@ RSAKey = module.exports.RSAKey = function(args) { this.evalue = null; this.sessionKey = null; if (args) { - if (args.keynm !== undefined) { + if (args.keynm !== undefined && args.keynm !== null) { this.keynm = args.keynm; } - if (args.nvalue !== undefined) { + if (args.nvalue !== undefined && args.nvalue !== null) { this.nvalue = args.nvalue; } - if (args.evalue !== undefined) { + if (args.evalue !== undefined && args.evalue !== null) { this.evalue = args.evalue; } - if (args.sessionKey !== undefined) { + if (args.sessionKey !== undefined && args.sessionKey !== null) { this.sessionKey = args.sessionKey; } } @@ -9961,40 +9977,40 @@ SendBuddyMessageResult = module.exports.SendBuddyMessageResult = function(args) this.timestamp = null; this.message = null; if (args) { - if (args.requestId !== undefined) { + if (args.requestId !== undefined && args.requestId !== null) { this.requestId = args.requestId; } - if (args.state !== undefined) { + if (args.state !== undefined && args.state !== null) { this.state = args.state; } - if (args.messageId !== undefined) { + if (args.messageId !== undefined && args.messageId !== null) { this.messageId = args.messageId; } - if (args.eventNo !== undefined) { + if (args.eventNo !== undefined && args.eventNo !== null) { this.eventNo = args.eventNo; } - if (args.receiverCount !== undefined) { + if (args.receiverCount !== undefined && args.receiverCount !== null) { this.receiverCount = args.receiverCount; } - if (args.successCount !== undefined) { + if (args.successCount !== undefined && args.successCount !== null) { this.successCount = args.successCount; } - if (args.failCount !== undefined) { + if (args.failCount !== undefined && args.failCount !== null) { this.failCount = args.failCount; } - if (args.cancelCount !== undefined) { + if (args.cancelCount !== undefined && args.cancelCount !== null) { this.cancelCount = args.cancelCount; } - if (args.blockCount !== undefined) { + if (args.blockCount !== undefined && args.blockCount !== null) { this.blockCount = args.blockCount; } - if (args.unregisterCount !== undefined) { + if (args.unregisterCount !== undefined && args.unregisterCount !== null) { this.unregisterCount = args.unregisterCount; } - if (args.timestamp !== undefined) { + if (args.timestamp !== undefined && args.timestamp !== null) { this.timestamp = args.timestamp; } - if (args.message !== undefined) { + if (args.message !== undefined && args.message !== null) { this.message = args.message; } } @@ -10185,34 +10201,34 @@ SetBuddyOnAirResult = module.exports.SetBuddyOnAirResult = function(args) { this.timestamp = null; this.message = null; if (args) { - if (args.requestId !== undefined) { + if (args.requestId !== undefined && args.requestId !== null) { this.requestId = args.requestId; } - if (args.state !== undefined) { + if (args.state !== undefined && args.state !== null) { this.state = args.state; } - if (args.eventNo !== undefined) { + if (args.eventNo !== undefined && args.eventNo !== null) { this.eventNo = args.eventNo; } - if (args.receiverCount !== undefined) { + if (args.receiverCount !== undefined && args.receiverCount !== null) { this.receiverCount = args.receiverCount; } - if (args.successCount !== undefined) { + if (args.successCount !== undefined && args.successCount !== null) { this.successCount = args.successCount; } - if (args.failCount !== undefined) { + if (args.failCount !== undefined && args.failCount !== null) { this.failCount = args.failCount; } - if (args.cancelCount !== undefined) { + if (args.cancelCount !== undefined && args.cancelCount !== null) { this.cancelCount = args.cancelCount; } - if (args.unregisterCount !== undefined) { + if (args.unregisterCount !== undefined && args.unregisterCount !== null) { this.unregisterCount = args.unregisterCount; } - if (args.timestamp !== undefined) { + if (args.timestamp !== undefined && args.timestamp !== null) { this.timestamp = args.timestamp; } - if (args.message !== undefined) { + if (args.message !== undefined && args.message !== null) { this.message = args.message; } } @@ -10393,77 +10409,77 @@ Settings = module.exports.Settings = function(args) { this.preferenceLocale = null; this.customModes = null; if (args) { - if (args.notificationEnable !== undefined) { + if (args.notificationEnable !== undefined && args.notificationEnable !== null) { this.notificationEnable = args.notificationEnable; } - if (args.notificationMuteExpiration !== undefined) { + if (args.notificationMuteExpiration !== undefined && args.notificationMuteExpiration !== null) { this.notificationMuteExpiration = args.notificationMuteExpiration; } - if (args.notificationNewMessage !== undefined) { + if (args.notificationNewMessage !== undefined && args.notificationNewMessage !== null) { this.notificationNewMessage = args.notificationNewMessage; } - if (args.notificationGroupInvitation !== undefined) { + if (args.notificationGroupInvitation !== undefined && args.notificationGroupInvitation !== null) { this.notificationGroupInvitation = args.notificationGroupInvitation; } - if (args.notificationShowMessage !== undefined) { + if (args.notificationShowMessage !== undefined && args.notificationShowMessage !== null) { this.notificationShowMessage = args.notificationShowMessage; } - if (args.notificationIncomingCall !== undefined) { + if (args.notificationIncomingCall !== undefined && args.notificationIncomingCall !== null) { this.notificationIncomingCall = args.notificationIncomingCall; } - if (args.notificationSoundMessage !== undefined) { + if (args.notificationSoundMessage !== undefined && args.notificationSoundMessage !== null) { this.notificationSoundMessage = args.notificationSoundMessage; } - if (args.notificationSoundGroup !== undefined) { + if (args.notificationSoundGroup !== undefined && args.notificationSoundGroup !== null) { this.notificationSoundGroup = args.notificationSoundGroup; } - if (args.notificationDisabledWithSub !== undefined) { + if (args.notificationDisabledWithSub !== undefined && args.notificationDisabledWithSub !== null) { this.notificationDisabledWithSub = args.notificationDisabledWithSub; } - if (args.privacySyncContacts !== undefined) { + if (args.privacySyncContacts !== undefined && args.privacySyncContacts !== null) { this.privacySyncContacts = args.privacySyncContacts; } - if (args.privacySearchByPhoneNumber !== undefined) { + if (args.privacySearchByPhoneNumber !== undefined && args.privacySearchByPhoneNumber !== null) { this.privacySearchByPhoneNumber = args.privacySearchByPhoneNumber; } - if (args.privacySearchByUserid !== undefined) { + if (args.privacySearchByUserid !== undefined && args.privacySearchByUserid !== null) { this.privacySearchByUserid = args.privacySearchByUserid; } - if (args.privacySearchByEmail !== undefined) { + if (args.privacySearchByEmail !== undefined && args.privacySearchByEmail !== null) { this.privacySearchByEmail = args.privacySearchByEmail; } - if (args.privacyAllowSecondaryDeviceLogin !== undefined) { + if (args.privacyAllowSecondaryDeviceLogin !== undefined && args.privacyAllowSecondaryDeviceLogin !== null) { this.privacyAllowSecondaryDeviceLogin = args.privacyAllowSecondaryDeviceLogin; } - if (args.privacyProfileImagePostToMyhome !== undefined) { + if (args.privacyProfileImagePostToMyhome !== undefined && args.privacyProfileImagePostToMyhome !== null) { this.privacyProfileImagePostToMyhome = args.privacyProfileImagePostToMyhome; } - if (args.privacyReceiveMessagesFromNotFriend !== undefined) { + if (args.privacyReceiveMessagesFromNotFriend !== undefined && args.privacyReceiveMessagesFromNotFriend !== null) { this.privacyReceiveMessagesFromNotFriend = args.privacyReceiveMessagesFromNotFriend; } - if (args.contactMyTicket !== undefined) { + if (args.contactMyTicket !== undefined && args.contactMyTicket !== null) { this.contactMyTicket = args.contactMyTicket; } - if (args.identityProvider !== undefined) { + if (args.identityProvider !== undefined && args.identityProvider !== null) { this.identityProvider = args.identityProvider; } - if (args.identityIdentifier !== undefined) { + if (args.identityIdentifier !== undefined && args.identityIdentifier !== null) { this.identityIdentifier = args.identityIdentifier; } - if (args.snsAccounts !== undefined) { - this.snsAccounts = args.snsAccounts; + if (args.snsAccounts !== undefined && args.snsAccounts !== null) { + this.snsAccounts = Thrift.copyMap(args.snsAccounts, [null]); } - if (args.phoneRegistration !== undefined) { + if (args.phoneRegistration !== undefined && args.phoneRegistration !== null) { this.phoneRegistration = args.phoneRegistration; } - if (args.emailConfirmationStatus !== undefined) { + if (args.emailConfirmationStatus !== undefined && args.emailConfirmationStatus !== null) { this.emailConfirmationStatus = args.emailConfirmationStatus; } - if (args.preferenceLocale !== undefined) { + if (args.preferenceLocale !== undefined && args.preferenceLocale !== null) { this.preferenceLocale = args.preferenceLocale; } - if (args.customModes !== undefined) { - this.customModes = args.customModes; + if (args.customModes !== undefined && args.customModes !== null) { + this.customModes = Thrift.copyMap(args.customModes, [null]); } } }; @@ -10844,13 +10860,13 @@ SimpleChannelClient = module.exports.SimpleChannelClient = function(args) { this.applicationVersion = null; this.locale = null; if (args) { - if (args.applicationType !== undefined) { + if (args.applicationType !== undefined && args.applicationType !== null) { this.applicationType = args.applicationType; } - if (args.applicationVersion !== undefined) { + if (args.applicationVersion !== undefined && args.applicationVersion !== null) { this.applicationVersion = args.applicationVersion; } - if (args.locale !== undefined) { + if (args.locale !== undefined && args.locale !== null) { this.locale = args.locale; } } @@ -10928,19 +10944,19 @@ SimpleChannelContact = module.exports.SimpleChannelContact = function(args) { this.picturePath = null; this.statusMessage = null; if (args) { - if (args.mid !== undefined) { + if (args.mid !== undefined && args.mid !== null) { this.mid = args.mid; } - if (args.displayName !== undefined) { + if (args.displayName !== undefined && args.displayName !== null) { this.displayName = args.displayName; } - if (args.pictureStatus !== undefined) { + if (args.pictureStatus !== undefined && args.pictureStatus !== null) { this.pictureStatus = args.pictureStatus; } - if (args.picturePath !== undefined) { + if (args.picturePath !== undefined && args.picturePath !== null) { this.picturePath = args.picturePath; } - if (args.statusMessage !== undefined) { + if (args.statusMessage !== undefined && args.statusMessage !== null) { this.statusMessage = args.statusMessage; } } @@ -11040,13 +11056,13 @@ SnsFriend = module.exports.SnsFriend = function(args) { this.snsUserName = null; this.snsIdType = null; if (args) { - if (args.snsUserId !== undefined) { + if (args.snsUserId !== undefined && args.snsUserId !== null) { this.snsUserId = args.snsUserId; } - if (args.snsUserName !== undefined) { + if (args.snsUserName !== undefined && args.snsUserName !== null) { this.snsUserName = args.snsUserName; } - if (args.snsIdType !== undefined) { + if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } } @@ -11122,13 +11138,13 @@ SnsFriendContactRegistration = module.exports.SnsFriendContactRegistration = fun this.snsIdType = null; this.snsUserId = null; if (args) { - if (args.contact !== undefined) { - this.contact = args.contact; + if (args.contact !== undefined && args.contact !== null) { + this.contact = new ttypes.Contact(args.contact); } - if (args.snsIdType !== undefined) { + if (args.snsIdType !== undefined && args.snsIdType !== null) { this.snsIdType = args.snsIdType; } - if (args.snsUserId !== undefined) { + if (args.snsUserId !== undefined && args.snsUserId !== null) { this.snsUserId = args.snsUserId; } } @@ -11204,11 +11220,11 @@ SnsFriendModification = module.exports.SnsFriendModification = function(args) { this.type = null; this.snsFriend = null; if (args) { - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.snsFriend !== undefined) { - this.snsFriend = args.snsFriend; + if (args.snsFriend !== undefined && args.snsFriend !== null) { + this.snsFriend = new ttypes.SnsFriend(args.snsFriend); } } }; @@ -11271,10 +11287,10 @@ SnsFriends = module.exports.SnsFriends = function(args) { this.snsFriends = null; this.hasMore = null; if (args) { - if (args.snsFriends !== undefined) { - this.snsFriends = args.snsFriends; + if (args.snsFriends !== undefined && args.snsFriends !== null) { + this.snsFriends = Thrift.copyList(args.snsFriends, [ttypes.SnsFriend]); } - if (args.hasMore !== undefined) { + if (args.hasMore !== undefined && args.hasMore !== null) { this.hasMore = args.hasMore; } } @@ -11361,13 +11377,13 @@ SnsIdUserStatus = module.exports.SnsIdUserStatus = function(args) { this.phoneNumberRegistered = null; this.sameDevice = null; if (args) { - if (args.userExisting !== undefined) { + if (args.userExisting !== undefined && args.userExisting !== null) { this.userExisting = args.userExisting; } - if (args.phoneNumberRegistered !== undefined) { + if (args.phoneNumberRegistered !== undefined && args.phoneNumberRegistered !== null) { this.phoneNumberRegistered = args.phoneNumberRegistered; } - if (args.sameDevice !== undefined) { + if (args.sameDevice !== undefined && args.sameDevice !== null) { this.sameDevice = args.sameDevice; } } @@ -11444,16 +11460,16 @@ SnsProfile = module.exports.SnsProfile = function(args) { this.email = null; this.thumbnailUrl = null; if (args) { - if (args.snsUserId !== undefined) { + if (args.snsUserId !== undefined && args.snsUserId !== null) { this.snsUserId = args.snsUserId; } - if (args.snsUserName !== undefined) { + if (args.snsUserName !== undefined && args.snsUserName !== null) { this.snsUserName = args.snsUserName; } - if (args.email !== undefined) { + if (args.email !== undefined && args.email !== null) { this.email = args.email; } - if (args.thumbnailUrl !== undefined) { + if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { this.thumbnailUrl = args.thumbnailUrl; } } @@ -11543,19 +11559,19 @@ SystemConfiguration = module.exports.SystemConfiguration = function(args) { this.c2dmAccount = null; this.nniServer = null; if (args) { - if (args.endpoint !== undefined) { + if (args.endpoint !== undefined && args.endpoint !== null) { this.endpoint = args.endpoint; } - if (args.endpointSsl !== undefined) { + if (args.endpointSsl !== undefined && args.endpointSsl !== null) { this.endpointSsl = args.endpointSsl; } - if (args.updateUrl !== undefined) { + if (args.updateUrl !== undefined && args.updateUrl !== null) { this.updateUrl = args.updateUrl; } - if (args.c2dmAccount !== undefined) { + if (args.c2dmAccount !== undefined && args.c2dmAccount !== null) { this.c2dmAccount = args.c2dmAccount; } - if (args.nniServer !== undefined) { + if (args.nniServer !== undefined && args.nniServer !== null) { this.nniServer = args.nniServer; } } @@ -11657,14 +11673,14 @@ TalkException = module.exports.TalkException = function(args) { this.reason = null; this.parameterMap = null; if (args) { - if (args.code !== undefined) { + if (args.code !== undefined && args.code !== null) { this.code = args.code; } - if (args.reason !== undefined) { + if (args.reason !== undefined && args.reason !== null) { this.reason = args.reason; } - if (args.parameterMap !== undefined) { - this.parameterMap = args.parameterMap; + if (args.parameterMap !== undefined && args.parameterMap !== null) { + this.parameterMap = Thrift.copyMap(args.parameterMap, [null]); } } }; @@ -11767,13 +11783,13 @@ Ticket = module.exports.Ticket = function(args) { this.expirationTime = null; this.maxUseCount = null; if (args) { - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } - if (args.expirationTime !== undefined) { + if (args.expirationTime !== undefined && args.expirationTime !== null) { this.expirationTime = args.expirationTime; } - if (args.maxUseCount !== undefined) { + if (args.maxUseCount !== undefined && args.maxUseCount !== null) { this.maxUseCount = args.maxUseCount; } } @@ -11854,29 +11870,29 @@ TMessageBox = module.exports.TMessageBox = function(args) { this.midType = null; this.lastMessages = null; if (args) { - if (args.id !== undefined) { + if (args.id !== undefined && args.id !== null) { this.id = args.id; } - if (args.channelId !== undefined) { + if (args.channelId !== undefined && args.channelId !== null) { this.channelId = args.channelId; } - if (args.lastSeq !== undefined) { + if (args.lastSeq !== undefined && args.lastSeq !== null) { this.lastSeq = args.lastSeq; } - if (args.unreadCount !== undefined) { + if (args.unreadCount !== undefined && args.unreadCount !== null) { this.unreadCount = args.unreadCount; } - if (args.lastModifiedTime !== undefined) { + if (args.lastModifiedTime !== undefined && args.lastModifiedTime !== null) { this.lastModifiedTime = args.lastModifiedTime; } - if (args.status !== undefined) { + if (args.status !== undefined && args.status !== null) { this.status = args.status; } - if (args.midType !== undefined) { + if (args.midType !== undefined && args.midType !== null) { this.midType = args.midType; } - if (args.lastMessages !== undefined) { - this.lastMessages = args.lastMessages; + if (args.lastMessages !== undefined && args.lastMessages !== null) { + this.lastMessages = Thrift.copyList(args.lastMessages, [ttypes.Message]); } } }; @@ -12035,16 +12051,16 @@ TMessageBoxWrapUp = module.exports.TMessageBoxWrapUp = function(args) { this.contacts = null; this.pictureRevision = null; if (args) { - if (args.messageBox !== undefined) { - this.messageBox = args.messageBox; + if (args.messageBox !== undefined && args.messageBox !== null) { + this.messageBox = new ttypes.TMessageBox(args.messageBox); } - if (args.name !== undefined) { + if (args.name !== undefined && args.name !== null) { this.name = args.name; } - if (args.contacts !== undefined) { - this.contacts = args.contacts; + if (args.contacts !== undefined && args.contacts !== null) { + this.contacts = Thrift.copyList(args.contacts, [ttypes.Contact]); } - if (args.pictureRevision !== undefined) { + if (args.pictureRevision !== undefined && args.pictureRevision !== null) { this.pictureRevision = args.pictureRevision; } } @@ -12155,10 +12171,10 @@ TMessageBoxWrapUpResponse = module.exports.TMessageBoxWrapUpResponse = function( this.messageBoxWrapUpList = null; this.totalSize = null; if (args) { - if (args.messageBoxWrapUpList !== undefined) { - this.messageBoxWrapUpList = args.messageBoxWrapUpList; + if (args.messageBoxWrapUpList !== undefined && args.messageBoxWrapUpList !== null) { + this.messageBoxWrapUpList = Thrift.copyList(args.messageBoxWrapUpList, [ttypes.TMessageBoxWrapUp]); } - if (args.totalSize !== undefined) { + if (args.totalSize !== undefined && args.totalSize !== null) { this.totalSize = args.totalSize; } } @@ -12247,14 +12263,14 @@ UniversalNotificationServiceException = module.exports.UniversalNotificationServ this.reason = null; this.parameterMap = null; if (args) { - if (args.code !== undefined) { + if (args.code !== undefined && args.code !== null) { this.code = args.code; } - if (args.reason !== undefined) { + if (args.reason !== undefined && args.reason !== null) { this.reason = args.reason; } - if (args.parameterMap !== undefined) { - this.parameterMap = args.parameterMap; + if (args.parameterMap !== undefined && args.parameterMap !== null) { + this.parameterMap = Thrift.copyMap(args.parameterMap, [null]); } } }; @@ -12364,34 +12380,34 @@ UpdateBuddyProfileResult = module.exports.UpdateBuddyProfileResult = function(ar this.timestamp = null; this.message = null; if (args) { - if (args.requestId !== undefined) { + if (args.requestId !== undefined && args.requestId !== null) { this.requestId = args.requestId; } - if (args.state !== undefined) { + if (args.state !== undefined && args.state !== null) { this.state = args.state; } - if (args.eventNo !== undefined) { + if (args.eventNo !== undefined && args.eventNo !== null) { this.eventNo = args.eventNo; } - if (args.receiverCount !== undefined) { + if (args.receiverCount !== undefined && args.receiverCount !== null) { this.receiverCount = args.receiverCount; } - if (args.successCount !== undefined) { + if (args.successCount !== undefined && args.successCount !== null) { this.successCount = args.successCount; } - if (args.failCount !== undefined) { + if (args.failCount !== undefined && args.failCount !== null) { this.failCount = args.failCount; } - if (args.cancelCount !== undefined) { + if (args.cancelCount !== undefined && args.cancelCount !== null) { this.cancelCount = args.cancelCount; } - if (args.unregisterCount !== undefined) { + if (args.unregisterCount !== undefined && args.unregisterCount !== null) { this.unregisterCount = args.unregisterCount; } - if (args.timestamp !== undefined) { + if (args.timestamp !== undefined && args.timestamp !== null) { this.timestamp = args.timestamp; } - if (args.message !== undefined) { + if (args.message !== undefined && args.message !== null) { this.message = args.message; } } @@ -12550,11 +12566,11 @@ UserAuthStatus = module.exports.UserAuthStatus = function(args) { this.phoneNumberRegistered = null; this.registeredSnsIdTypes = null; if (args) { - if (args.phoneNumberRegistered !== undefined) { + if (args.phoneNumberRegistered !== undefined && args.phoneNumberRegistered !== null) { this.phoneNumberRegistered = args.phoneNumberRegistered; } - if (args.registeredSnsIdTypes !== undefined) { - this.registeredSnsIdTypes = args.registeredSnsIdTypes; + if (args.registeredSnsIdTypes !== undefined && args.registeredSnsIdTypes !== null) { + this.registeredSnsIdTypes = Thrift.copyList(args.registeredSnsIdTypes, [null]); } } }; @@ -12643,26 +12659,26 @@ VerificationSessionData = module.exports.VerificationSessionData = function(args this.nationalSignificantNumber = null; this.availableVerificationMethods = null; if (args) { - if (args.sessionId !== undefined) { + if (args.sessionId !== undefined && args.sessionId !== null) { this.sessionId = args.sessionId; } - if (args.method !== undefined) { + if (args.method !== undefined && args.method !== null) { this.method = args.method; } - if (args.callback !== undefined) { + if (args.callback !== undefined && args.callback !== null) { this.callback = args.callback; } - if (args.normalizedPhone !== undefined) { + if (args.normalizedPhone !== undefined && args.normalizedPhone !== null) { this.normalizedPhone = args.normalizedPhone; } - if (args.countryCode !== undefined) { + if (args.countryCode !== undefined && args.countryCode !== null) { this.countryCode = args.countryCode; } - if (args.nationalSignificantNumber !== undefined) { + if (args.nationalSignificantNumber !== undefined && args.nationalSignificantNumber !== null) { this.nationalSignificantNumber = args.nationalSignificantNumber; } - if (args.availableVerificationMethods !== undefined) { - this.availableVerificationMethods = args.availableVerificationMethods; + if (args.availableVerificationMethods !== undefined && args.availableVerificationMethods !== null) { + this.availableVerificationMethods = Thrift.copyList(args.availableVerificationMethods, [null]); } } }; @@ -12808,16 +12824,16 @@ WapInvitation = module.exports.WapInvitation = function(args) { this.inviterMid = null; this.roomMid = null; if (args) { - if (args.type !== undefined) { + if (args.type !== undefined && args.type !== null) { this.type = args.type; } - if (args.inviteeEmail !== undefined) { + if (args.inviteeEmail !== undefined && args.inviteeEmail !== null) { this.inviteeEmail = args.inviteeEmail; } - if (args.inviterMid !== undefined) { + if (args.inviterMid !== undefined && args.inviterMid !== null) { this.inviterMid = args.inviterMid; } - if (args.roomMid !== undefined) { + if (args.roomMid !== undefined && args.roomMid !== null) { this.roomMid = args.roomMid; } } diff --git a/line.thrift b/line.thrift new file mode 100644 index 0000000..336ce0c --- /dev/null +++ b/line.thrift @@ -0,0 +1,2746 @@ +enum ApplicationType { + 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; +} + +enum BuddyBannerLinkType { + BUDDY_BANNER_LINK_HIDDEN = 0; + BUDDY_BANNER_LINK_MID = 1; + BUDDY_BANNER_LINK_URL = 2; +} + +enum BuddyOnAirType { + NORMAL = 0; + LIVE = 1; + VOIP = 2; +} + +enum BuddyResultState { + ACCEPTED = 1; + SUCCEEDED = 2; + FAILED = 3; + CANCELLED = 4; + NOTIFY_FAILED = 5; + STORING = 11; + UPLOADING = 21; + NOTIFYING = 31; +} + +enum BuddySearchRequestSource { + NA = 0; + FRIEND_VIEW = 1; + OFFICIAL_ACCOUNT_VIEW = 2; +} + +enum CarrierCode { + NOT_SPECIFIED = 0; + JP_DOCOMO = 1; + JP_AU = 2; + JP_SOFTBANK = 3; + KR_SKT = 17; + KR_KT = 18; + KR_LGT = 19; +} + +enum ChannelConfiguration { + MESSAGE = 0; + MESSAGE_NOTIFICATION = 1; + NOTIFICATION_CENTER = 2; +} + +enum ChannelErrorCode { + ILLEGAL_ARGUMENT = 0; + INTERNAL_ERROR = 1; + CONNECTION_ERROR = 2; + AUTHENTICATIONI_FAILED = 3; + NEED_PERMISSION_APPROVAL = 4; + COIN_NOT_USABLE = 5; +} + +enum ChannelSyncType { + SYNC = 0; + REMOVE = 1; +} + +enum ContactAttribute { + CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL = 1; + CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL = 2; + CONTACT_ATTRIBUTE_CAPABLE_MY_HOME = 16; + CONTACT_ATTRIBUTE_CAPABLE_BUDDY = 32; +} + +enum ContactCategory { + NORMAL = 0; + RECOMMEND = 1; +} + +enum ContactRelation { + ONEWAY = 0; + BOTH = 1; + NOT_REGISTERED = 2; +} + +enum ContactSetting { + CONTACT_SETTING_NOTIFICATION_DISABLE = 1; + CONTACT_SETTING_DISPLAY_NAME_OVERRIDE = 2; + CONTACT_SETTING_CONTACT_HIDE = 4; + CONTACT_SETTING_FAVORITE = 8; + CONTACT_SETTING_DELETE = 16; +} + +enum ContactStatus { + UNSPECIFIED = 0; + FRIEND = 1; + FRIEND_BLOCKED = 2; + RECOMMEND = 3; + RECOMMEND_BLOCKED = 4; + DELETED = 5; + DELETED_BLOCKED = 6; +} + +enum ContactType { + 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; +} + +enum ContentType { + 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; +} + +enum CustomMode { + PROMOTION_FRIENDS_INVITE = 1; + CAPABILITY_SERVER_SIDE_SMS = 2; + LINE_CLIENT_ANALYTICS_CONFIGURATION = 3; +} + +enum EmailConfirmationStatus { + NOT_SPECIFIED = 0; + NOT_YET = 1; + DONE = 3; +} + +enum EmailConfirmationType { + SERVER_SIDE_EMAIL = 0; + CLIENT_SIDE_EMAIL = 1; +} + +enum ErrorCode { + 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; +} + +enum FeatureType { + OBJECT_STORAGE = 1; +} + +enum GroupAttribute { + NAME = 1; + PICTURE_STATUS = 2; + ALL = 255; +} + +enum IdentityProvider { + UNKNOWN = 0; + LINE = 1; + NAVER_KR = 2; +} + +enum LoginResultType { + SUCCESS = 1; + REQUIRE_QRCODE = 2; + REQUIRE_DEVICE_CONFIRM = 3; +} + +enum MessageOperationType { + 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; +} + +enum MIDType { + USER = 0; + ROOM = 1; + GROUP = 2; +} + +enum ModificationType { + ADD = 0; + REMOVE = 1; + MODIFY = 2; +} + +enum NotificationItemFetchMode { + ALL = 0; + APPEND = 1; +} + +enum NotificationQueueType { + GLOBAL = 1; + MESSAGE = 2; + PRIMARY = 3; +} + +enum NotificationStatus { + 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; +} + +enum NotificationType { + 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; +} + +enum OpStatus { + NORMAL = 0; + ALERT_DISABLED = 1; +} + +enum OpType { + 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; +} + +enum PayloadType { + PAYLOAD_BUY = 101; + PAYLOAD_CS = 111; + PAYLOAD_BONUS = 121; + PAYLOAD_EVENT = 131; +} + +enum PaymentPgType { + PAYMENT_PG_NONE = 0; + PAYMENT_PG_AU = 1; + PAYMENT_PG_AL = 2; +} + +enum PaymentType { + PAYMENT_APPLE = 1; + PAYMENT_GOOGLE = 2; +} + +enum ProductBannerLinkType { + BANNER_LINK_NONE = 0; + BANNER_LINK_ITEM = 1; + BANNER_LINK_URL = 2; + BANNER_LINK_CATEGORY = 3; +} + +enum ProductEventType { + NO_EVENT = 0; + CARRIER_ANY = 65537; + BUDDY_ANY = 131073; + INSTALL_IOS = 196609; + INSTALL_ANDROID = 196610; + MISSION_ANY = 262145; + MUSTBUY_ANY = 327681; +} + +enum ProfileAttribute { + 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; +} + +enum PublicType { + HIDDEN = 0; + PUBLIC = 1000; +} + +enum RedirectType { + NONE = 0; + EXPIRE_SECOND = 1; +} + +enum RegistrationType { + PHONE = 0; + EMAIL_WAP = 1; + FACEBOOK = 2305; + SINA = 2306; + RENREN = 2307; + FEIXIN = 2308; +} + +enum SettingsAttribute { + 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; +} + +enum SnsIdType { + FACEBOOK = 1; + SINA = 2; + RENREN = 3; + FEIXIN = 4; +} + +enum SpammerReason { + OTHER = 0; + ADVERTISING = 1; + GENDER_HARASSMENT = 2; + HARASSMENT = 3; +} + +enum SyncActionType { + SYNC = 0; + REPORT = 1; +} + +enum SyncCategory { + PROFILE = 0; + SETTINGS = 1; + OPS = 2; + CONTACT = 3; + RECOMMEND = 4; + BLOCK = 5; + GROUP = 6; + ROOM = 7; + NOTIFICATION = 8; +} + +enum TMessageBoxStatus { + ACTIVATED = 1; + UNREAD = 2; +} + +enum UniversalNotificationServiceErrorCode { + INTERNAL_ERROR = 0; + INVALID_KEY = 1; + ILLEGAL_ARGUMENT = 2; + TOO_MANY_REQUEST = 3; + AUTHENTICATION_FAILED = 4; + NO_WRITE_PERMISSION = 5; +} + +enum UnregistrationReason { + UNREGISTRATION_REASON_UNREGISTER_USER = 1; + UNREGISTRATION_REASON_UNBIND_DEVICE = 2; +} + +enum UserAgeType { + OVER = 1; + UNDER = 2; + UNDEFINED = 3; +} + +enum VerificationMethod { + NO_AVAILABLE = 0; + PIN_VIA_SMS = 1; + CALLERID_INDIGO = 2; + PIN_VIA_TTS = 4; + SKIP = 10; +} + +enum VerificationResult { + FAILED = 0; + OK_NOT_REGISTERED_YET = 1; + OK_REGISTERED_WITH_SAME_DEVICE = 2; + OK_REGISTERED_WITH_ANOTHER_DEVICE = 3; +} + +enum WapInvitationType { + REGISTRATION = 1; + CHAT = 2; +} + +struct AgeCheckDocomoResult { + 1: string authUrl; + 2: UserAgeType userAgeType; +} + +struct AgeCheckRequestResult { + 1: string authUrl; + 2: string sessionId; +} + +struct Announcement { + 1: i32 index; + 10: bool forceUpdate; + 11: string title; + 12: string text; + 13: i64 createdTime; + 14: string pictureUrl; + 15: string thumbnailUrl; +} + +struct ChannelProvider { + 1: string name; +} + +struct ChannelInfo { + 1: string channelId; + 3: string name; + 4: string entryPageUrl; + 5: string descriptionText; + 6: ChannelProvider provider; + 7: PublicType publicType; + 8: string iconImage; + 9: list permissions; + 11: string iconThumbnailImage; + 12: list channelConfigurations; +} + +struct ApprovedChannelInfo { + 1: ChannelInfo channelInfo; + 2: i64 approvedAt; +} + +struct ApprovedChannelInfos { + 1: list approvedChannelInfos; + 2: i64 revision; +} + +struct AuthQrcode { + 1: string qrcode; + 2: string verifier; +} + +struct BuddyBanner { + 1: BuddyBannerLinkType buddyBannerLinkType; + 2: string buddyBannerLink; + 3: string buddyBannerImageUrl; +} + +struct BuddyDetail { + 1: string mid; + 2: i64 memberCount; + 3: bool onAir; + 4: bool businessAccount; + 5: bool addable; + 6: set acceptableContentTypes; + 7: bool capableMyhome; +} + +struct Contact { + 1: string mid; + 2: i64 createdTime; + 10: ContactType type; + 11: ContactStatus status; + 21: ContactRelation relation; + 22: string displayName; + 23: string phoneticName; + 24: string pictureStatus; + 25: string thumbnailUrl; + 26: string statusMessage; + 27: string displayNameOverridden; + 28: i64 favoriteTime; + 31: bool capableVoiceCall; + 32: bool capableVideoCall; + 33: bool capableMyhome; + 34: bool capableBuddy; + 35: i32 attributes; + 36: i64 settings; + 37: string picturePath; +} + +struct BuddyList { + 1: string classification; + 2: string displayName; + 3: i32 totalBuddyCount; + 4: list popularContacts; +} + +struct Location { + 1: string title; + 2: string address; + 3: double latitude; + 4: double longitude; + 5: string phone; +} + +struct BuddyMessageRequest { + 1: ContentType contentType; + 2: string text; + 3: Location location; + 4: binary content; + 5: map contentMetadata; +} + +struct BuddyOnAirUrls { + 1: map hls; + 2: map smoothStreaming; +} + +struct BuddyOnAir { + 1: string mid; + 3: i64 freshnessLifetime; + 4: string onAirId; + 5: bool onAir; + 11: string text; + 12: i64 viewerCount; + 13: i64 targetCount; + 31: BuddyOnAirType onAirType; + 32: BuddyOnAirUrls onAirUrls; +} + +struct BuddyProfile { + 1: string buddyId; + 2: string mid; + 3: string searchId; + 4: string displayName; + 5: string statusMessage; + 11: i64 contactCount; +} + +struct BuddySearchResult { + 1: string mid; + 2: string displayName; + 3: string pictureStatus; + 4: string picturePath; + 5: string statusMessage; + 6: bool businessAccount; +} + +struct ChannelDomain { + 1: string host; + 2: bool removed; +} + +struct ChannelDomains { + 1: list channelDomains; + 2: i64 revision; +} + +exception ChannelException { + 1: ChannelErrorCode code; + 2: string reason; + 3: map parameterMap; +} + +struct ChannelInfos { + 1: list channelInfos; + 2: i64 revision; +} + +struct ChannelNotificationSetting { + 1: string channelId; + 2: string name; + 3: bool notificationReceivable; + 4: bool messageReceivable; + 5: bool showDefault; +} + +struct ChannelSyncDatas { + 1: list channelInfos; + 2: list channelDomains; + 3: i64 revision; + 4: i64 expires; +} + +struct ChannelToken { + 1: string token; + 2: string obsToken; + 3: i64 expiration; + 4: string refreshToken; + 5: string channelAccessToken; +} + +struct Coin { + 1: i32 freeCoinBalance; + 2: i32 payedCoinBalance; + 3: i32 totalCoinBalance; + 4: i32 rewardCoinBalance; +} + +struct CoinPayLoad { + 1: i32 payCoin; + 2: i32 freeCoin; + 3: PayloadType type; + 4: i32 rewardCoin; +} + +struct CoinHistory { + 1: i64 payDate; + 2: i32 coinBalance; + 3: i32 coin; + 4: string price; + 5: string title; + 6: bool refund; + 7: string paySeq; + 8: string currency; + 9: string currencySign; + 10: string displayPrice; + 11: CoinPayLoad payload; + 12: string channelId; +} + +struct CoinHistoryCondition { + 1: i64 start; + 2: i32 size; + 3: string language; + 4: string eddt; + 5: PaymentType appStoreCode; +} + +struct CoinHistoryResult { + 1: list historys; + 2: Coin balance; + 3: bool hasNext; +} + +struct CoinProductItem { + 1: string itemId; + 2: i32 coin; + 3: i32 freeCoin; + 5: string currency; + 6: string price; + 7: string displayPrice; + 8: string name; + 9: string desc; +} + +struct CoinPurchaseConfirm { + 1: string orderId; + 2: PaymentType appStoreCode; + 3: string receipt; + 4: string signature; + 5: string seller; + 6: string requestType; + 7: bool ignoreReceipt; +} + +struct CoinPurchaseReservation { + 1: string productId; + 2: string country; + 3: string currency; + 4: string price; + 5: PaymentType appStoreCode; + 6: string language; + 7: PaymentPgType pgCode; + 8: string redirectUrl; +} + +struct CoinUseReservationItem { + 1: string itemId; + 2: string itemName; + 3: i32 amount; +} + +struct CoinUseReservation { + 1: string channelId; + 2: string shopOrderId; + 3: PaymentType appStoreCode; + 4: list items; + 5: string country; +} + +struct CompactContact { + 1: string mid; + 2: i64 createdTime; + 3: i64 modifiedTime; + 4: ContactStatus status; + 5: i64 settings; + 6: string displayNameOverridden; +} + +struct ContactModification { + 1: ModificationType type; + 2: string luid; + 11: list phones; + 12: list emails; + 13: list userids; +} + +struct ContactRegistration { + 1: Contact contact; + 10: string luid; + 11: ContactType contactType; + 12: string contactKey; +} + +struct ContactReport { + 1: string mid; + 2: bool exists; + 3: Contact contact; +} + +struct ContactReportResult { + 1: string mid; + 2: bool exists; +} + +struct DeviceInfo { + 1: string deviceName; + 2: string systemName; + 3: string systemVersion; + 4: string model; + 10: CarrierCode carrierCode; + 11: string carrierName; + 20: ApplicationType applicationType; +} + +struct EmailConfirmation { + 1: bool usePasswordSet; + 2: string email; + 3: string password; + 4: bool ignoreDuplication; +} + +struct EmailConfirmationSession { + 1: EmailConfirmationType emailConfirmationType; + 2: string verifier; + 3: string targetEmail; +} + +struct FriendChannelMatrix { + 1: string channelId; + 2: string representMid; + 3: i32 count; +} + +struct FriendChannelMatricesResponse { + 1: i64 expires; + 2: list matrices; +} + +struct Geolocation { + 1: double longitude; + 2: double latitude; +} + +struct NotificationTarget { + 1: string applicationType; + 2: string applicationVersion; + 3: string region; +} + +struct GlobalEvent { + 1: string key; + 2: list targets; + 3: i64 createdTime; + 4: i64 data; + 5: i32 maxDelay; +} + +struct Group { + 1: string id; + 2: i64 createdTime; + 10: string name; + 11: string pictureStatus; + 12: bool preventJoinByTicket; + 20: list members; + 21: Contact creator; + 22: list invitee; + 31: bool notificationDisabled; +} + +struct IdentityCredential { + 1: IdentityProvider provider; + 2: string identifier; + 3: string password; +} + +struct LastReadMessageId { + 1: string mid; + 2: string lastReadMessageId; +} + +struct LastReadMessageIds { + 1: string chatId; + 2: list lastReadMessageIds; +} + +struct LoginResult { + 1: string authToken; + 2: string certificate; + 3: string verifier; + 4: string pinCode; + 5: LoginResultType type; +} + +struct LoginSession { + 1: string tokenKey; + 3: i64 expirationTime; + 11: ApplicationType applicationType; + 12: string systemName; + 22: string accessLocation; +} + +struct Message { + 1: string from; + 2: string to; + 3: MIDType toType; + 4: string id; + 5: i64 createdTime; + 6: i64 deliveredTime; + 10: string text; + 11: Location location; + 14: bool hasContent; + 15: ContentType contentType; + 17: binary contentPreview; + 18: map contentMetadata; +} + +struct MessageOperation { + 1: i64 revision; + 2: i64 createdTime; + 3: MessageOperationType type; + 4: i32 reqSeq; + 5: OpStatus status; + 10: string param1; + 11: string param2; + 12: string param3; + 20: Message message; +} + +struct MessageOperations { + 1: list operations; + 2: bool endFlag; +} + +struct MetaProfile { + 1: i64 createTime; + 2: string regionCode; + 3: map identities; +} + +struct NotificationItem { + 1: string id; + 2: string from; + 3: string to; + 4: string fromChannel; + 5: string toChannel; + 7: i64 revision; + 8: i64 createdTime; + 9: map content; +} + +struct NotificationFetchResult { + 1: NotificationItemFetchMode fetchMode; + 2: list itemList; +} + +struct Operation { + 1: i64 revision; + 2: i64 createdTime; + 3: OpType type; + 4: i32 reqSeq; + 5: string checksum; + 7: OpStatus status; + 10: string param1; + 11: string param2; + 12: string param3; + 20: Message message; +} + +struct PaymentReservation { + 1: string receiverMid; + 2: string productId; + 3: string language; + 4: string location; + 5: string currency; + 6: string price; + 7: PaymentType appStoreCode; + 8: string messageText; + 9: i32 messageTemplate; + 10: i64 packageId; +} + +struct PaymentReservationResult { + 1: string orderId; + 2: string confirmUrl; + 3: map extras; +} + +struct Product { + 1: string productId; + 2: i64 packageId; + 3: i32 version; + 4: string authorName; + 5: bool onSale; + 6: i32 validDays; + 7: i32 saleType; + 8: string copyright; + 9: string title; + 10: string descriptionText; + 11: i64 shopOrderId; + 12: string fromMid; + 13: string toMid; + 14: i64 validUntil; + 15: i32 priceTier; + 16: string price; + 17: string currency; + 18: string currencySymbol; + 19: PaymentType paymentType; + 20: i64 createDate; + 21: bool ownFlag; + 22: ProductEventType eventType; + 23: string urlSchema; + 24: string downloadUrl; + 25: string buddyMid; + 26: i64 publishSince; + 27: bool newFlag; + 28: bool missionFlag; +} + +struct ProductList { + 1: bool hasNext; + 4: i64 bannerSequence; + 5: ProductBannerLinkType bannerTargetType; + 6: string bannerTargetPath; + 7: list productList; + 8: string bannerLang; +} + +struct ProductSimple { + 1: string productId; + 2: i64 packageId; + 3: i32 version; + 4: bool onSale; + 5: i64 validUntil; +} + +struct ProductSimpleList { + 1: bool hasNext; + 2: i32 reinvokeHour; + 3: i64 lastVersionSeq; + 4: list productList; + 5: i64 recentNewReleaseDate; + 6: i64 recentEventReleaseDate; +} + +struct Profile { + 1: string mid; + 3: string userid; + 10: string phone; + 11: string email; + 12: string regionCode; + 20: string displayName; + 21: string phoneticName; + 22: string pictureStatus; + 23: string thumbnailUrl; + 24: string statusMessage; + 31: bool allowSearchByUserid; + 32: bool allowSearchByEmail; + 33: string picturePath; +} + +struct ProximityMatchCandidateResult { + 1: list users; + 2: list buddies; +} + +struct RegisterWithSnsIdResult { + 1: string authToken; + 2: bool userCreated; +} + +struct RequestTokenResponse { + 1: string requestToken; + 2: string returnUrl; +} + +struct Room { + 1: string mid; + 2: i64 createdTime; + 10: list contacts; + 31: bool notificationDisabled; +} + +struct RSAKey { + 1: string keynm; + 2: string nvalue; + 3: string evalue; + 4: string sessionKey; +} + +struct SendBuddyMessageResult { + 1: string requestId; + 2: BuddyResultState state; + 3: string messageId; + 4: i32 eventNo; + 11: i64 receiverCount; + 12: i64 successCount; + 13: i64 failCount; + 14: i64 cancelCount; + 15: i64 blockCount; + 16: i64 unregisterCount; + 21: i64 timestamp; + 22: string message; +} + +struct SetBuddyOnAirResult { + 1: string requestId; + 2: BuddyResultState state; + 3: i32 eventNo; + 11: i64 receiverCount; + 12: i64 successCount; + 13: i64 failCount; + 14: i64 cancelCount; + 15: i64 unregisterCount; + 21: i64 timestamp; + 22: string message; +} + +struct Settings { + 10: bool notificationEnable; + 11: i64 notificationMuteExpiration; + 12: bool notificationNewMessage; + 13: bool notificationGroupInvitation; + 14: bool notificationShowMessage; + 15: bool notificationIncomingCall; + 16: string notificationSoundMessage; + 17: string notificationSoundGroup; + 18: bool notificationDisabledWithSub; + 20: bool privacySyncContacts; + 21: bool privacySearchByPhoneNumber; + 22: bool privacySearchByUserid; + 23: bool privacySearchByEmail; + 24: bool privacyAllowSecondaryDeviceLogin; + 25: bool privacyProfileImagePostToMyhome; + 26: bool privacyReceiveMessagesFromNotFriend; + 30: string contactMyTicket; + 40: IdentityProvider identityProvider; + 41: string identityIdentifier; + 42: map snsAccounts; + 43: bool phoneRegistration; + 44: EmailConfirmationStatus emailConfirmationStatus; + 50: string preferenceLocale; + 60: map customModes; +} + +struct SimpleChannelClient { + 1: string applicationType; + 2: string applicationVersion; + 3: string locale; +} + +struct SimpleChannelContact { + 1: string mid; + 2: string displayName; + 3: string pictureStatus; + 4: string picturePath; + 5: string statusMessage; +} + +struct SnsFriend { + 1: string snsUserId; + 2: string snsUserName; + 3: SnsIdType snsIdType; +} + +struct SnsFriendContactRegistration { + 1: Contact contact; + 2: SnsIdType snsIdType; + 3: string snsUserId; +} + +struct SnsFriendModification { + 1: ModificationType type; + 2: SnsFriend snsFriend; +} + +struct SnsFriends { + 1: list snsFriends; + 2: bool hasMore; +} + +struct SnsIdUserStatus { + 1: bool userExisting; + 2: bool phoneNumberRegistered; + 3: bool sameDevice; +} + +struct SnsProfile { + 1: string snsUserId; + 2: string snsUserName; + 3: string email; + 4: string thumbnailUrl; +} + +struct SystemConfiguration { + 1: string endpoint; + 2: string endpointSsl; + 3: string updateUrl; + 11: string c2dmAccount; + 12: string nniServer; +} + +exception TalkException { + 1: ErrorCode code; + 2: string reason; + 3: map parameterMap; +} + +struct Ticket { + 1: string id; + 10: i64 expirationTime; + 21: i32 maxUseCount; +} + +struct TMessageBox { + 1: string id; + 2: string channelId; + 5: i64 lastSeq; + 6: i64 unreadCount; + 7: i64 lastModifiedTime; + 8: i32 status; + 9: MIDType midType; + 10: list lastMessages; +} + +struct TMessageBoxWrapUp { + 1: TMessageBox messageBox; + 2: string name; + 3: list contacts; + 4: string pictureRevision; +} + +struct TMessageBoxWrapUpResponse { + 1: list messageBoxWrapUpList; + 2: i32 totalSize; +} + +exception UniversalNotificationServiceException { + 1: UniversalNotificationServiceErrorCode code; + 2: string reason; + 3: map parameterMap; +} + +struct UpdateBuddyProfileResult { + 1: string requestId; + 2: BuddyResultState state; + 3: i32 eventNo; + 11: i64 receiverCount; + 12: i64 successCount; + 13: i64 failCount; + 14: i64 cancelCount; + 15: i64 unregisterCount; + 21: i64 timestamp; + 22: string message; +} + +struct UserAuthStatus { + 1: bool phoneNumberRegistered; + 2: list registeredSnsIdTypes; +} + +struct VerificationSessionData { + 1: string sessionId; + 2: VerificationMethod method; + 3: string callback; + 4: string normalizedPhone; + 5: string countryCode; + 6: string nationalSignificantNumber; + 7: list availableVerificationMethods; +} + +struct WapInvitation { + 1: WapInvitationType type; + 10: string inviteeEmail; + 11: string inviterMid; + 12: string roomMid; +} + +service AccountSupervisorService { + RSAKey getRSAKey() throws(1: TalkException e); + + void notifyEmailConfirmationResult( + 2: map parameterMap) throws(1: TalkException e); + + string registerVirtualAccount( + 2: string locale, + 3: string encryptedVirtualUserId, + 4: string encryptedPassword) throws(1: TalkException e); + + void requestVirtualAccountPasswordChange( + 2: string virtualMid, + 3: string encryptedVirtualUserId, + 4: string encryptedOldPassword, + 5: string encryptedNewPassword) throws(1: TalkException e); + + void requestVirtualAccountPasswordSet( + 2: string virtualMid, + 3: string encryptedVirtualUserId, + 4: string encryptedNewPassword) throws(1: TalkException e); + + void unregisterVirtualAccount( + 2: string virtualMid) throws(1: TalkException e); +} + +service AgeCheckService { + UserAgeType checkUserAge( + 2: CarrierCode carrier, + 3: string sessionId, + 4: string verifier, + 5: i32 standardAge) throws(1: TalkException e); + + AgeCheckDocomoResult checkUserAgeWithDocomo( + 2: string openIdRedirectUrl, + 3: i32 standardAge, + 4: string verifier) throws(1: TalkException e); + + string retrieveOpenIdAuthUrlWithDocomo() throws(1: TalkException e); + + AgeCheckRequestResult retrieveRequestToken( + 2: CarrierCode carrier) throws(1: TalkException e); +} + +service BuddyManagementService { + void addBuddyMember( + 1: string requestId, + 2: string userMid) throws(1: TalkException e); + + void addBuddyMembers( + 1: string requestId, + 2: list userMids) throws(1: TalkException e); + + void blockBuddyMember( + 1: string requestId, + 2: string mid) throws(1: TalkException e); + + list commitSendMessagesToAll( + 1: list requestIdList) throws(1: TalkException e); + + list commitSendMessagesToMids( + 1: list requestIdList, + 2: list mids) throws(1: TalkException e); + + bool containsBuddyMember( + 1: string requestId, + 2: string userMid) throws(1: TalkException e); + + binary downloadMessageContent( + 1: string requestId, + 2: string messageId) throws(1: TalkException e); + + binary downloadMessageContentPreview( + 1: string requestId, + 2: string messageId) throws(1: TalkException e); + + binary downloadProfileImage( + 1: string requestId) throws(1: TalkException e); + + binary downloadProfileImagePreview( + 1: string requestId) throws(1: TalkException e); + + i64 getActiveMemberCountByBuddyMid( + 2: string buddyMid) throws(1: TalkException e); + + list getActiveMemberMidsByBuddyMid( + 2: string buddyMid) throws(1: TalkException e); + + list getAllBuddyMembers() throws(1: TalkException e); + + list getBlockedBuddyMembers() throws(1: TalkException e); + + i64 getBlockerCountByBuddyMid( + 2: string buddyMid) throws(1: TalkException e); + + BuddyDetail getBuddyDetailByMid( + 2: string buddyMid) throws(1: TalkException e); + + BuddyProfile getBuddyProfile() throws(1: TalkException e); + + Ticket getContactTicket() throws(1: TalkException e); + + i64 getMemberCountByBuddyMid( + 2: string buddyMid) throws(1: TalkException e); + + SendBuddyMessageResult getSendBuddyMessageResult( + 1: string sendBuddyMessageRequestId) throws(1: TalkException e); + + SetBuddyOnAirResult getSetBuddyOnAirResult( + 1: string setBuddyOnAirRequestId) throws(1: TalkException e); + + UpdateBuddyProfileResult getUpdateBuddyProfileResult( + 1: string updateBuddyProfileRequestId) throws(1: TalkException e); + + bool isBuddyOnAirByMid( + 2: string buddyMid) throws(1: TalkException e); + + string linkAndSendBuddyContentMessageToAllAsync( + 1: string requestId, + 2: Message msg, + 3: string sourceContentId) throws(1: TalkException e); + + SendBuddyMessageResult linkAndSendBuddyContentMessageToMids( + 1: string requestId, + 2: Message msg, + 3: string sourceContentId, + 4: list mids) throws(1: TalkException e); + + void notifyBuddyBlocked( + 1: string buddyMid, + 2: string blockerMid) throws(1: TalkException e); + + void notifyBuddyUnblocked( + 1: string buddyMid, + 2: string blockerMid) throws(1: TalkException e); + + string registerBuddy( + 2: string buddyId, + 3: string searchId, + 4: string displayName, + 5: string statusMeessage, + 6: binary picture, + 7: map settings) throws(1: TalkException e); + + string registerBuddyAdmin( + 2: string buddyId, + 3: string searchId, + 4: string displayName, + 5: string statusMessage, + 6: binary picture) throws(1: TalkException e); + + string reissueContactTicket( + 3: i64 expirationTime, + 4: i32 maxUseCount) throws(1: TalkException e); + + void removeBuddyMember( + 1: string requestId, + 2: string userMid) throws(1: TalkException e); + + void removeBuddyMembers( + 1: string requestId, + 2: list userMids) throws(1: TalkException e); + + SendBuddyMessageResult sendBuddyContentMessageToAll( + 1: string requestId, + 2: Message msg, + 3: binary content) throws(1: TalkException e); + + string sendBuddyContentMessageToAllAsync( + 1: string requestId, + 2: Message msg, + 3: binary content) throws(1: TalkException e); + + SendBuddyMessageResult sendBuddyContentMessageToMids( + 1: string requestId, + 2: Message msg, + 3: binary content, + 4: list mids) throws(1: TalkException e); + + string sendBuddyContentMessageToMidsAsync( + 1: string requestId, + 2: Message msg, + 3: binary content, + 4: list mids) throws(1: TalkException e); + + SendBuddyMessageResult sendBuddyMessageToAll( + 1: string requestId, + 2: Message msg) throws(1: TalkException e); + + string sendBuddyMessageToAllAsync( + 1: string requestId, + 2: Message msg) throws(1: TalkException e); + + SendBuddyMessageResult sendBuddyMessageToMids( + 1: string requestId, + 2: Message msg, + 3: list mids) throws(1: TalkException e); + + string sendBuddyMessageToMidsAsync( + 1: string requestId, + 2: Message msg, + 3: list mids) throws(1: TalkException e); + + void sendIndividualEventToAllAsync( + 1: string requestId, + 2: string buddyMid, + 3: NotificationStatus notificationStatus) throws(1: TalkException e); + + SetBuddyOnAirResult setBuddyOnAir( + 1: string requestId, + 2: bool onAir) throws(1: TalkException e); + + string setBuddyOnAirAsync( + 1: string requestId, + 2: bool onAir) throws(1: TalkException e); + + SendBuddyMessageResult storeMessage( + 1: string requestId, + 2: BuddyMessageRequest messageRequest) throws(1: TalkException e); + + void unblockBuddyMember( + 1: string requestId, + 2: string mid) throws(1: TalkException e); + + void unregisterBuddy( + 1: string requestId) throws(1: TalkException e); + + void unregisterBuddyAdmin( + 1: string requestId) throws(1: TalkException e); + + void updateBuddyAdminProfileAttribute( + 1: string requestId, + 2: map attributes) throws(1: TalkException e); + + void updateBuddyAdminProfileImage( + 1: string requestId, + 2: binary picture) throws(1: TalkException e); + + UpdateBuddyProfileResult updateBuddyProfileAttributes( + 1: string requestId, + 2: map attributes) throws(1: TalkException e); + + string updateBuddyProfileAttributesAsync( + 1: string requestId, + 2: map attributes) throws(1: TalkException e); + + UpdateBuddyProfileResult updateBuddyProfileImage( + 1: string requestId, + 2: binary image) throws(1: TalkException e); + + string updateBuddyProfileImageAsync( + 1: string requestId, + 2: binary image) throws(1: TalkException e); + + void updateBuddySearchId( + 1: string requestId, + 2: string searchId) throws(1: TalkException e); + + void updateBuddySettings( + 2: map settings) throws(1: TalkException e); + + string uploadBuddyContent( + 2: ContentType contentType, + 3: binary content) throws(1: TalkException e); +} + +service BuddyService { + list findBuddyContactsByQuery( + 2: string language, + 3: string country, + 4: string query, + 5: i32 fromIndex, + 6: i32 count, + 7: BuddySearchRequestSource requestSource) throws(1: TalkException e); + + list getBuddyContacts( + 2: string language, + 3: string country, + 4: string classification, + 5: i32 fromIndex, + 6: i32 count) throws(1: TalkException e); + + BuddyDetail getBuddyDetail( + 4: string buddyMid) throws(1: TalkException e); + + BuddyOnAir getBuddyOnAir( + 4: string buddyMid) throws(1: TalkException e); + + list getCountriesHavingBuddy() throws(1: TalkException e); + + map getNewlyReleasedBuddyIds( + 3: string country) throws(1: TalkException e); + + BuddyBanner getPopularBuddyBanner( + 2: string language, + 3: string country, + 4: ApplicationType applicationType, + 5: string resourceSpecification) throws(1: TalkException e); + + list getPopularBuddyLists( + 2: string language, + 3: string country) throws(1: TalkException e); + + list getPromotedBuddyContacts( + 2: string language, + 3: string country) throws(1: TalkException e); +} + +service ChannelApplicationProvidedService { + i64 activeBuddySubscriberCount() throws(1: TalkException e); + + void addOperationForChannel( + 1: OpType opType, + 2: string param1, + 3: string param2, + 4: string param3) throws(1: TalkException e); + + i64 displayBuddySubscriberCount() throws(1: TalkException e); + + Contact findContactByUseridWithoutAbuseBlockForChannel( + 2: string userid) throws(1: TalkException e); + + list getAllContactIdsForChannel() throws(1: TalkException e); + + list getCompactContacts( + 2: i64 lastModifiedTimestamp) throws(1: TalkException e); + + list getContactsForChannel( + 2: list ids) throws(1: TalkException e); + + string getDisplayName( + 2: string mid) throws(1: TalkException e); + + list getFavoriteMidsForChannel() throws(1: TalkException e); + + list getFriendMids() throws(1: TalkException e); + + list getGroupMemberMids( + 1: string groupId) throws(1: TalkException e); + + list getGroupsForChannel( + 1: list groupIds) throws(1: TalkException e); + + IdentityCredential getIdentityCredential() throws(1: TalkException e); + + list getJoinedGroupIdsForChannel() throws(1: TalkException e); + + MetaProfile getMetaProfile() throws(1: TalkException e); + + string getMid() throws(1: TalkException e); + + SimpleChannelClient getPrimaryClientForChannel() throws(1: TalkException e); + + Profile getProfileForChannel() throws(1: TalkException e); + + list getSimpleChannelContacts( + 1: list ids) throws(1: TalkException e); + + string getUserCountryForBilling( + 2: string country, + 3: string remoteIp) throws(1: TalkException e); + + i64 getUserCreateTime() throws(1: TalkException e); + + map getUserIdentities() throws(1: TalkException e); + + string getUserLanguage() throws(1: TalkException e); + + list getUserMidsWhoAddedMe() throws(1: TalkException e); + + bool isGroupMember( + 1: string groupId) throws(1: TalkException e); + + bool isInContact( + 2: string mid) throws(1: TalkException e); + + string registerChannelCP( + 2: string cpId, + 3: string registerPassword) throws(1: TalkException e); + + void removeNotificationStatus( + 2: NotificationStatus notificationStatus) throws(1: TalkException e); + + Message sendMessageForChannel( + 2: Message message) throws(1: TalkException e); + + void sendPinCodeOperation( + 1: string verifier) throws(1: TalkException e); + + void updateProfileAttributeForChannel( + 2: ProfileAttribute profileAttribute, + 3: string value) throws(1: TalkException e); +} + +service ChannelService { + ChannelToken approveChannelAndIssueChannelToken( + 1: string channelId) throws(1: ChannelException e); + + string approveChannelAndIssueRequestToken( + 1: string channelId, + 2: string otpId) throws(1: ChannelException e); + + NotificationFetchResult fetchNotificationItems( + 2: i64 localRev) throws(1: ChannelException e); + + ApprovedChannelInfos getApprovedChannels( + 2: i64 lastSynced, + 3: string locale) throws(1: ChannelException e); + + ChannelInfo getChannelInfo( + 2: string channelId, + 3: string locale) throws(1: ChannelException e); + + ChannelNotificationSetting getChannelNotificationSetting( + 1: string channelId, + 2: string locale) throws(1: ChannelException e); + + list getChannelNotificationSettings( + 1: string locale) throws(1: ChannelException e); + + ChannelInfos getChannels( + 2: i64 lastSynced, + 3: string locale) throws(1: ChannelException e); + + ChannelDomains getDomains( + 2: i64 lastSynced) throws(1: ChannelException e); + + FriendChannelMatricesResponse getFriendChannelMatrices( + 1: list channelIds) throws(1: ChannelException e); + + i32 getNotificationBadgeCount( + 2: i64 localRev) throws(1: ChannelException e); + + ChannelToken issueChannelToken( + 1: string channelId) throws(1: ChannelException e); + + string issueRequestToken( + 1: string channelId, + 2: string otpId) throws(1: ChannelException e); + + RequestTokenResponse issueRequestTokenWithAuthScheme( + 1: string channelId, + 2: string otpId, + 3: list authScheme, + 4: string returnUrl) throws(1: ChannelException e); + + string reserveCoinUse( + 2: CoinUseReservation request, + 3: string locale) throws(1: ChannelException e); + + void revokeChannel( + 1: string channelId) throws(1: ChannelException e); + + ChannelSyncDatas syncChannelData( + 2: i64 lastSynced, + 3: string locale) throws(1: ChannelException e); + + void updateChannelNotificationSetting( + 1: list setting) throws(1: ChannelException e); +} + +service MessageService { + MessageOperations fetchMessageOperations( + 2: i64 localRevision, + 3: i64 lastOpTimestamp, + 4: i32 count) throws(1: TalkException e); + + LastReadMessageIds getLastReadMessageIds( + 2: string chatId) throws(1: TalkException e); + + list multiGetLastReadMessageIds( + 2: list chatIds) throws(1: TalkException e); +} + +service ShopService { + void buyCoinProduct( + 2: PaymentReservation paymentReservation) throws(1: TalkException e); + + void buyFreeProduct( + 2: string receiverMid, + 3: string productId, + 4: i32 messageTemplate, + 5: string language, + 6: string country, + 7: i64 packageId) throws(1: TalkException e); + + void buyMustbuyProduct( + 2: string receiverMid, + 3: string productId, + 4: i32 messageTemplate, + 5: string language, + 6: string country, + 7: i64 packageId, + 8: string serialNumber) throws(1: TalkException e); + + void checkCanReceivePresent( + 2: string recipientMid, + 3: i64 packageId, + 4: string language, + 5: string country) throws(1: TalkException e); + + ProductList getActivePurchases( + 2: i64 start, + 3: i32 size, + 4: string language, + 5: string country) throws(1: TalkException e); + + ProductSimpleList getActivePurchaseVersions( + 2: i64 start, + 3: i32 size, + 4: string language, + 5: string country) throws(1: TalkException e); + + list getCoinProducts( + 2: PaymentType appStoreCode, + 3: string country, + 4: string language) throws(1: TalkException e); + + list getCoinProductsByPgCode( + 2: PaymentType appStoreCode, + 3: PaymentPgType pgCode, + 4: string country, + 5: string language) throws(1: TalkException e); + + CoinHistoryResult getCoinPurchaseHistory( + 2: CoinHistoryCondition request) throws(1: TalkException e); + + CoinHistoryResult getCoinUseAndRefundHistory( + 2: CoinHistoryCondition request) throws(1: TalkException e); + + ProductList getDownloads( + 2: i64 start, + 3: i32 size, + 4: string language, + 5: string country) throws(1: TalkException e); + + ProductList getEventPackages( + 2: i64 start, + 3: i32 size, + 4: string language, + 5: string country) throws(1: TalkException e); + + ProductList getNewlyReleasedPackages( + 2: i64 start, + 3: i32 size, + 4: string language, + 5: string country) throws(1: TalkException e); + + ProductList getPopularPackages( + 2: i64 start, + 3: i32 size, + 4: string language, + 5: string country) throws(1: TalkException e); + + ProductList getPresentsReceived( + 2: i64 start, + 3: i32 size, + 4: string language, + 5: string country) throws(1: TalkException e); + + ProductList getPresentsSent( + 2: i64 start, + 3: i32 size, + 4: string language, + 5: string country) throws(1: TalkException e); + + Product getProduct( + 2: i64 packageID, + 3: string language, + 4: string country) throws(1: TalkException e); + + ProductList getProductList( + 2: list productIdList, + 3: string language, + 4: string country) throws(1: TalkException e); + + ProductList getProductListWithCarrier( + 2: list productIdList, + 3: string language, + 4: string country, + 5: string carrierCode) throws(1: TalkException e); + + Product getProductWithCarrier( + 2: i64 packageID, + 3: string language, + 4: string country, + 5: string carrierCode) throws(1: TalkException e); + + ProductList getPurchaseHistory( + 2: i64 start, + 3: i32 size, + 4: string language, + 5: string country) throws(1: TalkException e); + + Coin getTotalBalance( + 2: PaymentType appStoreCode) throws(1: TalkException e); + + i64 notifyDownloaded( + 2: i64 packageId, + 3: string language) throws(1: TalkException e); + + PaymentReservationResult reserveCoinPurchase( + 2: CoinPurchaseReservation request) throws(1: TalkException e); + + PaymentReservationResult reservePayment( + 2: PaymentReservation paymentReservation) throws(1: TalkException e); +} + +service SnsAdaptorService { + SnsFriends getSnsFriends( + 2: SnsIdType snsIdType, + 3: string snsAccessToken, + 4: i32 startIdx, + 5: i32 limit) throws(1: TalkException e); + + SnsProfile getSnsMyProfile( + 2: SnsIdType snsIdType, + 3: string snsAccessToken) throws(1: TalkException e); + + void postSnsInvitationMessage( + 2: SnsIdType snsIdType, + 3: string snsAccessToken, + 4: string toSnsUserId) throws(1: TalkException e); +} + +service TalkService { + void acceptGroupInvitation( + 1: i32 reqSeq, + 2: string groupId) throws(1: TalkException e); + +// REMARK: alfathdirk add accept by id + void acceptGroupInvitationByTicket( + 1: i32 reqSeq, + 2: string groupId, + 3: string ticketId + ) throws(1: TalkException e); + + void acceptProximityMatches( + 2: string sessionId, + 3: set ids) throws(1: TalkException e); + + list acquireCallRoute( + 2: string to) throws(1: TalkException e); + + string acquireCallTicket( + 2: string to) throws(1: TalkException e); + + string acquireEncryptedAccessToken( + 2: FeatureType featureType) throws(1: TalkException e); + + string addSnsId( + 2: SnsIdType snsIdType, + 3: string snsAccessToken) throws(1: TalkException e); + + void blockContact( + 1: i32 reqSeq, + 2: string id) throws(1: TalkException e); + + void blockRecommendation( + 1: i32 reqSeq, + 2: string id) throws(1: TalkException e); + + void cancelGroupInvitation( + 1: i32 reqSeq, + 2: string groupId, + 3: list contactIds) throws(1: TalkException e); + + VerificationSessionData changeVerificationMethod( + 2: string sessionId, + 3: VerificationMethod method) throws(1: TalkException e); + + void clearIdentityCredential() throws(1: TalkException e); + + void clearMessageBox( + 2: string channelId, + 3: string messageBoxId) throws(1: TalkException e); + + void closeProximityMatch( + 2: string sessionId) throws(1: TalkException e); + + map commitSendMessage( + 1: i32 seq, + 2: string messageId, + 3: list receiverMids) throws(1: TalkException e); + + map commitSendMessages( + 1: i32 seq, + 2: list messageIds, + 3: list receiverMids) throws(1: TalkException e); + + map commitUpdateProfile( + 1: i32 seq, + 2: list attrs, + 3: list receiverMids) throws(1: TalkException e); + + void confirmEmail( + 2: string verifier, + 3: string pinCode) throws(1: TalkException e); + + Group createGroup( + 1: i32 seq, + 2: string name, + 3: list contactIds) throws(1: TalkException e); + + string createQrcodeBase64Image( + 2: string url, + 3: string characterSet, + 4: i32 imageSize, + 5: i32 x, + 6: i32 y, + 7: i32 width, + 8: i32 height) throws(1: TalkException e); + + Room createRoom( + 1: i32 reqSeq, + 2: list contactIds) throws(1: TalkException e); + + string createSession() throws(1: TalkException e); + + list fetchAnnouncements( + 2: i32 lastFetchedIndex) throws(1: TalkException e); + + list fetchMessages( + 2: i64 localTs, + 3: i32 count) throws(1: TalkException e); + + list fetchOperations( + 2: i64 localRev, + 3: i32 count) throws(1: TalkException e); + + list fetchOps( + 2: i64 localRev, + 3: i32 count, + 4: i64 globalRev, + 5: i64 individualRev) throws(1: TalkException e); + + map findAndAddContactsByEmail( + 1: i32 reqSeq, + 2: set emails) throws(1: TalkException e); + + map findAndAddContactsByMid( + 1: i32 reqSeq, + 2: string mid) throws(1: TalkException e); + + map findAndAddContactsByPhone( + 1: i32 reqSeq, + 2: set phones) throws(1: TalkException e); + + map findAndAddContactsByUserid( + 1: i32 reqSeq, + 2: string userid) throws(1: TalkException e); + + Contact findContactByUserid( + 2: string userid) throws(1: TalkException e); + + Contact findContactByUserTicket( + 2: string ticketId) throws(1: TalkException e); + + map findContactsByEmail( + 2: set emails) throws(1: TalkException e); + + map findContactsByPhone( + 2: set phones) throws(1: TalkException e); + + SnsIdUserStatus findSnsIdUserStatus( + 2: SnsIdType snsIdType, + 3: string snsAccessToken, + 4: string udidHash) throws(1: TalkException e); + + void finishUpdateVerification( + 2: string sessionId) throws(1: TalkException e); + + Ticket generateUserTicket( + 3: i64 expirationTime, + 4: i32 maxUseCount) throws(1: TalkException e); + + set getAcceptedProximityMatches( + 2: string sessionId) throws(1: TalkException e); + + list getActiveBuddySubscriberIds() throws(1: TalkException e); + + list getAllContactIds() throws(1: TalkException e); + + AuthQrcode getAuthQrcode( + 2: bool keepLoggedIn, + 3: string systemName) throws(1: TalkException e); + + list getBlockedContactIds() throws(1: TalkException e); + + list getBlockedContactIdsByRange( + 2: i32 start, + 3: i32 count) throws(1: TalkException e); + + list getBlockedRecommendationIds() throws(1: TalkException e); + + list getBuddyBlockerIds() throws(1: TalkException e); + + Geolocation getBuddyLocation( + 2: string mid, + 3: i32 index) throws(1: TalkException e); + + list getCompactContactsModifiedSince( + 2: i64 timestamp) throws(1: TalkException e); + + Group getCompactGroup( + 2: string groupId) throws(1: TalkException e); + + Room getCompactRoom( + 2: string roomId) throws(1: TalkException e); + + Contact getContact( + 2: string id) throws(1: TalkException e); + + list getContacts( + 2: list ids) throws(1: TalkException e); + + string getCountryWithRequestIp() throws(1: TalkException e); + + list getFavoriteMids() throws(1: TalkException e); + + Group getGroup( + 2: string groupId) throws(1: TalkException e); + + list getGroupIdsInvited() throws(1: TalkException e); + + list getGroupIdsJoined() throws(1: TalkException e); + + list getGroups( + 2: list groupIds) throws(1: TalkException e); + + list getHiddenContactMids() throws(1: TalkException e); + + string getIdentityIdentifier() throws(1: TalkException e); + + i32 getLastAnnouncementIndex() throws(1: TalkException e); + + i64 getLastOpRevision() throws(1: TalkException e); + + TMessageBox getMessageBox( + 2: string channelId, + 3: string messageBoxId, + 4: i32 lastMessagesCount) throws(1: TalkException e); + + TMessageBoxWrapUp getMessageBoxCompactWrapUp( + 2: string mid) throws(1: TalkException e); + + TMessageBoxWrapUpResponse getMessageBoxCompactWrapUpList( + 2: i32 start, + 3: i32 messageBoxCount) throws(1: TalkException e); + + list getMessageBoxList( + 2: string channelId, + 3: i32 lastMessagesCount) throws(1: TalkException e); + + list getMessageBoxListByStatus( + 2: string channelId, + 3: i32 lastMessagesCount, + 4: i32 status) throws(1: TalkException e); + + TMessageBoxWrapUp getMessageBoxWrapUp( + 2: string mid) throws(1: TalkException e); + + TMessageBoxWrapUpResponse getMessageBoxWrapUpList( + 2: i32 start, + 3: i32 messageBoxCount) throws(1: TalkException e); + + list getMessagesBySequenceNumber( + 2: string channelId, + 3: string messageBoxId, + 4: i64 startSeq, + 5: i64 endSeq) throws(1: TalkException e); + + list getNextMessages( + 2: string messageBoxId, + 3: i64 startSeq, + 4: i32 messagesCount) throws(1: TalkException e); + + list getNotificationPolicy( + 2: CarrierCode carrier) throws(1: TalkException e); + + list getPreviousMessages( + 2: string messageBoxId, + 3: i64 endSeq, + 4: i32 messagesCount) throws(1: TalkException e); + + Profile getProfile() throws(1: TalkException e); + + ProximityMatchCandidateResult getProximityMatchCandidateList( + 2: string sessionId) throws(1: TalkException e); + + set getProximityMatchCandidates( + 2: string sessionId) throws(1: TalkException e); + + list getRecentMessages( + 2: string messageBoxId, + 3: i32 messagesCount) throws(1: TalkException e); + + list getRecommendationIds() throws(1: TalkException e); + + Room getRoom( + 2: string roomId) throws(1: TalkException e); + + RSAKey getRSAKeyInfo( + 2: IdentityProvider provider) throws(1: TalkException e); + + i64 getServerTime() throws(1: TalkException e); + + list getSessions() throws(1: TalkException e); + + Settings getSettings() throws(1: TalkException e); + + Settings getSettingsAttributes( + 2: i32 attrBitset) throws(1: TalkException e); + + SystemConfiguration getSystemConfiguration() throws(1: TalkException e); + + Ticket getUserTicket() throws(1: TalkException e); + + WapInvitation getWapInvitation( + 2: string invitationHash) throws(1: TalkException e); + + void invalidateUserTicket() throws(1: TalkException e); + + void inviteFriendsBySms( + 2: list phoneNumberList) throws(1: TalkException e); + + void inviteIntoGroup( + 1: i32 reqSeq, + 2: string groupId, + 3: list contactIds) throws(1: TalkException e); + + void inviteIntoRoom( + 1: i32 reqSeq, + 2: string roomId, + 3: list contactIds) throws(1: TalkException e); + + void inviteViaEmail( + 1: i32 reqSeq, + 2: string email, + 3: string name) throws(1: TalkException e); + + bool isIdentityIdentifierAvailable( + 3: IdentityProvider provider, + 2: string identifier) throws(1: TalkException e); + + bool isUseridAvailable( + 2: string userid) throws(1: TalkException e); + + void kickoutFromGroup( + 1: i32 reqSeq, + 2: string groupId, + 3: list contactIds) throws(1: TalkException e); + +// REMARK: alfathdirk add get ticket by groupid + string reissueGroupTicket( + 1: string groupId + ) throws(1: TalkException e); + + void leaveGroup( + 1: i32 reqSeq, + 2: string groupId) throws(1: TalkException e); + + void leaveRoom( + 1: i32 reqSeq, + 2: string roomId) throws(1: TalkException e); + + string loginWithIdentityCredential( + 8: IdentityProvider identityProvider, + 3: string identifier, + 4: string password, + 5: bool keepLoggedIn, + 6: string accessLocation, + 7: string systemName, + 9: string certificate) throws(1: TalkException e); + + LoginResult loginWithIdentityCredentialForCertificate( + 8: IdentityProvider identityProvider, + 3: string identifier, + 4: string password, + 5: bool keepLoggedIn, + 6: string accessLocation, + 7: string systemName, + 9: string certificate) throws(1: TalkException e); + + string loginWithVerifier( + 3: string verifier) throws(1: TalkException e); + + LoginResult loginWithVerifierForCerificate( + 3: string verifier) throws(1: TalkException e); + + LoginResult loginWithVerifierForCertificate( + 3: string verifier) throws(1: TalkException e); + + void logout() throws(1: TalkException e); + + void logoutSession( + 2: string tokenKey) throws(1: TalkException e); + + void noop() throws(1: TalkException e); + + void notifiedRedirect( + 2: map paramMap) throws(1: TalkException e); + + map notifyBuddyOnAir( + 1: i32 seq, + 2: list receiverMids) throws(1: TalkException e); + + void notifyIndividualEvent( + 2: NotificationStatus notificationStatus, + 3: list receiverMids) throws(1: TalkException e); + + void notifyInstalled( + 2: string udidHash, + 3: string applicationTypeWithExtensions); + + void notifyRegistrationComplete( + 2: string udidHash, + 3: string applicationTypeWithExtensions); + + void notifySleep( + 2: i64 lastRev, + 3: i32 badge) throws(1: TalkException e); + + void notifyUpdated( + 2: i64 lastRev, + 3: DeviceInfo deviceInfo) throws(1: TalkException e); + + string openProximityMatch( + 2: Location location) throws(1: TalkException e); + + string registerBuddyUser( + 2: string buddyId, + 3: string registrarPassword) throws(1: TalkException e); + + void registerBuddyUserid( + 2: i32 seq, + 3: string userid) throws(1: TalkException e); + + string registerDevice( + 2: string sessionId) throws(1: TalkException e); + + string registerDeviceWithIdentityCredential( + 2: string sessionId, + 5: IdentityProvider provider, + 3: string identifier, + 4: string verifier) throws(1: TalkException e); + + string registerDeviceWithoutPhoneNumber( + 2: string region, + 3: string udidHash, + 4: DeviceInfo deviceInfo) throws(1: TalkException e); + + string registerDeviceWithoutPhoneNumberWithIdentityCredential( + 2: string region, + 3: string udidHash, + 4: DeviceInfo deviceInfo, + 5: IdentityProvider provider, + 6: string identifier, + 7: string verifier, + 8: string mid) throws(1: TalkException e); + + bool registerUserid( + 1: i32 reqSeq, + 2: string userid) throws(1: TalkException e); + + string registerWapDevice( + 2: string invitationHash, + 3: string guidHash, + 4: string email, + 5: DeviceInfo deviceInfo) throws(1: TalkException e); + + string registerWithExistingSnsIdAndIdentityCredential( + 2: IdentityCredential identityCredential, + 3: string region, + 4: string udidHash, + 5: DeviceInfo deviceInfo) throws(1: TalkException e); + + RegisterWithSnsIdResult registerWithSnsId( + 2: SnsIdType snsIdType, + 3: string snsAccessToken, + 4: string region, + 5: string udidHash, + 6: DeviceInfo deviceInfo, + 7: string mid) throws(1: TalkException e); + + string registerWithSnsIdAndIdentityCredential( + 2: SnsIdType snsIdType, + 3: string snsAccessToken, + 4: IdentityCredential identityCredential, + 5: string region, + 6: string udidHash, + 7: DeviceInfo deviceInfo) throws(1: TalkException e); + + string reissueDeviceCredential() throws(1: TalkException e); + + string reissueUserTicket( + 3: i64 expirationTime, + 4: i32 maxUseCount) throws(1: TalkException e); + + void rejectGroupInvitation( + 1: i32 reqSeq, + 2: string groupId) throws(1: TalkException e); + + void releaseSession() throws(1: TalkException e); + + void removeAllMessages( + 1: i32 seq, + 2: string lastMessageId) throws(1: TalkException e); + + void removeBuddyLocation( + 2: string mid, + 3: i32 index) throws(1: TalkException e); + + bool removeMessage( + 2: string messageId) throws(1: TalkException e); + + bool removeMessageFromMyHome( + 2: string messageId) throws(1: TalkException e); + + string removeSnsId( + 2: SnsIdType snsIdType) throws(1: TalkException e); + + void report( + 2: i64 syncOpRevision, + 3: SyncCategory category, + 4: string report) throws(1: TalkException e); + + list reportContacts( + 2: i64 syncOpRevision, + 3: SyncCategory category, + 4: list contactReports, + 5: SyncActionType actionType) throws(1: TalkException e); + + void reportGroups( + 2: i64 syncOpRevision, + 3: list groups) throws(1: TalkException e); + + void reportProfile( + 2: i64 syncOpRevision, + 3: Profile profile) throws(1: TalkException e); + + void reportRooms( + 2: i64 syncOpRevision, + 3: list rooms) throws(1: TalkException e); + + void reportSettings( + 2: i64 syncOpRevision, + 3: Settings settings) throws(1: TalkException e); + + void reportSpammer( + 2: string spammerMid, + 3: list spammerReasons, + 4: list spamMessageIds) throws(1: TalkException e); + + void requestAccountPasswordReset( + 4: IdentityProvider provider, + 2: string identifier, + 5: string locale) throws(1: TalkException e); + + EmailConfirmationSession requestEmailConfirmation( + 2: EmailConfirmation emailConfirmation) throws(1: TalkException e); + + void requestIdentityUnbind( + 4: IdentityProvider provider, + 2: string identifier) throws(1: TalkException e); + + EmailConfirmationSession resendEmailConfirmation( + 2: string verifier) throws(1: TalkException e); + + void resendPinCode( + 2: string sessionId) throws(1: TalkException e); + + void resendPinCodeBySMS( + 2: string sessionId) throws(1: TalkException e); + + void sendChatChecked( + 1: i32 seq, + 2: string consumer, + 3: string lastMessageId) throws(1: TalkException e); + + void sendChatRemoved( + 1: i32 seq, + 2: string consumer, + 3: string lastMessageId) throws(1: TalkException e); + + map sendContentPreviewUpdated( + 1: i32 esq, + 2: string messageId, + 3: list receiverMids) throws(1: TalkException e); + + void sendContentReceipt( + 1: i32 seq, + 2: string consumer, + 3: string messageId) throws(1: TalkException e); + + void sendDummyPush() throws(1: TalkException e); + + Message sendEvent( + 1: i32 seq, + 2: Message message) throws(1: TalkException e); + + Message sendMessage( + 1: i32 seq, + 2: Message message) throws(1: TalkException e); + + void sendMessageIgnored( + 1: i32 seq, + 2: string consumer, + 3: list messageIds) throws(1: TalkException e); + + void sendMessageReceipt( + 1: i32 seq, + 2: string consumer, + 3: list messageIds) throws(1: TalkException e); + + Message sendMessageToMyHome( + 1: i32 seq, + 2: Message message) throws(1: TalkException e); + + void setBuddyLocation( + 2: string mid, + 3: i32 index, + 4: Geolocation location) throws(1: TalkException e); + + void setIdentityCredential( + 4: IdentityProvider provider, + 2: string identifier, + 3: string verifier) throws(1: TalkException e); + + void setNotificationsEnabled( + 1: i32 reqSeq, + 2: MIDType type, + 3: string target, + 4: bool enablement) throws(1: TalkException e); + + VerificationSessionData startUpdateVerification( + 2: string region, + 3: CarrierCode carrier, + 4: string phone, + 5: string udidHash, + 6: DeviceInfo deviceInfo, + 7: string networkCode, + 8: string locale) throws(1: TalkException e); + + VerificationSessionData startVerification( + 2: string region, + 3: CarrierCode carrier, + 4: string phone, + 5: string udidHash, + 6: DeviceInfo deviceInfo, + 7: string networkCode, + 8: string mid, + 9: string locale) throws(1: TalkException e); + + void storeUpdateProfileAttribute( + 1: i32 seq, + 2: ProfileAttribute profileAttribute, + 3: string value) throws(1: TalkException e); + + list syncContactBySnsIds( + 1: i32 reqSeq, + 2: list modifications) throws(1: TalkException e); + + map syncContacts( + 1: i32 reqSeq, + 2: list localContacts) throws(1: TalkException e); + + Message trySendMessage( + 1: i32 seq, + 2: Message message) throws(1: TalkException e); + + void unblockContact( + 1: i32 reqSeq, + 2: string id) throws(1: TalkException e); + + void unblockRecommendation( + 1: i32 reqSeq, + 2: string id) throws(1: TalkException e); + + string unregisterUserAndDevice() throws(1: TalkException e); + + void updateApnsDeviceToken( + 2: binary apnsDeviceToken) throws(1: TalkException e); + + void updateBuddySetting( + 2: string key, + 3: string value) throws(1: TalkException e); + + void updateC2DMRegistrationId( + 2: string registrationId) throws(1: TalkException e); + + void updateContactSetting( + 1: i32 reqSeq, + 2: string mid, + 3: ContactSetting flag, + 4: string value) throws(1: TalkException e); + + void updateCustomModeSettings( + 2: CustomMode customMode, + 3: map paramMap) throws(1: TalkException e); + + void updateDeviceInfo( + 2: string deviceUid, + 3: DeviceInfo deviceInfo) throws(1: TalkException e); + + void updateGroup( + 1: i32 reqSeq, + 2: Group group) throws(1: TalkException e); + + void updateNotificationToken( + 3: NotificationType type, + 2: string token) throws(1: TalkException e); + + void updateNotificationTokenWithBytes( + 3: NotificationType type, + 2: binary token) throws(1: TalkException e); + + void updateProfile( + 1: i32 reqSeq, + 2: Profile profile) throws(1: TalkException e); + + void updateProfileAttribute( + 1: i32 reqSeq, + 2: ProfileAttribute attr, + 3: string value) throws(1: TalkException e); + + void updateRegion( + 2: string region) throws(1: TalkException e); + + void updateSettings( + 1: i32 reqSeq, + 2: Settings settings) throws(1: TalkException e); + + i32 updateSettings2( + 1: i32 reqSeq, + 2: Settings settings) throws(1: TalkException e); + + void updateSettingsAttribute( + 1: i32 reqSeq, + 2: SettingsAttribute attr, + 3: string value) throws(1: TalkException e); + + i32 updateSettingsAttributes( + 1: i32 reqSeq, + 2: i32 attrBitset, + 3: Settings settings) throws(1: TalkException e); + + void verifyIdentityCredential( + 8: IdentityProvider identityProvider, + 3: string identifier, + 4: string password) throws(1: TalkException e); + + UserAuthStatus verifyIdentityCredentialWithResult( + 2: IdentityCredential identityCredential) throws(1: TalkException e); + + VerificationResult verifyPhone( + 2: string sessionId, + 3: string pinCode, + 4: string udidHash) throws(1: TalkException e); + + string verifyQrcode( + 2: string verifier, + 3: string pinCode) throws(1: TalkException e); +} + +service UniversalNotificationService { + void notify( + 2: GlobalEvent event) throws(1: UniversalNotificationServiceException e); +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..2ae8bf2 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,668 @@ +{ + "name": "linealphatjs", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", + "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + }, + "async": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=" + }, + "aws-sign2": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", + "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "bl": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz", + "integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=", + "requires": { + "readable-stream": "2.0.6" + } + }, + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + }, + "boom": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", + "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", + "requires": { + "hoek": "2.16.3" + } + }, + "caseless": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", + "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "combined-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", + "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=", + "requires": { + "delayed-stream": "0.0.5" + } + }, + "commander": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz", + "integrity": "sha1-0SG7roYNmZKj1Re6lvVliOR8Z4E=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cryptiles": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "delayed-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", + "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=" + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz", + "integrity": "sha1-Jvi8JtpkQOKZy9z7aQNcT3em5GY=", + "requires": { + "async": "0.9.2", + "combined-stream": "0.0.7", + "mime-types": "2.0.14" + } + }, + "generate-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", + "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "requires": { + "is-property": "1.0.2" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "har-validator": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", + "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", + "requires": { + "chalk": "1.1.3", + "commander": "2.11.0", + "is-my-json-valid": "2.16.1", + "pinkie-promise": "2.0.1" + }, + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" + } + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "hawk": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", + "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + }, + "http-signature": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", + "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "is-my-json-valid": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", + "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", + "requires": { + "generate-function": "2.0.0", + "generate-object-property": "1.2.0", + "jsonpointer": "4.0.1", + "xtend": "4.0.1" + } + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "mime": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz", + "integrity": "sha1-WR2E02U6awtKO5343lqoEI5y5eA=" + }, + "mime-db": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz", + "integrity": "sha1-PQxjGA9FjrENMlqqN9fFiuMS6dc=" + }, + "mime-types": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz", + "integrity": "sha1-MQ4VnbI+B3+Lsit0jav6SVcUCqY=", + "requires": { + "mime-db": "1.12.0" + } + }, + "nan": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-1.0.0.tgz", + "integrity": "sha1-riT4hQgY1mL8q1rPfzuVv6oszzg=" + }, + "node-bignumber": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/node-bignumber/-/node-bignumber-1.2.1.tgz", + "integrity": "sha1-JmyVUzUoOFOfZhyS5YYxvpeRfqU=", + "dev": true + }, + "node-int64": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.3.3.tgz", + "integrity": "sha1-LW5rLs5d6FiLQ9iNG8QbJs0fqE0=" + }, + "node-uuid": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz", + "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=" + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "2.0.4" + } + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "q": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.0.1.tgz", + "integrity": "sha1-EYcq7t7okmgRCxCnGESP+xARKhQ=" + }, + "qrcode-terminal": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.11.0.tgz", + "integrity": "sha1-/8bCii/Av7RwUrR+I/T0RqX7254=", + "dev": true + }, + "qs": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.2.3.tgz", + "integrity": "sha1-HPyyXBCpsrSDBT/zn138kjOQjP4=" + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "0.10.31", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.74.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.74.0.tgz", + "integrity": "sha1-dpPKdou7DqXIzgjAhKRe+gW4kqs=", + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "bl": "1.1.2", + "caseless": "0.11.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "1.0.1", + "har-validator": "2.0.6", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.16", + "node-uuid": "1.4.8", + "oauth-sign": "0.8.2", + "qs": "6.2.3", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.4.3" + }, + "dependencies": { + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "requires": { + "lodash": "4.17.4" + } + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "form-data": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz", + "integrity": "sha1-rjFduaSQf6BlUCMEpm13M0de43w=", + "requires": { + "async": "2.5.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.16" + } + }, + "mime-db": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", + "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=" + }, + "mime-types": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", + "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", + "requires": { + "mime-db": "1.29.0" + } + } + } + }, + "sntp": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", + "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "thrift": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/thrift/-/thrift-0.9.3.tgz", + "integrity": "sha1-mQITNkA9QuCLjvrbHDegbXmYsqY=", + "requires": { + "node-int64": "0.3.3", + "q": "1.0.1", + "ws": "0.4.32" + } + }, + "thrift-http": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/thrift-http/-/thrift-http-1.0.1.tgz", + "integrity": "sha1-YU35zE2K+IQ32ubZn4zHhBOT/qM=", + "requires": { + "node-int64": "0.4.0", + "q": "1.0.1", + "ws": "0.4.32" + }, + "dependencies": { + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=" + } + } + }, + "tinycolor": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz", + "integrity": "sha1-MgtaUtg6u1l42Bo+iH1K77FaYWQ=" + }, + "tough-cookie": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", + "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=", + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", + "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=" + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "unirest": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/unirest/-/unirest-0.5.1.tgz", + "integrity": "sha1-nfV2YYcoDyRbTpp1zh+tMTM31u0=", + "requires": { + "form-data": "0.2.0", + "mime": "1.3.6", + "request": "2.74.0" + } + }, + "utf8": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", + "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + } + } + }, + "ws": { + "version": "0.4.32", + "resolved": "https://registry.npmjs.org/ws/-/ws-0.4.32.tgz", + "integrity": "sha1-eHphVEFPPJntg8V3IVOyD+sM7DI=", + "requires": { + "commander": "2.1.0", + "nan": "1.0.0", + "options": "0.0.6", + "tinycolor": "0.0.1" + } + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + } + } +} diff --git a/src/api.js b/src/api.js index 141639f..035dfcd 100644 --- a/src/api.js +++ b/src/api.js @@ -26,8 +26,10 @@ class LineAPI { protocol: thrift.TCompactProtocol, transport: thrift.TBufferedTransport, headers: this.config.Headers, - path: this.config.LINE_HTTP_URL + path: this.config.LINE_HTTP_URL, + https: true }) { + options.headers['X-Line-Application'] = 'DESKTOPMAC 10.10.2-YOSEMITE-x64 MAC 4.5.0'; this.options = options; this.connection = thrift.createHttpConnection(this.config.LINE_DOMAIN, 443, this.options); @@ -36,6 +38,7 @@ class LineAPI { return err; }); this._client = thrift.createHttpClient(TalkService, this.connection); + } _tokenLogin(authToken, certificate) { @@ -48,14 +51,16 @@ class LineAPI { this.setTHttpClient(); return new Promise((resolve, reject) => { this._client.getAuthQrcode(true, 'Alfathdirk-PC',(err, result) => { + // console.log('here') const qrcodeUrl = `line://au/q/${result.verifier}`; qrcode.generate(qrcodeUrl,{small: true}); - console.log(`\n\nlink qr code is: ${qrcodeUrl}`) + console.info(`\n\nlink qr code is: ${qrcodeUrl}`) Object.assign(this.config.Headers,{ 'X-Line-Access': result.verifier }); - unirest.get('http://gd2.line.naver.jp/Q') + unirest.get('https://gd2.line.naver.jp/Q') .headers(this.config.Headers) .timeout(120000) .end(async (res) => { + console.log(res); const verifiedQr = res.body.result.verifier; const { authToken, certificate } = await this._client.loginWithVerifierForCerificate(verifiedQr); @@ -64,7 +69,7 @@ class LineAPI { this.setTHttpClient(this.options); resolve({ authToken, certificate }); }); - }); + }); }); } @@ -81,12 +86,12 @@ class LineAPI { this.provider, rsaCrypto.keyname, rsaCrypto.credentials, true, this.config.ip, 'purple-line', '', (err, result) => { + console.log if (err) { console.log('LoginFailed'); console.error(err); return reject(err); } - console.log(result); this._client.pinCode = result.pinCode; this.alertOrConsoleLog( `Enter Pincode ${result.pinCode} @@ -177,13 +182,24 @@ class LineAPI { return this._client.inviteIntoGroup(0, group, member) } + async _updateGroup(group) { + return await this._client.updateGroup(0, group) + } + _getContacts(mid) { return this._client.getContacts(mid) } async _getGroups(groupId) { - const g = await this._client.getGroups(groupId); - return g; + return await this._client.getGroups(groupId); + } + + async _getGroup(groupId) { + return await this._client.getGroup(groupId); + } + + async _reissueGroupTicket(groupId) { + return await this._client.reissueGroupTicket(groupId); } async _sendImage(message,filepaths, filename = 'media') { @@ -231,8 +247,7 @@ class LineAPI { } _fetchOperations(revision, count = 5) { - this.options.path = this.config.LINE_POLL_URL - this.setTHttpClient(); + // this.options.path = this.config.LINE_POLL_URL return this._client.fetchOperations(revision, count); } diff --git a/src/bot.js b/src/bot.js index c480e55..9788e9a 100644 --- a/src/bot.js +++ b/src/bot.js @@ -1,7 +1,12 @@ const LineConnect = require('./connect'); let LINE = require('./main.js'); -let client = new LineConnect(); +const auth = { + authToken: 'EkhKpJrY4uAEW0eLJtQb.DJL32RkCVw/GY+QFfzT2IW.Glp/DCyaiJSF7+yDbCsP9OHsXzdJvE/cHOhGu6pqDAA=', + certificate: '2c0a5dbde000c76c2fa05510742ac44ac6f44a26cb78dd83304caf5da0273371' +} + +let client = new LineConnect(auth); client.startx().then(async (res) => { let ops; diff --git a/src/config.js b/src/config.js index a01c93e..b47ee41 100644 --- a/src/config.js +++ b/src/config.js @@ -3,6 +3,7 @@ const { hostname, platform } = require('os'); const whichPlatform = platform() === 'darwin' ? 'MAC' : 'win32'; const config = { + // LINE_DOMAIN: 'gf.line.naver.jp', LINE_DOMAIN: 'gd2.line.naver.jp', LINE_OS_URL: 'os.line.naver.jp', LINE_HTTP_URL: '/api/v4/TalkService.do', @@ -21,7 +22,7 @@ const config = { platform: whichPlatform, EMAIL_REGEX: /[^@]+@[^@]+\.[^@]+/, Headers: { - 'User-Agent': 'LINE for Alfath' + 'User-Agent':'DESKTOP:MAC:10.10.2-YOSEMITE-x64(4.5.0)' } }; diff --git a/src/connect.js b/src/connect.js index 9f5d0f9..ceea346 100644 --- a/src/connect.js +++ b/src/connect.js @@ -5,16 +5,10 @@ class LineConnect extends LineAPI { constructor(options) { super(); - this.config.Headers['X-Line-Application'] = - 'IOSIPAD 6.0.0 iPhone OS 9.0.2'; - this.config.Headers['X-Line-Access'] = ''; - if (typeof options !== 'undefined') { this.authToken = options.authToken; this.certificate = options.certificate; this.config.Headers['X-Line-Access'] = options.authToken; - } else { - } } @@ -23,14 +17,14 @@ class LineConnect extends LineAPI { this._qrCodeLogin().then(async (res) => { this.authToken = res.authToken; this.certificate = res.certificate; - console.log(`[*] Token: ${this.authToken}`); - console.log(`[*] Certificate: ${res.certificate}\n`); + console.info(`[*] Token: ${this.authToken}`); + console.info(`[*] Certificate: ${res.certificate}\n`); let { mid, displayName } = await this._client.getProfile(); - console.log(`[*] mid: ${mid}\n`); - console.log(`[*] Name: ${displayName}\n`); - console.log(`NOTE: Dont forget , put your mid and admin on variable 'myBot' in main.js \n`); - console.log(`Regrads Alfathdirk and thx for TCR Team \n`); - console.log(`=======BOT RUNNING======\n`); + console.info(`[*] mid: ${mid}\n`); + console.info(`[*] Name: ${displayName}\n`); + console.info(`NOTE: Dont forget , put your mid and admin on variable 'myBot' in main.js \n`); + console.info(`Regrads Alfathdirk and thx for TCR Team \n`); + console.info(`=======BOT RUNNING======\n`); await this._tokenLogin(this.authToken, this.certificate); resolve(); }); diff --git a/src/main.js b/src/main.js index d89ba9f..1fcf19f 100644 --- a/src/main.js +++ b/src/main.js @@ -1,5 +1,5 @@ const LineAPI = require('./api'); -const { Message, OperationType } = require('../curve-thrift/line_types'); +const { Message, OpType, Location } = require('../curve-thrift/line_types'); let exec = require('child_process').exec; const myBot = ['u78b179f959eba71ec2de09233281c49e','uc93c736a8b385208c2aa7aed58de2ceb','u236b88bf1eac2b90e848a6198152e647','u763977dab29cbd6fa0cbfa9f159b768b']; @@ -22,10 +22,10 @@ class LINE extends LineAPI { } getOprationType(operations) { - for (let key in OperationType) { - if(operations.type == OperationType[key]) { + for (let key in OpType) { + if(operations.type == OpType[key]) { if(key !== 'NOTIFIED_UPDATE_PROFILE') { - console.log(`[* ${operations.type} ] ${key} `); + console.info(`[* ${operations.type} ] ${key} `); } } } @@ -57,22 +57,25 @@ class LINE extends LineAPI { } - if(operation.type == 28){ //ada reader - let checkReader = this.checkReader; - for (let i = 0; i < checkReader.length; i++) { - for (let key in checkReader[i]) { - let oparam2 = operation.param2.split('\u001e'); - if(oparam2.includes(checkReader[i].messageId)) { - let usersList = checkReader[i].users; - let timeList = checkReader[i].timeSeen; - if(!usersList.includes(operation.param1)){ - usersList.push(operation.param1); - timeList.push(operation.createdTime.toString()); + if(operation.type == 55){ //ada reader + + const idx = this.checkReader.findIndex((v) => { + if(v.group == operation.param1) { + return v + } + }) + if(this.checkReader.length < 1 || idx == -1) { + this.checkReader.push({ group: operation.param1, users: [operation.param2], timeSeen: [operation.param3] }); + } else { + for (var i = 0; i < this.checkReader.length; i++) { + if(this.checkReader[i].group == operation.param1) { + if(!this.checkReader[i].users.includes(operation.param2)) { + this.checkReader[i].users.push(operation.param2); + this.checkReader[i].timeSeen.push(operation.param3); } } - } + } } - } if(operation.type == 13) { // diinvite @@ -85,21 +88,6 @@ class LINE extends LineAPI { this.getOprationType(operation); } - searchReader(seq) { - const messageID = seq.id; - let groupID = seq.to; - let dataReader = { - messageId: messageID, - group: groupID, - users: [], - timeSeen: [], - }; - - if(myBot.includes('uc93c736a8b385208c2aa7aed58de2ceb')) { - this.checkReader.push(dataReader); - } - } - async cancelAll(gid) { let { listPendingInvite } = await this.searchGroup(gid); if(listPendingInvite.length > 0){ @@ -125,16 +113,6 @@ class LINE extends LineAPI { } } - removeReaderByGroup(groupID) { - let i = 0; - this.checkReader.map((v) => { - if(v.group == groupID) { - this.checkReader.splice(i,1); - } - i++ - }) - } - setState(seq) { if(isAdminOrBot(seq.from)){ let [ actions , status ] = seq.text.split(' '); @@ -154,14 +132,27 @@ class LINE extends LineAPI { users = cs[i].users; } } - + let contactMember = await this._getContacts(users); return contactMember.map((z) => { return z.displayName; - }).join(','); + }); + } + + removeReaderByGroup(groupID) { + const groupIndex = this.checkReader.findIndex(v => { + if(v.group == groupID) { + return v + } + }) + + if(groupIndex != -1) { + this.checkReader.splice(groupIndex,1); + } } async textMessage(txt, seq) { + const [ cmd, payload ] = txt.split(' '); const messageID = seq.id; if(txt == 'cancel' && this.stateStatus.cancel == 1) { @@ -185,7 +176,7 @@ class LINE extends LineAPI { }) } - if(txt === 'kickall' && this.stateStatus.kick == 1) { + if(txt === 'kickall' && this.stateStatus.kick == 1 && isAdminOrBot(seq.from)) { let { listMember } = await this.searchGroup(seq.to); for (var i = 0; i < listMember.length; i++) { if(!isAdminOrBot(listMember[i].mid)){ @@ -195,15 +186,17 @@ class LINE extends LineAPI { } if(txt == 'setpoint') { - this._sendMessage(seq, `SetPoint for check Reader .`); + this._sendMessage(seq, `SetPoint for check Reader.`); this.removeReaderByGroup(seq.to); } + if(txt == 'clear') { + this.checkReader = [] + } + if(txt == 'recheck'){ - console.log(this.checkReader); let rec = await this.recheck(this.checkReader,seq.to); - let xz = rec.split(','); - this._sendMessage(seq, `== tukang bengong ==\n${xz.join('\n')}`); + this._sendMessage(seq, `== tukang bengong ==\n${rec.join('\n')}`); } @@ -239,6 +232,50 @@ class LINE extends LineAPI { this._sendMessage(seq,res) }) } + + const joinByUrl = ['ourl','curl']; + if(joinByUrl.includes(txt)) { + this._sendMessage(seq,`Updating group ...`); + let updateGroup = await this._getGroup(seq.to); + updateGroup.preventJoinByTicket = true; + if(txt == 'ourl') { + updateGroup.preventJoinByTicket = false; + const groupUrl = await this._reissueGroupTicket(seq.to) + this._sendMessage(seq,`Line group = line://ti/g/${groupUrl}`); + } + await this._updateGroup(updateGroup); + } + + if(cmd === 'ip') { + exec(`curl ipinfo.io/${payload}`,(err, res) => { + const result = JSON.parse(res); + if(typeof result.error == 'undefined') { + const { org, country, loc, city, region } = result; + try { + const [latitude, longitude ] = loc.split(','); + let location = new Location(); + Object.assign(location,{ + title: `Location:`, + address: `${org} ${city} [ ${region} ]\n${payload}`, + latitude: latitude, + longitude: longitude, + phone: null + }) + const Obj = { + text: 'Location', + location : location, + contentType: 0, + } + Object.assign(seq,Obj) + this._sendMessage(seq,'Location'); + } catch (err) { + this._sendMessage(seq,'Not Found'); + } + } else { + this._sendMessage(seq,'Location Not Found , Maybe di dalem goa'); + } + }) + } } }